diff --git a/assets/images/add_background.png b/assets/images/add_background.png
new file mode 100644
index 0000000..eff2d70
Binary files /dev/null and b/assets/images/add_background.png differ
diff --git a/assets/images/cup.png b/assets/images/cup.png
new file mode 100644
index 0000000..16de293
Binary files /dev/null and b/assets/images/cup.png differ
diff --git a/assets/images/icon_crown.png b/assets/images/icon_crown.png
new file mode 100644
index 0000000..2c24200
Binary files /dev/null and b/assets/images/icon_crown.png differ
diff --git a/assets/images/icon_diamond.png b/assets/images/icon_diamond.png
new file mode 100644
index 0000000..c1104f3
Binary files /dev/null and b/assets/images/icon_diamond.png differ
diff --git a/assets/images/icon_flash.png b/assets/images/icon_flash.png
new file mode 100644
index 0000000..9ca0a4e
Binary files /dev/null and b/assets/images/icon_flash.png differ
diff --git a/assets/images/icon_profile.png b/assets/images/icon_profile.png
new file mode 100644
index 0000000..f48afff
Binary files /dev/null and b/assets/images/icon_profile.png differ
diff --git a/assets/images/mic.png b/assets/images/mic.png
new file mode 100644
index 0000000..ca96910
Binary files /dev/null and b/assets/images/mic.png differ
diff --git a/assets/images/mic_blur.png b/assets/images/mic_blur.png
new file mode 100644
index 0000000..cd6367e
Binary files /dev/null and b/assets/images/mic_blur.png differ
diff --git a/assets/images/shia_mind_group.png b/assets/images/shia_mind_group.png
new file mode 100644
index 0000000..b47c20e
Binary files /dev/null and b/assets/images/shia_mind_group.png differ
diff --git a/assets/svg/friend_battle.svg b/assets/svg/friend_battle.svg
new file mode 100644
index 0000000..aa8575a
--- /dev/null
+++ b/assets/svg/friend_battle.svg
@@ -0,0 +1,39 @@
+
diff --git a/assets/svg/icon_awards.svg b/assets/svg/icon_awards.svg
new file mode 100644
index 0000000..67901d2
--- /dev/null
+++ b/assets/svg/icon_awards.svg
@@ -0,0 +1,41 @@
+
diff --git a/assets/svg/icon_clock.svg b/assets/svg/icon_clock.svg
new file mode 100644
index 0000000..f657f87
--- /dev/null
+++ b/assets/svg/icon_clock.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/svg/icon_home.svg b/assets/svg/icon_home.svg
new file mode 100644
index 0000000..a88c424
--- /dev/null
+++ b/assets/svg/icon_home.svg
@@ -0,0 +1,41 @@
+
diff --git a/assets/svg/icon_plus.svg b/assets/svg/icon_plus.svg
new file mode 100644
index 0000000..9c6b2b4
--- /dev/null
+++ b/assets/svg/icon_plus.svg
@@ -0,0 +1,14 @@
+
diff --git a/assets/svg/icon_setting.svg b/assets/svg/icon_setting.svg
new file mode 100644
index 0000000..dfc6c52
--- /dev/null
+++ b/assets/svg/icon_setting.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/svg/icon_share.svg b/assets/svg/icon_share.svg
new file mode 100644
index 0000000..43b2c59
--- /dev/null
+++ b/assets/svg/icon_share.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/svg/icon_shop.svg b/assets/svg/icon_shop.svg
new file mode 100644
index 0000000..57c2ab6
--- /dev/null
+++ b/assets/svg/icon_shop.svg
@@ -0,0 +1,41 @@
+
diff --git a/assets/svg/medal.svg b/assets/svg/medal.svg
new file mode 100644
index 0000000..8b4a41a
--- /dev/null
+++ b/assets/svg/medal.svg
@@ -0,0 +1,37 @@
+
diff --git a/lib/common_ui/resources/my_assets.dart b/lib/common_ui/resources/my_assets.dart
index 09d8c1c..6edec51 100644
--- a/lib/common_ui/resources/my_assets.dart
+++ b/lib/common_ui/resources/my_assets.dart
@@ -7,9 +7,28 @@ class MyAssets {
static const String sample = 'assets/images/sample.png';
static const String shiaMind = 'assets/images/shia_mind.png';
static const String question = 'assets/images/question.png';
+ static const String iconProfile = 'assets/images/icon_profile.png';
+ static const String iconDiamond = 'assets/images/icon_diamond.png';
+ static const String iconFlash = 'assets/images/icon_flash.png';
+ static const String iconCrown = 'assets/images/icon_crown.png';
+ static const String shiaMindGroup = 'assets/images/shia_mind_group.png';
+ static const String cup = 'assets/images/cup.png';
+ static const String addBackground = 'assets/images/add_background.png';
+ static const String mic = 'assets/images/mic.png';
+ static const String micBLur = 'assets/images/mic_blur.png';
/// ----- Svg -----
static const String sampleSvg = 'assets/svg/sample.svg';
+ static const String iconHome = 'assets/svg/icon_home.svg';
+ static const String iconShop = 'assets/svg/icon_shop.svg';
+ static const String iconAwards = 'assets/svg/icon_awards.svg';
+ static const String iconPlus = 'assets/svg/icon_plus.svg';
+ static const String iconSetting = 'assets/svg/icon_setting.svg';
+ static const String iconShare = 'assets/svg/icon_share.svg';
+ static const String iconClock = 'assets/svg/icon_clock.svg';
+ static const String medal = 'assets/svg/medal.svg';
+ static const String friendBattle = 'assets/svg/friend_battle.svg';
+
/// ----- Audios -----
static const String sampleAudio = 'assets/audios/sample.mp3';
@@ -21,5 +40,10 @@ class MyAssets {
static const List images = [
shiaMind,
question,
+ iconProfile,
+ iconDiamond,
+ iconFlash,
+ iconCrown,
+ shiaMindGroup,
];
}
diff --git a/lib/common_ui/resources/my_colors.dart b/lib/common_ui/resources/my_colors.dart
index 5af3ddc..087ce37 100644
--- a/lib/common_ui/resources/my_colors.dart
+++ b/lib/common_ui/resources/my_colors.dart
@@ -8,5 +8,5 @@ class MyColors {
static const Color white = Colors.white;
static const Color black = Colors.black;
static const Color transparent = Colors.transparent;
- static const Color introBackgroundColor = Color(0xFF160C30);
+ static const Color backgroundColor = Color(0xFF160C30);
}
diff --git a/lib/common_ui/theme/my_theme.dart b/lib/common_ui/theme/my_theme.dart
index 9ba99f4..7ee5201 100644
--- a/lib/common_ui/theme/my_theme.dart
+++ b/lib/common_ui/theme/my_theme.dart
@@ -5,7 +5,7 @@ import 'package:get/get.dart';
enum ColorsName {
primaryColor,
noColor,
- introBackgroundColor,
+ backgroundColor,
}
class MyTheme {
@@ -20,13 +20,13 @@ class MyTheme {
static Map get lightColors => {
ColorsName.primaryColor: MyColors.white,
ColorsName.noColor: MyColors.transparent,
- ColorsName.introBackgroundColor: MyColors.introBackgroundColor,
+ ColorsName.backgroundColor: MyColors.backgroundColor,
};
static Map get darkColors => {
ColorsName.primaryColor: MyColors.white,
ColorsName.noColor: MyColors.transparent,
- ColorsName.introBackgroundColor: MyColors.introBackgroundColor,
+ ColorsName.backgroundColor: MyColors.backgroundColor,
};
}
@@ -36,5 +36,5 @@ extension ThemeExtension on BuildContext {
Color get primaryColor => customColors[ColorsName.primaryColor]!;
Color get noColor => customColors[ColorsName.noColor]!;
- Color get introBackgroundColor => customColors[ColorsName.introBackgroundColor]!;
+ Color get backgroundColor => customColors[ColorsName.backgroundColor]!;
}
diff --git a/lib/core/params/awards_params.dart b/lib/core/params/awards_params.dart
new file mode 100644
index 0000000..63bc3a0
--- /dev/null
+++ b/lib/core/params/awards_params.dart
@@ -0,0 +1,13 @@
+class AwardsParams {
+ int? id;
+
+ AwardsParams({this.id});
+
+ AwardsParams copyWith({
+ int? id,
+ }) {
+ return AwardsParams(
+ id: id ?? this.id,
+ );
+ }
+}
diff --git a/lib/core/params/home_params.dart b/lib/core/params/home_params.dart
new file mode 100644
index 0000000..22518f3
--- /dev/null
+++ b/lib/core/params/home_params.dart
@@ -0,0 +1,13 @@
+class HomeParams {
+ int? id;
+
+ HomeParams({this.id});
+
+ HomeParams copyWith({
+ int? id,
+ }) {
+ return HomeParams(
+ id: id ?? this.id,
+ );
+ }
+}
diff --git a/lib/core/params/master_params.dart b/lib/core/params/master_params.dart
new file mode 100644
index 0000000..62509d2
--- /dev/null
+++ b/lib/core/params/master_params.dart
@@ -0,0 +1,13 @@
+class MasterParams {
+ int? id;
+
+ MasterParams({this.id});
+
+ MasterParams copyWith({
+ int? id,
+ }) {
+ return MasterParams(
+ id: id ?? this.id,
+ );
+ }
+}
diff --git a/lib/core/params/profile_params.dart b/lib/core/params/profile_params.dart
new file mode 100644
index 0000000..9c62c23
--- /dev/null
+++ b/lib/core/params/profile_params.dart
@@ -0,0 +1,13 @@
+class ProfileParams {
+ int? id;
+
+ ProfileParams({this.id});
+
+ ProfileParams copyWith({
+ int? id,
+ }) {
+ return ProfileParams(
+ id: id ?? this.id,
+ );
+ }
+}
diff --git a/lib/core/params/shop_params.dart b/lib/core/params/shop_params.dart
new file mode 100644
index 0000000..6d3537b
--- /dev/null
+++ b/lib/core/params/shop_params.dart
@@ -0,0 +1,13 @@
+class ShopParams {
+ int? id;
+
+ ShopParams({this.id});
+
+ ShopParams copyWith({
+ int? id,
+ }) {
+ return ShopParams(
+ id: id ?? this.id,
+ );
+ }
+}
diff --git a/lib/core/routers/my_routes.dart b/lib/core/routers/my_routes.dart
index 4fece1a..272cf33 100644
--- a/lib/core/routers/my_routes.dart
+++ b/lib/core/routers/my_routes.dart
@@ -1,8 +1,18 @@
+import 'package:shia_game_flutter/features/awards/presentation/binding/awards_binding.dart';
+import 'package:shia_game_flutter/features/awards/presentation/ui/awards_page.dart';
+import 'package:shia_game_flutter/features/home/presentation/binding/home_binding.dart';
+import 'package:shia_game_flutter/features/home/presentation/pages/home_page.dart';
import 'package:shia_game_flutter/features/intro/presentation/binding/intro_binding.dart';
import 'package:shia_game_flutter/features/intro/presentation/ui/intro_page.dart';
+import 'package:shia_game_flutter/features/master/presentation/binding/master_binding.dart';
+import 'package:shia_game_flutter/features/master/presentation/ui/master_page.dart';
+import 'package:shia_game_flutter/features/profile/presentation/binding/profile_binding.dart';
+import 'package:shia_game_flutter/features/profile/presentation/ui/profile_page.dart';
import 'package:shia_game_flutter/features/sample/presentation/binding/sample_binding.dart';
import 'package:shia_game_flutter/features/sample/presentation/ui/sample_page.dart';
import 'package:get/get.dart';
+import 'package:shia_game_flutter/features/shop/presentation/binding/shop_binding.dart';
+import 'package:shia_game_flutter/features/shop/presentation/ui/shop_page.dart';
class Routes {
static const Routes _i = Routes._internal();
@@ -11,6 +21,11 @@ class Routes {
static const String samplePage = '/sample_page';
static const String introPage = '/intro_page';
+ static const String masterPage = '/';
+ static const String homePage = '/home_page';
+ static const String shopPage = '/shop_page';
+ static const String awardsPage = '/awards_page';
+ static const String profilePage = '/profile_page';
}
List get appPages => [
@@ -24,4 +39,35 @@ List get appPages => [
page: () => const IntroPage(),
binding: IntroBinding(),
),
+ GetPage(
+ name: Routes.masterPage,
+ page: () => const MasterPage(),
+ binding: MasterBinding(),
+ children: [
+ GetPage(
+ name: Routes.homePage,
+ page: () => const HomePage(),
+ binding: HomeBinding(),
+ transition: Transition.fadeIn,
+ ),
+ GetPage(
+ name: Routes.shopPage,
+ page: () => const ShopPage(),
+ binding: ShopBinding(),
+ transition: Transition.fadeIn,
+ ),
+ GetPage(
+ name: Routes.awardsPage,
+ page: () => const AwardsPage(),
+ binding: AwardsBinding(),
+ transition: Transition.fadeIn,
+ ),
+ GetPage(
+ name: Routes.profilePage,
+ page: () => const ProfilePage(),
+ binding: ProfileBinding(),
+ transition: Transition.fadeIn,
+ ),
+ ],
+ ),
];
diff --git a/lib/core/widgets/app_bar/master_app_bar.dart b/lib/core/widgets/app_bar/master_app_bar.dart
new file mode 100644
index 0000000..483fdcb
--- /dev/null
+++ b/lib/core/widgets/app_bar/master_app_bar.dart
@@ -0,0 +1,57 @@
+import 'package:flutter/material.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_assets.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
+import 'package:shia_game_flutter/common_ui/theme/my_theme.dart';
+import 'package:shia_game_flutter/core/utils/gap.dart';
+import 'package:shia_game_flutter/core/widgets/app_bar/styles/app_bar_action.dart';
+import 'package:shia_game_flutter/core/widgets/app_bar/styles/app_bar_add_widget.dart';
+
+class MasterAppBar extends StatelessWidget implements PreferredSizeWidget {
+ const MasterAppBar({
+ super.key,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return AppBar(
+ backgroundColor: context.backgroundColor,
+ titleSpacing: MySpaces.s30,
+ title: Row(
+ children: [
+ AppBarAddWidget(
+ onTap: () {},
+ icon: MyAssets.iconDiamond,
+ number: 999,
+ gradientColors: [
+ Color(0XFF52C3ED),
+ Color(0XFF4F16A0),
+ ],
+ ),
+ MySpaces.s6.gapWidth,
+ AppBarAddWidget(
+ onTap: () {},
+ icon: MyAssets.iconFlash,
+ number: 54,
+ gradientColors: [
+ Color(0XFFEFB345),
+ Color(0XFF4F16A0),
+ ],
+ ),
+ Spacer(),
+ AppBarAction(
+ icon: MyAssets.iconShare,
+ onTap: () {},
+ ),
+ MySpaces.s12.gapWidth,
+ AppBarAction(
+ icon: MyAssets.iconSetting,
+ onTap: () {},
+ ),
+ ],
+ ),
+ );
+ }
+
+ @override
+ Size get preferredSize => Size.fromHeight(kToolbarHeight);
+}
diff --git a/lib/core/widgets/app_bar/styles/app_bar_action.dart b/lib/core/widgets/app_bar/styles/app_bar_action.dart
new file mode 100644
index 0000000..77c0b59
--- /dev/null
+++ b/lib/core/widgets/app_bar/styles/app_bar_action.dart
@@ -0,0 +1,37 @@
+import 'package:flutter/material.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
+import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
+
+class AppBarAction extends StatelessWidget {
+ const AppBarAction({super.key, this.icon, this.onTap});
+
+ final String? icon;
+ final VoidCallback? onTap;
+
+ @override
+ Widget build(BuildContext context) {
+ return InkWell(
+ onTap: onTap,
+ borderRadius: BorderRadius.all(Radius.circular(100)),
+ child: Ink(
+ width: MySpaces.s32,
+ height: MySpaces.s32,
+ padding: EdgeInsets.all(MySpaces.s6),
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ border: Border.all(
+ width: 1,
+ color: Color(0XFF6D2ADA),
+ strokeAlign: BorderSide.strokeAlignInside,
+ ),
+ gradient: LinearGradient(
+ begin: AlignmentDirectional.topStart,
+ end: AlignmentDirectional.bottomEnd,
+ colors: [Color(0XFF823FEB), Color(0XFF4F09BF)],
+ ),
+ ),
+ child: MyImage(asset: icon ?? ''),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/lib/core/widgets/app_bar/styles/app_bar_add_widget.dart b/lib/core/widgets/app_bar/styles/app_bar_add_widget.dart
new file mode 100644
index 0000000..092de31
--- /dev/null
+++ b/lib/core/widgets/app_bar/styles/app_bar_add_widget.dart
@@ -0,0 +1,77 @@
+
+import 'package:flutter/material.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_assets.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
+import 'package:shia_game_flutter/common_ui/theme/my_theme.dart';
+import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
+
+class AppBarAddWidget extends StatelessWidget {
+ const AppBarAddWidget({
+ super.key,
+ this.icon,
+ this.number,
+ this.onTap,
+ this.gradientColors,
+ });
+
+ final String? icon;
+ final int? number;
+ final VoidCallback? onTap;
+ final List? gradientColors;
+
+ @override
+ Widget build(BuildContext context) {
+ return InkWell(
+ onTap: onTap,
+ borderRadius: BorderRadius.all(Radius.circular(100)),
+ child: Ink(
+ width: 96,
+ height: 32,
+ padding: EdgeInsets.all(1),
+ decoration: ShapeDecoration(
+ shape: StadiumBorder(),
+ gradient: LinearGradient(
+ begin: AlignmentDirectional.topStart,
+ end: AlignmentDirectional.bottomEnd,
+ colors: gradientColors ?? [],
+ ),
+ ),
+ child: Ink(
+ padding: EdgeInsetsDirectional.only(
+ start: MySpaces.s8,
+ end: MySpaces.s4,
+ ),
+ decoration: ShapeDecoration(
+ shape: StadiumBorder(),
+ color: context.backgroundColor,
+ ),
+ child: Row(
+ children: [
+ MyImage(asset: icon ?? ''),
+ Expanded(
+ child: Text(
+ '$number',
+ maxLines: 1,
+ textAlign: TextAlign.center,
+ overflow: TextOverflow.ellipsis,
+ style: Lexend.bold.copyWith(fontSize: 12),
+ ),
+ ),
+ Container(
+ width: 23,
+ height: 23,
+ padding: EdgeInsets.all(MySpaces.s6),
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ color: Color(0XFF4F09BF),
+ ),
+ child: MyImage(asset: MyAssets.iconPlus),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart b/lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart
new file mode 100644
index 0000000..307782f
--- /dev/null
+++ b/lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart
@@ -0,0 +1,81 @@
+import 'package:flutter/material.dart';
+import 'package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart';
+import 'package:get/get_state_manager/src/simple/get_view.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
+import 'package:shia_game_flutter/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart';
+import 'package:shia_game_flutter/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart';
+import 'package:shia_game_flutter/features/master/presentation/controller/master_controller.dart';
+
+class BottomNavBar extends GetView {
+ const BottomNavBar({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ clipBehavior: Clip.none,
+ padding: EdgeInsets.symmetric(
+ horizontal: MySpaces.s30
+ ),
+ decoration: BoxDecoration(
+ gradient: RadialGradient(
+ radius: 2.5,
+ colors: [Color(0XFF4F09BF), Color(0XFF250459)],
+ ),
+ ),
+ child: Obx(
+ () => BottomNavigationBar(
+ onTap: (int index) => controller.onChangeBottomNavBar(index),
+ currentIndex: controller.selectedIndex.value,
+ backgroundColor: Colors.transparent,
+ elevation: 0,
+ type: BottomNavigationBarType.fixed,
+ unselectedFontSize: 8,
+ selectedFontSize: 8,
+ unselectedLabelStyle: Lexend.bold,
+ selectedLabelStyle: Lexend.bold,
+ showSelectedLabels: false,
+ showUnselectedLabels: false,
+ items: List.generate(
+ controller.bottomNavList.length,
+ (index) => index == 3
+ ? _bottomNavBarProfileItem(index)
+ : _bottomNavBarItem(index),
+ ),
+ ),
+ ),
+ );
+ }
+
+ BottomNavigationBarItem _bottomNavBarItem(int index) {
+ return BottomNavigationBarItem(
+ icon: Opacity(
+ opacity: 0.7,
+ child: BottomNavBarItem(
+ bottomNavEntity: controller.bottomNavList[index],
+ ),
+ ),
+ activeIcon: BottomNavBarItem(
+ bottomNavEntity: controller.bottomNavList[index],
+ ),
+ label: controller.bottomNavList[index].title,
+ tooltip: controller.bottomNavList[index].title,
+ );
+ }
+
+ BottomNavigationBarItem _bottomNavBarProfileItem(int index) {
+ return BottomNavigationBarItem(
+ icon: Opacity(
+ opacity: 0.7,
+ child: BottomNavBarProfileItem(
+ bottomNavEntity: controller.bottomNavList[index],
+ ),
+ ),
+ activeIcon: BottomNavBarProfileItem(
+ bottomNavEntity: controller.bottomNavList[index],
+ ),
+ label: controller.bottomNavList[index].title,
+ tooltip: controller.bottomNavList[index].title,
+ );
+ }
+}
diff --git a/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart b/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart
new file mode 100644
index 0000000..5ffb738
--- /dev/null
+++ b/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart
@@ -0,0 +1,26 @@
+import 'package:flutter/material.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
+import 'package:shia_game_flutter/core/utils/gap.dart';
+import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
+import 'package:shia_game_flutter/features/master/domain/entity/bottom_nav_entity.dart';
+
+class BottomNavBarItem extends StatelessWidget {
+ const BottomNavBarItem({super.key, required this.bottomNavEntity});
+
+ final BottomNavEntity bottomNavEntity;
+
+ @override
+ Widget build(BuildContext context) {
+ return Column(
+ children: [
+ MyImage(asset: bottomNavEntity.icon ?? ''),
+ MySpaces.s4.gapHeight,
+ Text(
+ bottomNavEntity.title ?? '',
+ style: Lexend.bold.copyWith(fontSize: MySpaces.s8),
+ ),
+ ],
+ );
+ }
+}
diff --git a/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart b/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart
new file mode 100644
index 0000000..fe3f58f
--- /dev/null
+++ b/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart
@@ -0,0 +1,38 @@
+import 'package:flutter/material.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
+import 'package:shia_game_flutter/core/utils/gap.dart';
+import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
+import 'package:shia_game_flutter/features/master/domain/entity/bottom_nav_entity.dart';
+
+class BottomNavBarProfileItem extends StatelessWidget {
+ const BottomNavBarProfileItem({super.key, required this.bottomNavEntity});
+
+ final BottomNavEntity bottomNavEntity;
+
+ @override
+ Widget build(BuildContext context) {
+ return Column(
+ children: [
+ Container(
+ height: 26,
+ width: 26,
+ padding: EdgeInsets.all(3),
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ border: Border.all(
+ width: 1,
+ color: Color(0XFFF4EEFF),
+ )
+ ),
+ child: MyImage(asset: bottomNavEntity.icon ?? ''),
+ ),
+ MySpaces.s4.gapHeight,
+ Text(
+ bottomNavEntity.title ?? '',
+ style: Lexend.bold.copyWith(fontSize: MySpaces.s8),
+ ),
+ ],
+ );
+ }
+}
diff --git a/lib/core/widgets/container/gradient_container.dart b/lib/core/widgets/container/gradient_container.dart
new file mode 100644
index 0000000..f7a41d8
--- /dev/null
+++ b/lib/core/widgets/container/gradient_container.dart
@@ -0,0 +1,78 @@
+import 'package:flutter/material.dart';
+
+class GradientContainer extends StatelessWidget {
+ const GradientContainer({
+ super.key,
+ this.width,
+ this.height,
+ this.margin,
+ this.padding,
+ this.shapeBorder,
+ this.boxShape,
+ this.borderGradient,
+ this.borderRadius,
+ this.boxShadow,
+ this.color,
+ this.child,
+ this.image,
+ this.gradient,
+ this.borderColor,
+ });
+
+ final double? width;
+ final double? height;
+ final EdgeInsetsGeometry? margin;
+ final EdgeInsetsGeometry? padding;
+ final ShapeBorder? shapeBorder;
+ final BoxShape? boxShape;
+ final Gradient? borderGradient;
+ final Gradient? gradient;
+ final BorderRadiusGeometry? borderRadius;
+ final List? boxShadow;
+ final Color? color;
+ final Color? borderColor;
+ final Widget? child;
+ final DecorationImage? image;
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ padding: EdgeInsets.all(1),
+ width: width,
+ height: height,
+ margin: margin,
+ decoration: shapeBorder == null
+ ? BoxDecoration(
+ shape: boxShape ?? BoxShape.rectangle,
+ gradient: borderGradient,
+ borderRadius: borderRadius,
+ boxShadow: boxShadow,
+ color: borderColor,
+ )
+ : ShapeDecoration(
+ shape: shapeBorder!,
+ gradient: borderGradient,
+ shadows: boxShadow,
+ color: borderColor,
+ ),
+ child: Container(
+ padding: padding,
+ decoration: shapeBorder == null
+ ? BoxDecoration(
+ shape: boxShape ?? BoxShape.rectangle,
+ gradient: gradient,
+ borderRadius: borderRadius,
+ color: color,
+ image: image,
+ )
+ : ShapeDecoration(
+ shape: shapeBorder!,
+ gradient: gradient,
+ color: color,
+ image: image,
+ ),
+ child: child,
+ ),
+ );
+ }
+}
diff --git a/lib/features/awards/data/datasource/awards_datasource.dart b/lib/features/awards/data/datasource/awards_datasource.dart
new file mode 100644
index 0000000..33ebc37
--- /dev/null
+++ b/lib/features/awards/data/datasource/awards_datasource.dart
@@ -0,0 +1,28 @@
+import 'package:shia_game_flutter/core/constants/my_api.dart';
+import 'package:shia_game_flutter/core/network/http_request.dart';
+import 'package:shia_game_flutter/core/params/awards_params.dart';
+import 'package:shia_game_flutter/core/response/base_response.dart';
+import 'package:shia_game_flutter/features/awards/data/model/awards_model.dart';
+import 'package:shia_game_flutter/features/awards/domain/entity/awards_entity.dart';
+
+abstract class IAwardsDatasource {
+ Future getData({required AwardsParams params});
+}
+
+class AwardsDatasourceImpl implements IAwardsDatasource {
+ final IHttpRequest httpRequest;
+
+ const AwardsDatasourceImpl(this.httpRequest);
+
+ @override
+ Future getData({required AwardsParams params}) async {
+ final response = await httpRequest.get(
+ path: MyApi.baseUrl,
+ );
+
+ return BaseResponse.getData(
+ response?['data'],
+ (json) => AwardsModel.fromJson(json),
+ );
+ }
+}
diff --git a/lib/features/awards/data/model/awards_model.dart b/lib/features/awards/data/model/awards_model.dart
new file mode 100644
index 0000000..5002ffc
--- /dev/null
+++ b/lib/features/awards/data/model/awards_model.dart
@@ -0,0 +1,13 @@
+import 'package:shia_game_flutter/features/awards/domain/entity/awards_entity.dart';
+
+class AwardsModel extends AwardsEntity {
+ const AwardsModel({
+ super.id,
+ });
+
+ factory AwardsModel.fromJson(Map json) {
+ return AwardsModel(
+ id: json['id'],
+ );
+ }
+}
diff --git a/lib/features/awards/data/repository_impl/awards_repository_impl.dart b/lib/features/awards/data/repository_impl/awards_repository_impl.dart
new file mode 100644
index 0000000..91f3ab9
--- /dev/null
+++ b/lib/features/awards/data/repository_impl/awards_repository_impl.dart
@@ -0,0 +1,29 @@
+import 'package:flutter/foundation.dart';
+import 'package:shia_game_flutter/core/error_handler/my_exception.dart';
+import 'package:shia_game_flutter/core/params/awards_params.dart';
+import 'package:shia_game_flutter/core/utils/data_state.dart';
+import 'package:shia_game_flutter/features/awards/data/datasource/awards_datasource.dart';
+import 'package:shia_game_flutter/features/awards/domain/entity/awards_entity.dart';
+import 'package:shia_game_flutter/features/awards/domain/repository/awards_repository.dart';
+
+class AwardsRepositoryImpl implements IAwardsRepository {
+ final IAwardsDatasource datasource;
+
+ const AwardsRepositoryImpl(this.datasource);
+
+ @override
+ Future> getData({required AwardsParams params}) async {
+ try {
+ final AwardsEntity response = await datasource.getData(params: params);
+ return DataState.success(response);
+ } on MyException catch (e) {
+ return DataState.error(e);
+ } catch (e) {
+ if (kDebugMode) {
+ rethrow;
+ } else {
+ return DataState.error(MyException(errorMessage: '$e'));
+ }
+ }
+ }
+}
diff --git a/lib/features/awards/domain/entity/awards_entity.dart b/lib/features/awards/domain/entity/awards_entity.dart
new file mode 100644
index 0000000..edfb882
--- /dev/null
+++ b/lib/features/awards/domain/entity/awards_entity.dart
@@ -0,0 +1,14 @@
+import 'package:equatable/equatable.dart';
+
+class AwardsEntity extends Equatable {
+ final int? id;
+
+ const AwardsEntity({
+ this.id,
+ });
+
+ @override
+ List