Skip to content

Commit

Permalink
Merge pull request #7 from myaongz/feature/6_publishing_recommend_page
Browse files Browse the repository at this point in the history
🔀 :: (#6) recommend page 퍼블리싱
  • Loading branch information
withJihyuk authored Jul 8, 2024
2 parents f684eda + a6b2549 commit e3fe35b
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .dart_tool/package_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
"languageVersion": "3.4"
}
],
"generated": "2024-07-07T15:44:50.927936Z",
"generated": "2024-07-08T06:36:31.058319Z",
"generator": "pub",
"generatorVersion": "3.4.3",
"flutterRoot": "file:///opt/homebrew/Caskroom/flutter/3.22.2/flutter",
Expand Down
46 changes: 46 additions & 0 deletions lib/components/appbar.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import 'package:flutter/material.dart';
import 'package:grapper/utils/grapper_font.dart';
import 'package:grapper/utils/grapper_icon.dart';

class GrapperAppbar extends StatelessWidget {
const GrapperAppbar({super.key, required this.text});
final String text;

@override
Widget build(BuildContext context) {
return Container(
decoration: const BoxDecoration(),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
GrapperText(
text: text,
grapperFont: GrapperFonts.pretendard_700,
size: 24,
color: Colors.white,
),
Container(
decoration: const BoxDecoration(),
child: const Row(
children: [
GrapperIcon(
icon: GrapperIcons.bell,
color: Colors.white,
size: 24,
),
SizedBox(
width: 22,
),
GrapperIcon(
icon: GrapperIcons.user,
color: Colors.white,
size: 24,
),
],
),
)
],
),
);
}
}
10 changes: 7 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:grapper/views/home_page.dart';
import 'package:grapper/views/recommend/recommend_page.dart';

void main() {
runApp(const MyApp());
Expand All @@ -10,8 +10,12 @@ class MyApp extends StatelessWidget {

@override
Widget build(BuildContext context) {
return const MaterialApp(
home: HomePage(),
return MaterialApp(
theme: ThemeData(
scaffoldBackgroundColor: Colors.black,
),
debugShowCheckedModeBanner: false,
home: const RecommendPage(),
);
}
}
46 changes: 24 additions & 22 deletions lib/utils/grapper_icon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,37 @@ import 'package:flutter/material.dart';

class GrapperIcons {
static const String bitcoin = 'assets/icons/bitcoin-icons_verify-filled.png';
static const String games = 'assets/icons/bitcoin-icons_verify-filled.png';
static const String moon = 'assets/icons/bitcoin-icons_verify-filled.png';
static const String bell = 'assets/icons/bitcoin-icons_verify-filled.png';
static const String editPencil =
'assets/icons/bitcoin-icons_verify-filled.png';
static const String heart = 'assets/icons/bitcoin-icons_verify-filled.png';
static const String arrowUp = 'assets/icons/bitcoin-icons_verify-filled.png';
static const String search = 'assets/icons/bitcoin-icons_verify-filled.png';
static const String user = 'assets/icons/bitcoin-icons_verify-filled.png';
static const String share = 'assets/icons/bitcoin-icons_verify-filled.png';
static const String steam = 'assets/icons/bitcoin-icons_verify-filled.png';
static const String users = 'assets/icons/bitcoin-icons_verify-filled.png';
static const String epicgames =
'assets/icons/bitcoin-icons_verify-filled.png';
static const String metacritic =
'assets/icons/bitcoin-icons_verify-filled.png';
static const String games = 'assets/icons/game-icons_pistol-gun.png';
static const String moon = 'assets/icons/iconamoon_comment-thin.png';
static const String bell = 'assets/icons/iconoir_bell-notification.png';
static const String editPencil = 'assets/icons/iconoir_edit-pencil.png';
static const String heart = 'assets/icons/iconoir_heart.png';
static const String arrowUp = 'assets/icons/iconoir_nav-arrow-up.png';
static const String search = 'assets/icons/iconoir_search.png';
static const String user = 'assets/icons/iconoir_user.png';
static const String share = 'assets/icons/ion_share-outline.png';
static const String steam = 'assets/icons/mdi_steam.png';
static const String users = 'assets/icons/ph_users.png';
static const String epicgames = 'assets/icons/simple-icons_epicgames.png';
static const String metacritic = 'assets/icons/simple-icons_metacritic.png';
static const String streamlineCrown =
'assets/icons/bitcoin-icons_verify-filled.png';
'assets/icons/streamline_crown-solid.png';
}

class GrapperIcon extends StatelessWidget {
const GrapperIcon({
super.key,
required this.icon,
});
const GrapperIcon(
{super.key, required this.icon, required this.color, required this.size});
final String icon;
final Color color;
final double size;

@override
Widget build(BuildContext context) {
return Image.asset(icon);
return Image.asset(
icon,
color: color,
height: size,
width: size,
);
}
}
27 changes: 0 additions & 27 deletions lib/views/home_page.dart

This file was deleted.

24 changes: 24 additions & 0 deletions lib/views/recommend/recommend_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import 'package:flutter/material.dart';
import 'package:grapper/components/appbar.dart';

class RecommendPage extends StatelessWidget {
const RecommendPage({super.key});

@override
Widget build(BuildContext context) {
return const Scaffold(
body: SafeArea(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 20),
child: Column(
children: [
GrapperAppbar(
text: '테스트',
),
],
),
),
),
);
}
}

0 comments on commit e3fe35b

Please sign in to comment.