diff --git a/assets/images/book_1.jpg b/assets/images/book_1.jpg
new file mode 100644
index 0000000..26ce944
Binary files /dev/null and b/assets/images/book_1.jpg differ
diff --git a/assets/images/book_2.jpg b/assets/images/book_2.jpg
new file mode 100644
index 0000000..5b99c7c
Binary files /dev/null and b/assets/images/book_2.jpg differ
diff --git a/assets/images/book_3.png b/assets/images/book_3.png
new file mode 100644
index 0000000..c734a28
Binary files /dev/null and b/assets/images/book_3.png differ
diff --git a/assets/images/boost_1.png b/assets/images/boost_1.png
new file mode 100644
index 0000000..eb9efec
Binary files /dev/null and b/assets/images/boost_1.png differ
diff --git a/assets/images/boost_2.png b/assets/images/boost_2.png
new file mode 100644
index 0000000..8026adb
Binary files /dev/null and b/assets/images/boost_2.png differ
diff --git a/assets/images/boost_3.png b/assets/images/boost_3.png
new file mode 100644
index 0000000..bd8d58d
Binary files /dev/null and b/assets/images/boost_3.png differ
diff --git a/assets/images/boost_4.png b/assets/images/boost_4.png
new file mode 100644
index 0000000..796cd6b
Binary files /dev/null and b/assets/images/boost_4.png differ
diff --git a/assets/images/character_1.png b/assets/images/character_1.png
new file mode 100644
index 0000000..4d1e1d6
Binary files /dev/null and b/assets/images/character_1.png differ
diff --git a/assets/images/character_2.png b/assets/images/character_2.png
new file mode 100644
index 0000000..5814b66
Binary files /dev/null and b/assets/images/character_2.png differ
diff --git a/assets/images/character_3.png b/assets/images/character_3.png
new file mode 100644
index 0000000..bd93e19
Binary files /dev/null and b/assets/images/character_3.png differ
diff --git a/assets/images/done.png b/assets/images/done.png
new file mode 100644
index 0000000..62226f3
Binary files /dev/null and b/assets/images/done.png differ
diff --git a/assets/images/gem_1.png b/assets/images/gem_1.png
new file mode 100644
index 0000000..550cf77
Binary files /dev/null and b/assets/images/gem_1.png differ
diff --git a/assets/images/gem_2.png b/assets/images/gem_2.png
new file mode 100644
index 0000000..ed98414
Binary files /dev/null and b/assets/images/gem_2.png differ
diff --git a/assets/images/gem_3.png b/assets/images/gem_3.png
new file mode 100644
index 0000000..16253a1
Binary files /dev/null and b/assets/images/gem_3.png differ
diff --git a/assets/images/gem_4.png b/assets/images/gem_4.png
new file mode 100644
index 0000000..9b47010
Binary files /dev/null and b/assets/images/gem_4.png differ
diff --git a/assets/images/member_1.png b/assets/images/member_1.png
new file mode 100644
index 0000000..d549a03
Binary files /dev/null and b/assets/images/member_1.png differ
diff --git a/assets/images/member_2.png b/assets/images/member_2.png
new file mode 100644
index 0000000..0e5cd98
Binary files /dev/null and b/assets/images/member_2.png differ
diff --git a/assets/images/member_3.png b/assets/images/member_3.png
new file mode 100644
index 0000000..4b2ae22
Binary files /dev/null and b/assets/images/member_3.png differ
diff --git a/assets/images/member_4.png b/assets/images/member_4.png
new file mode 100644
index 0000000..b8bee5a
Binary files /dev/null and b/assets/images/member_4.png differ
diff --git a/assets/svg/gem.svg b/assets/svg/gem.svg
new file mode 100644
index 0000000..f5e9a53
--- /dev/null
+++ b/assets/svg/gem.svg
@@ -0,0 +1,51 @@
+
diff --git a/assets/svg/icon_info.svg b/assets/svg/icon_info.svg
new file mode 100644
index 0000000..ddc1e96
--- /dev/null
+++ b/assets/svg/icon_info.svg
@@ -0,0 +1,10 @@
+
diff --git a/assets/svg/lock.svg b/assets/svg/lock.svg
new file mode 100644
index 0000000..cb28e68
--- /dev/null
+++ b/assets/svg/lock.svg
@@ -0,0 +1,9 @@
+
diff --git a/lib/common_ui/resources/my_assets.dart b/lib/common_ui/resources/my_assets.dart
index f3092c6..d6a78dc 100644
--- a/lib/common_ui/resources/my_assets.dart
+++ b/lib/common_ui/resources/my_assets.dart
@@ -16,6 +16,25 @@ class MyAssets {
static const String mic = 'assets/images/mic.png';
static const String micBLur = 'assets/images/mic_blur.png';
static const String sampleAvatar = 'assets/images/sample_avatar.png';
+ static const String gem1 = 'assets/images/gem_1.png';
+ static const String gem2 = 'assets/images/gem_2.png';
+ static const String gem3 = 'assets/images/gem_3.png';
+ static const String gem4 = 'assets/images/gem_4.png';
+ static const String book1 = 'assets/images/book_1.jpg';
+ static const String book2 = 'assets/images/book_2.jpg';
+ static const String book3 = 'assets/images/book_3.png';
+ static const String boost1 = 'assets/images/boost_1.png';
+ static const String boost2 = 'assets/images/boost_2.png';
+ static const String boost3 = 'assets/images/boost_3.png';
+ static const String boost4 = 'assets/images/boost_4.png';
+ static const String character1 = 'assets/images/character_1.png';
+ static const String character2 = 'assets/images/character_2.png';
+ static const String character3 = 'assets/images/character_3.png';
+ static const String member1 = 'assets/images/member_1.png';
+ static const String member2 = 'assets/images/member_2.png';
+ static const String member3 = 'assets/images/member_3.png';
+ static const String member4 = 'assets/images/member_4.png';
+ static const String done = 'assets/images/done.png';
/// ----- Svg -----
static const String sampleSvg = 'assets/svg/sample.svg';
@@ -32,6 +51,10 @@ class MyAssets {
static const String introStar = 'assets/svg/intro_star.svg';
static const String iconLocation = 'assets/svg/icon_location.svg';
static const String iconLogout = 'assets/svg/icon_logout.svg';
+ static const String iconInfo = 'assets/svg/icon_info.svg';
+ static const String gem = 'assets/svg/gem.svg';
+ static const String lock = 'assets/svg/lock.svg';
+
/// ----- Audios -----
static const String sampleAudio = 'assets/audios/sample.mp3';
diff --git a/lib/core/utils/number_format.dart b/lib/core/utils/number_format.dart
new file mode 100644
index 0000000..c594116
--- /dev/null
+++ b/lib/core/utils/number_format.dart
@@ -0,0 +1,11 @@
+extension NumberFormat on double? {
+ num get priceFormat {
+ if (this == null) {
+ return 0;
+ }
+ if (this! % 1 == 0) {
+ return this!.toInt();
+ }
+ return this!;
+ }
+}
diff --git a/lib/core/widgets/app_bar/styles/app_bar_action.dart b/lib/core/widgets/app_bar/styles/app_bar_action.dart
index 77c0b59..d1142ab 100644
--- a/lib/core/widgets/app_bar/styles/app_bar_action.dart
+++ b/lib/core/widgets/app_bar/styles/app_bar_action.dart
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
+import 'package:shia_game_flutter/core/widgets/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
class AppBarAction extends StatelessWidget {
@@ -10,28 +11,19 @@ class AppBarAction extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return InkWell(
+ return MyContainer(
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 ?? ''),
+ width: MySpaces.s32,
+ height: MySpaces.s32,
+ padding: EdgeInsets.all(MySpaces.s6),
+ boxShape: BoxShape.circle,
+ borderColor: Color(0XFF6D2ADA),
+ 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
index 092de31..7e9ef77 100644
--- a/lib/core/widgets/app_bar/styles/app_bar_add_widget.dart
+++ b/lib/core/widgets/app_bar/styles/app_bar_add_widget.dart
@@ -4,6 +4,7 @@ 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/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
class AppBarAddWidget extends StatelessWidget {
@@ -22,55 +23,43 @@ class AppBarAddWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return InkWell(
+ return MyContainer(
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,
+ width: 96,
+ height: 32,
+ borderRadius: BorderRadius.all(Radius.circular(50)),
+ borderGradient: LinearGradient(
+ begin: AlignmentDirectional.topStart,
+ end: AlignmentDirectional.bottomEnd,
+ colors: gradientColors ?? [],
+ ),
+ padding: EdgeInsetsDirectional.only(
+ start: MySpaces.s8,
+ end: MySpaces.s4,
+ ),
+ 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),
+ ),
),
- 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),
- ),
- ],
+ MyContainer(
+ onTap: onTap,
+ width: 23,
+ height: 23,
+ padding: EdgeInsets.all(5),
+ color: Color(0XFF4F09BF),
+ boxShape: BoxShape.circle,
+ child: MyImage(asset: MyAssets.iconPlus),
),
- ),
+ ],
),
);
}
diff --git a/lib/core/widgets/background/my_background.dart b/lib/core/widgets/background/my_background.dart
index 7252a15..54c5604 100644
--- a/lib/core/widgets/background/my_background.dart
+++ b/lib/core/widgets/background/my_background.dart
@@ -3,9 +3,10 @@ import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
import 'package:shia_game_flutter/common_ui/theme/my_theme.dart';
class MyBackground extends StatelessWidget {
- const MyBackground({super.key, required this.child});
+ const MyBackground({super.key, this.child, this.listChild});
- final Widget child;
+ final Widget? child;
+ final Widget? listChild;
@override
Widget build(BuildContext context) {
@@ -16,7 +17,7 @@ class MyBackground extends StatelessWidget {
colors: [const Color(0xFF321A6D), context.backgroundColor],
),
),
- child: SingleChildScrollView(
+ child: listChild ?? SingleChildScrollView(
padding: EdgeInsets.symmetric(horizontal: MySpaces.s30),
child: child,
),
diff --git a/lib/core/widgets/button/enum/my_button_type.dart b/lib/core/widgets/button/enum/my_button_type.dart
new file mode 100644
index 0000000..d9ddab5
--- /dev/null
+++ b/lib/core/widgets/button/enum/my_button_type.dart
@@ -0,0 +1,4 @@
+enum MyButtonType {
+ defaultType,
+ activeType,
+}
\ No newline at end of file
diff --git a/lib/core/widgets/button/my_gradient_button.dart b/lib/core/widgets/button/my_gradient_button.dart
index 133fee4..9a69c50 100644
--- a/lib/core/widgets/button/my_gradient_button.dart
+++ b/lib/core/widgets/button/my_gradient_button.dart
@@ -1,45 +1,39 @@
import 'package:flutter/material.dart';
-import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
-import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart';
+import 'package:shia_game_flutter/core/widgets/button/enum/my_button_type.dart';
+import 'package:shia_game_flutter/core/widgets/button/styles/active_style.dart';
+import 'package:shia_game_flutter/core/widgets/button/styles/default_style.dart';
class MyGradientButton extends StatelessWidget {
- const MyGradientButton({super.key});
+ const MyGradientButton({
+ super.key,
+ this.onTap,
+ this.title,
+ this.fontSize,
+ this.icon,
+ this.type = MyButtonType.defaultType,
+ });
+
+ final VoidCallback? onTap;
+ final String? title;
+ final double? fontSize;
+ final Widget? icon;
+ final MyButtonType type;
@override
Widget build(BuildContext context) {
- return GradientContainer(
- height: 32,
- width: 116,
- onTap: () {},
- borderColor: Color(0XFF6D2ADA),
- borderRadius: BorderRadius.all(Radius.circular(5)),
- gradient: LinearGradient(
- begin: AlignmentDirectional.topStart,
- end: AlignmentDirectional.bottomEnd,
- colors: [Color(0XFF823FEB), Color(0XFF4F09BF)],
+ return switch (type) {
+ MyButtonType.defaultType => DefaultStyle(
+ onTap: onTap,
+ title: title,
+ fontSize: fontSize,
+ icon: icon,
),
- child: ShaderMask(
- blendMode: BlendMode.modulate,
- shaderCallback: (bounds) => LinearGradient(
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- colors: [Color(0XFFFFFFFF), Color(0XFFFFFFFF), Color(0XFF9C8CC2)],
- ).createShader(bounds),
- child: Text(
- 'Change Profile',
- style: Lexend.extraBold.copyWith(
- fontSize: 12,
- shadows: [
- BoxShadow(
- color: Color(0xFF1B0D31),
- blurRadius: 0,
- offset: Offset(0, 1.69),
- spreadRadius: 0,
- ),
- ],
- ),
- ),
+ MyButtonType.activeType => ActiveStyle(
+ onTap: onTap,
+ title: title,
+ fontSize: fontSize,
+ icon: icon,
),
- );
+ };
}
}
diff --git a/lib/core/widgets/button/styles/active_style.dart b/lib/core/widgets/button/styles/active_style.dart
new file mode 100644
index 0000000..1ad6b75
--- /dev/null
+++ b/lib/core/widgets/button/styles/active_style.dart
@@ -0,0 +1,58 @@
+import 'package:flutter/material.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
+import 'package:shia_game_flutter/core/utils/gap.dart';
+import 'package:shia_game_flutter/core/widgets/container/my_container.dart';
+import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart';
+
+class ActiveStyle extends StatelessWidget {
+ const ActiveStyle({
+ super.key,
+ this.onTap,
+ this.title,
+ this.fontSize,
+ this.icon,
+ });
+
+ final VoidCallback? onTap;
+ final String? title;
+ final double? fontSize;
+ final Widget? icon;
+
+ @override
+ Widget build(BuildContext context) {
+ return MyContainer(
+ height: 32,
+ width: 116,
+ onTap: onTap,
+ borderRadius: BorderRadius.all(Radius.circular(5)),
+ borderGradient: LinearGradient(
+ begin: AlignmentDirectional.centerStart,
+ end: AlignmentDirectional.centerEnd,
+ colors: [
+ Color(0xFF2E7630),
+ Color(0xFF2E7630).withValues(alpha: 0),
+ ]
+ ),
+ color: Color(0XFF172A19),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ GradientText(
+ text: title,
+ gradientColor: [
+ Color(0XFF54C221),
+ Color(0XFF358111),
+ ],
+ shadowColor: Color(0xFF0A1F0F),
+ offset: Offset(0, 1.69),
+ fontSize: fontSize ?? 12,
+ ),
+ if (icon != null) ...{
+ MySpaces.s6.gapWidth,
+ icon ?? SizedBox.shrink(),
+ },
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/core/widgets/button/styles/default_style.dart b/lib/core/widgets/button/styles/default_style.dart
new file mode 100644
index 0000000..c2fd407
--- /dev/null
+++ b/lib/core/widgets/button/styles/default_style.dart
@@ -0,0 +1,52 @@
+import 'package:flutter/material.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
+import 'package:shia_game_flutter/core/utils/gap.dart';
+import 'package:shia_game_flutter/core/widgets/container/my_container.dart';
+import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart';
+
+class DefaultStyle extends StatelessWidget {
+ const DefaultStyle({
+ super.key,
+ this.onTap,
+ this.title,
+ this.fontSize,
+ this.icon,
+ });
+
+ final VoidCallback? onTap;
+ final String? title;
+ final double? fontSize;
+ final Widget? icon;
+
+ @override
+ Widget build(BuildContext context) {
+ return MyContainer(
+ height: 32,
+ width: 116,
+ onTap: onTap,
+ borderColor: Color(0XFF6D2ADA),
+ borderRadius: BorderRadius.all(Radius.circular(5)),
+ gradient: LinearGradient(
+ begin: AlignmentDirectional.topStart,
+ end: AlignmentDirectional.bottomEnd,
+ colors: [Color(0XFF823FEB), Color(0XFF4F09BF)],
+ ),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ GradientText(
+ text: title,
+ color: Color(0XFF9C8CC2),
+ shadowColor: Color(0xFF1B0D31),
+ offset: Offset(0, 1.69),
+ fontSize: fontSize ?? 12,
+ ),
+ if (icon != null) ...{
+ MySpaces.s6.gapWidth,
+ icon ?? SizedBox.shrink(),
+ },
+ ],
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/lib/core/widgets/container/gradient_container.dart b/lib/core/widgets/container/my_container.dart
similarity index 51%
rename from lib/core/widgets/container/gradient_container.dart
rename to lib/core/widgets/container/my_container.dart
index ab1cacf..76e9f22 100644
--- a/lib/core/widgets/container/gradient_container.dart
+++ b/lib/core/widgets/container/my_container.dart
@@ -1,13 +1,12 @@
import 'package:flutter/material.dart';
import 'package:shia_game_flutter/common_ui/theme/my_theme.dart';
-class GradientContainer extends StatelessWidget {
- const GradientContainer({
+class MyContainer extends StatelessWidget {
+ const MyContainer({
super.key,
this.width,
this.height,
this.padding,
- this.shapeBorder,
this.boxShape,
this.borderGradient,
this.borderRadius,
@@ -18,12 +17,12 @@ class GradientContainer extends StatelessWidget {
this.gradient,
this.borderColor,
this.onTap,
+ this.inset,
});
final double? width;
final double? height;
final EdgeInsetsGeometry? padding;
- final ShapeBorder? shapeBorder;
final BoxShape? boxShape;
final Gradient? borderGradient;
final Gradient? gradient;
@@ -34,52 +33,43 @@ class GradientContainer extends StatelessWidget {
final Widget? child;
final DecorationImage? image;
final VoidCallback? onTap;
+ final bool? inset;
@override
Widget build(BuildContext context) {
return Material(
color: context.noColor,
- borderRadius: borderRadius,
+ borderRadius: boxShape == BoxShape.circle
+ ? BorderRadius.all(Radius.circular(100))
+ : borderRadius,
shadowColor: boxShadow?.first.color,
elevation: boxShadow?.first.blurRadius ?? 0,
- shape: shapeBorder,
child: InkWell(
onTap: onTap,
customBorder: RoundedRectangleBorder(
- borderRadius: borderRadius ?? BorderRadius.zero,
+ borderRadius: boxShape == BoxShape.circle
+ ? BorderRadius.all(Radius.circular(100))
+ : borderRadius ?? BorderRadius.zero,
),
child: Ink(
padding: EdgeInsets.all(1),
width: width,
height: height,
- decoration: shapeBorder == null
- ? BoxDecoration(
- shape: boxShape ?? BoxShape.rectangle,
- gradient: borderGradient,
- borderRadius: borderRadius,
- color: borderColor,
- )
- : ShapeDecoration(
- shape: shapeBorder!,
- gradient: borderGradient,
- color: borderColor,
- ),
+ decoration: BoxDecoration(
+ shape: boxShape ?? BoxShape.rectangle,
+ gradient: borderGradient,
+ borderRadius: borderRadius,
+ color: borderColor,
+ ),
child: Ink(
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,
- ),
+ decoration: BoxDecoration(
+ shape: boxShape ?? BoxShape.rectangle,
+ gradient: gradient,
+ borderRadius: borderRadius,
+ color: color,
+ image: image,
+ ),
child: Center(child: child),
),
),
diff --git a/lib/core/widgets/text/gradient_text.dart b/lib/core/widgets/text/gradient_text.dart
new file mode 100644
index 0000000..ed0ec13
--- /dev/null
+++ b/lib/core/widgets/text/gradient_text.dart
@@ -0,0 +1,60 @@
+import 'package:flutter/material.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
+import 'package:shia_game_flutter/common_ui/theme/my_theme.dart';
+
+class GradientText extends StatelessWidget {
+ const GradientText({
+ super.key,
+ this.text,
+ this.color = const Color(0xFFFFFFFF),
+ this.gradientColor,
+ this.fontSize = 14,
+ this.shadowColor = const Color(0xFF000000),
+ this.blurRadius = 0,
+ this.spreadRadius = 0,
+ this.offset = Offset.zero,
+ this.textAlign,
+ });
+
+ final String? text;
+ final Color color;
+ final List? gradientColor;
+ final double? fontSize;
+ final Color shadowColor;
+ final double blurRadius;
+ final double spreadRadius;
+ final Offset offset;
+ final TextAlign? textAlign;
+
+ @override
+ Widget build(BuildContext context) {
+ return ShaderMask(
+ blendMode: BlendMode.modulate,
+ shaderCallback: (bounds) => LinearGradient(
+ begin: Alignment.topCenter,
+ end: Alignment.bottomCenter,
+ colors: gradientColor ?? [
+ context.primaryColor,
+ context.primaryColor,
+ color,
+ ],
+ ).createShader(bounds),
+ child: Text(
+ text ?? '',
+ textAlign: textAlign,
+ maxLines: 1,
+ style: Lexend.extraBold.copyWith(
+ fontSize: fontSize,
+ shadows: [
+ BoxShadow(
+ color: shadowColor,
+ blurRadius: blurRadius,
+ offset: offset,
+ spreadRadius: spreadRadius,
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/features/home/presentation/pages/home_page.dart b/lib/features/home/presentation/pages/home_page.dart
index 878a860..d3df729 100644
--- a/lib/features/home/presentation/pages/home_page.dart
+++ b/lib/features/home/presentation/pages/home_page.dart
@@ -3,9 +3,11 @@ import 'package:get/get.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/core/utils/gap.dart';
+import 'package:shia_game_flutter/core/utils/my_localization.dart';
import 'package:shia_game_flutter/core/widgets/background/my_background.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
import 'package:shia_game_flutter/features/home/presentation/controller/home_controller.dart';
+import 'package:shia_game_flutter/features/home/presentation/pages/widgets/enums/custom_widget_type.dart';
import 'package:shia_game_flutter/features/home/presentation/pages/widgets/home_battle_cast.dart';
import 'package:shia_game_flutter/features/home/presentation/pages/widgets/home_battle_league.dart';
import 'package:shia_game_flutter/features/home/presentation/pages/widgets/home_custom_widget.dart';
@@ -25,7 +27,7 @@ class HomePage extends GetView {
HomeMembership(),
HomeBattleLeague(),
MySpaces.s20.gapHeight,
- _customWidgets(),
+ _customWidgets(context),
MySpaces.s20.gapHeight,
HomeBattleCast(),
],
@@ -33,14 +35,14 @@ class HomePage extends GetView {
);
}
- Widget _customWidgets() {
+ Widget _customWidgets(BuildContext context) {
return Row(
spacing: MySpaces.s22,
children: [
Expanded(
child: HomeCustomWidget(
type: CustomWidgetType.customLeague,
- firstText: 'ongoing:',
+ firstText: '${context.translate.ongoing}:',
secondText:
'Saba Center League - Imam Hassan ministry London school',
),
@@ -48,8 +50,8 @@ class HomePage extends GetView {
Expanded(
child: HomeCustomWidget(
type: CustomWidgetType.friendBattle,
- firstText: 'online:',
- secondText: 'No one\'s online',
+ firstText: '${context.translate.online}:',
+ secondText: context.translate.no_one_online,
),
),
],
diff --git a/lib/features/home/presentation/pages/widgets/enums/custom_widget_type.dart b/lib/features/home/presentation/pages/widgets/enums/custom_widget_type.dart
new file mode 100644
index 0000000..cc75f8e
--- /dev/null
+++ b/lib/features/home/presentation/pages/widgets/enums/custom_widget_type.dart
@@ -0,0 +1,73 @@
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_assets.dart';
+import 'package:shia_game_flutter/core/utils/my_localization.dart';
+import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart';
+
+enum CustomWidgetType {
+ customLeague,
+ friendBattle;
+
+ static Map get borderGradient => {
+ CustomWidgetType.customLeague: LinearGradient(
+ begin: AlignmentDirectional.topCenter,
+ end: AlignmentDirectional.bottomCenter,
+ colors: [Color(0XFF4BAD42), Color(0XFF147743)],
+ ),
+ CustomWidgetType.friendBattle: LinearGradient(
+ begin: AlignmentDirectional.topCenter,
+ end: AlignmentDirectional.bottomCenter,
+ colors: [Color(0XFFED9851), Color(0XFFC77041)],
+ ),
+ };
+
+ static Map get gradient => {
+ CustomWidgetType.customLeague: RadialGradient(
+ radius: 0.7,
+ center: Alignment(-0.6, -0.8),
+ colors: [Color(0XFF58AE23), Color(0XFF066A36)],
+ ),
+ CustomWidgetType.friendBattle: RadialGradient(
+ radius: 0.7,
+ center: Alignment(-0.6, -0.8),
+ colors: [Color(0XFFE99E53), Color(0XFFBC673A)],
+ ),
+ };
+
+ static Map get image => {
+ CustomWidgetType.customLeague: MyAssets.medal,
+ CustomWidgetType.friendBattle: MyAssets.friendBattle,
+ };
+
+ static Map get containerColor => {
+ CustomWidgetType.customLeague: Color(0XFF05542B),
+ CustomWidgetType.friendBattle: Color(0XFFA45A31),
+ };
+
+ static Map get firstTextColor => {
+ CustomWidgetType.customLeague: Color(0XFF4FDF94),
+ CustomWidgetType.friendBattle: Color(0XFFE3DFD5),
+ };
+
+ static Map get secondTextColor => {
+ CustomWidgetType.customLeague: Color(0XFF85C9A6),
+ CustomWidgetType.friendBattle: Color(0XFFDFBC9D),
+ };
+
+ static Map get title => {
+ CustomWidgetType.customLeague: GradientText(
+ text: Get.context?.translate.custom_league,
+ color: Color(0XFFBEF8DA),
+ shadowColor: Color(0xFF07592F),
+ blurRadius: 0.52,
+ offset: Offset(0, 1.04),
+ ),
+ CustomWidgetType.friendBattle: GradientText(
+ text: Get.context?.translate.friends_battle,
+ color: Color(0XFFFFB994),
+ shadowColor: Color(0xFFAA5B31),
+ blurRadius: 0.52,
+ offset: Offset(0, 1.04),
+ ),
+ };
+}
\ No newline at end of file
diff --git a/lib/features/home/presentation/pages/widgets/home_battle_cast.dart b/lib/features/home/presentation/pages/widgets/home_battle_cast.dart
index e3ea720..439f16a 100644
--- a/lib/features/home/presentation/pages/widgets/home_battle_cast.dart
+++ b/lib/features/home/presentation/pages/widgets/home_battle_cast.dart
@@ -4,8 +4,10 @@ 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/core/utils/gap.dart';
-import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart';
+import 'package:shia_game_flutter/core/utils/my_localization.dart';
+import 'package:shia_game_flutter/core/widgets/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
+import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart';
class HomeBattleCast extends StatelessWidget {
const HomeBattleCast({
@@ -18,7 +20,7 @@ class HomeBattleCast extends StatelessWidget {
alignment: Alignment.center,
clipBehavior: Clip.none,
children: [
- GradientContainer(
+ MyContainer(
height: 120,
borderRadius: BorderRadius.all(Radius.circular(MySpaces.s20)),
borderGradient: LinearGradient(
@@ -44,27 +46,13 @@ class HomeBattleCast extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.end,
children: [
- ShaderMask(
- blendMode: BlendMode.modulate,
- shaderCallback: (bounds) => LinearGradient(
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- colors: [Color(0XFFFFFFFF), Color(0XFFE4E3FF)],
- ).createShader(bounds),
- child: Text(
- 'Battle Cast',
- style: Lexend.extraBold.copyWith(
- fontSize: 22,
- shadows: [
- BoxShadow(
- color: Color(0xFF3C38C4),
- blurRadius: 0.52,
- offset: Offset(0, 1.04),
- spreadRadius: 0,
- ),
- ],
- ),
- ),
+ GradientText(
+ text: context.translate.battle_cast,
+ color: Color(0XFFE4E3FF),
+ offset: Offset(0, 1.04),
+ blurRadius: 0.52,
+ shadowColor: Color(0xFF3C38C4),
+ fontSize: 22,
),
MySpaces.s10.gapHeight,
Container(
@@ -96,7 +84,7 @@ class HomeBattleCast extends StatelessWidget {
PositionedDirectional(
start: -1,
top: -MySpaces.s4,
- child: GradientContainer(
+ child: MyContainer(
color: Color(0XFFCC9B22),
padding: EdgeInsets.symmetric(
vertical: MySpaces.s2,
diff --git a/lib/features/home/presentation/pages/widgets/home_battle_league.dart b/lib/features/home/presentation/pages/widgets/home_battle_league.dart
index 54eeaea..579f51e 100644
--- a/lib/features/home/presentation/pages/widgets/home_battle_league.dart
+++ b/lib/features/home/presentation/pages/widgets/home_battle_league.dart
@@ -3,9 +3,11 @@ 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/core/utils/gap.dart';
+import 'package:shia_game_flutter/core/utils/my_localization.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
-import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart';
+import 'package:shia_game_flutter/core/widgets/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
+import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart';
class HomeBattleLeague extends StatelessWidget {
const HomeBattleLeague({super.key});
@@ -15,7 +17,7 @@ class HomeBattleLeague extends StatelessWidget {
return Stack(
alignment: AlignmentDirectional.bottomEnd,
children: [
- GradientContainer(
+ MyContainer(
width: context.widthScreen,
height: 120,
padding: EdgeInsets.symmetric(
@@ -38,30 +40,16 @@ class HomeBattleLeague extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
context.widthScreen.gapWidth,
- ShaderMask(
- blendMode: BlendMode.modulate,
- shaderCallback: (bounds) => LinearGradient(
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- colors: [Color(0XFFFFFFFF), Color(0XFFCAA8FF)],
- ).createShader(bounds),
- child: Text(
- 'Battle League',
- style: Lexend.extraBold.copyWith(
- fontSize: 22,
- shadows: [
- BoxShadow(
- color: Color(0xFF3E1381),
- blurRadius: 0.84,
- offset: Offset(0, 1.69),
- spreadRadius: 0,
- ),
- ],
- ),
- ),
+ GradientText(
+ text: context.translate.battle_league,
+ color: Color(0XFFCAA8FF),
+ shadowColor: Color(0xFF3E1381),
+ blurRadius: 0.84,
+ offset: Offset(0, 1.69),
+ fontSize: 22,
),
Text(
- 'The faster you answer, the winner',
+ context.translate.answer_win,
style: Lexend.medium.copyWith(
fontSize: 10,
color: Color(0XFFA183D2),
diff --git a/lib/features/home/presentation/pages/widgets/home_custom_widget.dart b/lib/features/home/presentation/pages/widgets/home_custom_widget.dart
index dc8853e..eeaf067 100644
--- a/lib/features/home/presentation/pages/widgets/home_custom_widget.dart
+++ b/lib/features/home/presentation/pages/widgets/home_custom_widget.dart
@@ -1,112 +1,13 @@
import 'package:flutter/material.dart' hide BoxDecoration, BoxShadow;
import 'package:flutter_inset_box_shadow_update/flutter_inset_box_shadow_update.dart';
-import 'package:get/get.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/core/utils/gap.dart';
-import 'package:shia_game_flutter/core/utils/my_localization.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
-import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart';
+import 'package:shia_game_flutter/core/widgets/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
-
-enum CustomWidgetType {
- customLeague,
- friendBattle;
-
- static Map get borderGradient => {
- CustomWidgetType.customLeague: LinearGradient(
- begin: AlignmentDirectional.topCenter,
- end: AlignmentDirectional.bottomCenter,
- colors: [Color(0XFF4BAD42), Color(0XFF147743)],
- ),
- CustomWidgetType.friendBattle: LinearGradient(
- begin: AlignmentDirectional.topCenter,
- end: AlignmentDirectional.bottomCenter,
- colors: [Color(0XFFED9851), Color(0XFFC77041)],
- ),
- };
-
- static Map get gradient => {
- CustomWidgetType.customLeague: RadialGradient(
- radius: 0.7,
- center: Alignment(-0.6, -0.8),
- colors: [Color(0XFF58AE23), Color(0XFF066A36)],
- ),
- CustomWidgetType.friendBattle: RadialGradient(
- radius: 0.7,
- center: Alignment(-0.6, -0.8),
- colors: [Color(0XFFE99E53), Color(0XFFBC673A)],
- ),
- };
-
- static Map get image => {
- CustomWidgetType.customLeague: MyAssets.medal,
- CustomWidgetType.friendBattle: MyAssets.friendBattle,
- };
-
- static Map get containerColor => {
- CustomWidgetType.customLeague: Color(0XFF05542B),
- CustomWidgetType.friendBattle: Color(0XFFA45A31),
- };
-
- static Map get firstTextColor => {
- CustomWidgetType.customLeague: Color(0XFF4FDF94),
- CustomWidgetType.friendBattle: Color(0XFFE3DFD5),
- };
-
- static Map get secondTextColor => {
- CustomWidgetType.customLeague: Color(0XFF85C9A6),
- CustomWidgetType.friendBattle: Color(0XFFDFBC9D),
- };
-
- static Map get title => {
- CustomWidgetType.customLeague: ShaderMask(
- blendMode: BlendMode.modulate,
- shaderCallback: (bounds) => LinearGradient(
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- colors: [Color(0XFFFFFFFF), Color(0XFFFFFFFF), Color(0XFFBEF8DA)],
- ).createShader(bounds),
- child: Text(
- Get.context?.translate.custom_league ?? '',
- style: Lexend.extraBold.copyWith(
- fontSize: 14,
- shadows: [
- BoxShadow(
- color: Color(0xFF07592F),
- blurRadius: 0.52,
- offset: Offset(0, 1.04),
- spreadRadius: 0,
- ),
- ],
- ),
- ),
- ),
- CustomWidgetType.friendBattle: ShaderMask(
- blendMode: BlendMode.modulate,
- shaderCallback: (bounds) => LinearGradient(
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- colors: [Color(0XFFFFFFFF), Color(0XFFFFFFFF), Color(0XFFFFB994)],
- ).createShader(bounds),
- child: Text(
- Get.context?.translate.friends_battle ?? '',
- style: Lexend.extraBold.copyWith(
- fontSize: 14,
- shadows: [
- BoxShadow(
- color: Color(0xFFAA5B31),
- blurRadius: 0.52,
- offset: Offset(0, 1.04),
- spreadRadius: 0,
- ),
- ],
- ),
- ),
- ),
- };
-}
+import 'package:shia_game_flutter/features/home/presentation/pages/widgets/enums/custom_widget_type.dart';
class HomeCustomWidget extends StatelessWidget {
const HomeCustomWidget({
@@ -122,7 +23,7 @@ class HomeCustomWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return GradientContainer(
+ return MyContainer(
height: 130,
borderRadius: BorderRadius.all(Radius.circular(20)),
borderGradient: CustomWidgetType.borderGradient[type],
diff --git a/lib/features/home/presentation/pages/widgets/home_membership.dart b/lib/features/home/presentation/pages/widgets/home_membership.dart
index a505bbd..b5bd6c3 100644
--- a/lib/features/home/presentation/pages/widgets/home_membership.dart
+++ b/lib/features/home/presentation/pages/widgets/home_membership.dart
@@ -7,7 +7,7 @@ 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/utils/my_localization.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
-import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart';
+import 'package:shia_game_flutter/core/widgets/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
class HomeMembership extends StatelessWidget {
@@ -15,7 +15,7 @@ class HomeMembership extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return GradientContainer(
+ return MyContainer(
width: context.widthScreen,
color: context.backgroundColor,
borderGradient: LinearGradient(
diff --git a/lib/features/profile/presentation/ui/profile_page.dart b/lib/features/profile/presentation/ui/profile_page.dart
index 210589e..f004afe 100644
--- a/lib/features/profile/presentation/ui/profile_page.dart
+++ b/lib/features/profile/presentation/ui/profile_page.dart
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
import 'package:shia_game_flutter/core/utils/gap.dart';
+import 'package:shia_game_flutter/core/utils/my_localization.dart';
import 'package:shia_game_flutter/core/widgets/background/my_background.dart';
import 'package:shia_game_flutter/core/widgets/button/my_gradient_button.dart';
import 'package:shia_game_flutter/core/widgets/input/my_input.dart';
@@ -21,14 +22,11 @@ class ProfilePage extends GetView {
children: [
60.0.gapHeight,
ProfileAvatar(),
- MyGradientButton(),
+ _changeProfileBtn(context),
MySpaces.s40.gapHeight,
- MyInput(
- labelText: 'User Name',
- hintText: 'Unknown123456',
- ),
+ _userNameInput(context),
MySpaces.s28.gapHeight,
- _locationInput(),
+ _locationInput(context),
200.0.gapHeight,
_bottomButtons(),
],
@@ -36,14 +34,28 @@ class ProfilePage extends GetView {
);
}
- Row _locationInput() {
+ MyGradientButton _changeProfileBtn(BuildContext context) {
+ return MyGradientButton(
+ onTap: () {},
+ title: context.translate.change_profile,
+ );
+ }
+
+ MyInput _userNameInput(BuildContext context) {
+ return MyInput(
+ labelText: context.translate.username,
+ hintText: 'Unknown123456',
+ );
+ }
+
+ Row _locationInput(BuildContext context) {
return Row(
crossAxisAlignment: CrossAxisAlignment.end,
spacing: MySpaces.s10,
children: [
Expanded(
child: MyInput(
- labelText: 'Your Region',
+ labelText: context.translate.your_region,
hintText: 'Iran - Tehran',
),
),
diff --git a/lib/features/profile/presentation/ui/widgets/profile_delete_account.dart b/lib/features/profile/presentation/ui/widgets/profile_delete_account.dart
index f44437e..3969223 100644
--- a/lib/features/profile/presentation/ui/widgets/profile_delete_account.dart
+++ b/lib/features/profile/presentation/ui/widgets/profile_delete_account.dart
@@ -3,14 +3,14 @@ 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/utils/my_localization.dart';
-import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart';
+import 'package:shia_game_flutter/core/widgets/container/my_container.dart';
class ProfileDeleteAccount extends StatelessWidget {
const ProfileDeleteAccount({super.key});
@override
Widget build(BuildContext context) {
- return GradientContainer(
+ return MyContainer(
height: 58,
onTap: () {},
borderRadius: BorderRadius.all(Radius.circular(MySpaces.s12)),
diff --git a/lib/features/profile/presentation/ui/widgets/profile_location.dart b/lib/features/profile/presentation/ui/widgets/profile_location.dart
index 233eb43..e7f9d7f 100644
--- a/lib/features/profile/presentation/ui/widgets/profile_location.dart
+++ b/lib/features/profile/presentation/ui/widgets/profile_location.dart
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:shia_game_flutter/common_ui/resources/my_assets.dart';
-import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart';
+import 'package:shia_game_flutter/core/widgets/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
class ProfileLocation extends StatelessWidget {
@@ -8,7 +8,7 @@ class ProfileLocation extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return GradientContainer(
+ return MyContainer(
onTap: () {},
width: 48,
height: 48,
diff --git a/lib/features/profile/presentation/ui/widgets/profile_logout.dart b/lib/features/profile/presentation/ui/widgets/profile_logout.dart
index d1999cf..8f3758c 100644
--- a/lib/features/profile/presentation/ui/widgets/profile_logout.dart
+++ b/lib/features/profile/presentation/ui/widgets/profile_logout.dart
@@ -3,7 +3,7 @@ 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/core/utils/my_localization.dart';
-import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart';
+import 'package:shia_game_flutter/core/widgets/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
class ProfileLogout extends StatelessWidget {
@@ -11,7 +11,7 @@ class ProfileLogout extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return GradientContainer(
+ return MyContainer(
height: 58,
onTap: () {},
borderRadius: BorderRadius.all(Radius.circular(MySpaces.s12)),
diff --git a/lib/features/shop/data/model/shop_model.dart b/lib/features/shop/data/model/shop_model.dart
index 3f3a933..362e5df 100644
--- a/lib/features/shop/data/model/shop_model.dart
+++ b/lib/features/shop/data/model/shop_model.dart
@@ -1,13 +1,9 @@
import 'package:shia_game_flutter/features/shop/domain/entity/shop_entity.dart';
class ShopModel extends ShopEntity {
- const ShopModel({
- super.id,
- });
+ const ShopModel();
factory ShopModel.fromJson(Map json) {
- return ShopModel(
- id: json['id'],
- );
+ return ShopModel();
}
}
diff --git a/lib/features/shop/domain/entity/book_entity.dart b/lib/features/shop/domain/entity/book_entity.dart
new file mode 100644
index 0000000..8f8f1b4
--- /dev/null
+++ b/lib/features/shop/domain/entity/book_entity.dart
@@ -0,0 +1,9 @@
+import 'package:shia_game_flutter/features/shop/domain/entity/shop_entity.dart';
+
+class BookEntity extends ShopEntity {
+ const BookEntity({
+ super.type = ShopType.book,
+ super.image,
+ super.title,
+ });
+}
diff --git a/lib/features/shop/domain/entity/boost_entity.dart b/lib/features/shop/domain/entity/boost_entity.dart
new file mode 100644
index 0000000..3538fb8
--- /dev/null
+++ b/lib/features/shop/domain/entity/boost_entity.dart
@@ -0,0 +1,11 @@
+import 'package:shia_game_flutter/features/shop/domain/entity/shop_entity.dart';
+
+class BoostEntity extends ShopEntity {
+ const BoostEntity({
+ super.type = ShopType.boost,
+ super.number,
+ super.price,
+ super.image,
+ super.title = 'Boost',
+ });
+}
diff --git a/lib/features/shop/domain/entity/character_entity.dart b/lib/features/shop/domain/entity/character_entity.dart
new file mode 100644
index 0000000..2edf2bc
--- /dev/null
+++ b/lib/features/shop/domain/entity/character_entity.dart
@@ -0,0 +1,11 @@
+import 'package:shia_game_flutter/features/shop/domain/entity/shop_entity.dart';
+
+class CharacterEntity extends ShopEntity {
+ const CharacterEntity({
+ super.type = ShopType.character,
+ super.image,
+ super.isActive,
+ super.isBuy,
+ super.price,
+ });
+}
diff --git a/lib/features/shop/domain/entity/gem_entity.dart b/lib/features/shop/domain/entity/gem_entity.dart
new file mode 100644
index 0000000..6cbecbc
--- /dev/null
+++ b/lib/features/shop/domain/entity/gem_entity.dart
@@ -0,0 +1,11 @@
+import 'package:shia_game_flutter/features/shop/domain/entity/shop_entity.dart';
+
+class GemEntity extends ShopEntity {
+ const GemEntity({
+ super.type = ShopType.gem,
+ super.image,
+ super.price,
+ super.title = 'Gems',
+ super.number,
+ });
+}
diff --git a/lib/features/shop/domain/entity/pro_membership_entity.dart b/lib/features/shop/domain/entity/pro_membership_entity.dart
new file mode 100644
index 0000000..821fbd6
--- /dev/null
+++ b/lib/features/shop/domain/entity/pro_membership_entity.dart
@@ -0,0 +1,11 @@
+import 'package:shia_game_flutter/features/shop/domain/entity/shop_entity.dart';
+
+class ProMembershipEntity extends ShopEntity {
+ const ProMembershipEntity({
+ super.type = ShopType.proMembership,
+ super.image,
+ super.price,
+ super.title = 'Month',
+ super.number,
+ });
+}
diff --git a/lib/features/shop/domain/entity/shop_entity.dart b/lib/features/shop/domain/entity/shop_entity.dart
index 1e453aa..527dd6b 100644
--- a/lib/features/shop/domain/entity/shop_entity.dart
+++ b/lib/features/shop/domain/entity/shop_entity.dart
@@ -1,14 +1,42 @@
import 'package:equatable/equatable.dart';
+enum ShopType {
+ gem,
+ boost,
+ character,
+ book,
+ proMembership,
+}
+
class ShopEntity extends Equatable {
- final int? id;
+ final ShopType? type;
+ final String? image;
+ final int? number;
+ final String? title;
+ final double? price;
+ final bool? isActive;
+ final bool? isBuy;
+
+
const ShopEntity({
- this.id,
+ this.type,
+ this.image,
+ this.number,
+ this.title,
+ this.price,
+ this.isActive,
+ this.isBuy,
});
@override
List