18 changed files with 364 additions and 297 deletions
-
32lib/core/widgets/app_bar/styles/app_bar_action.dart
-
81lib/core/widgets/app_bar/styles/app_bar_add_widget.dart
-
40lib/core/widgets/button/my_gradient_button.dart
-
56lib/core/widgets/container/my_container.dart
-
54lib/core/widgets/text/gradient_text.dart
-
12lib/features/home/presentation/pages/home_page.dart
-
73lib/features/home/presentation/pages/widgets/enums/custom_widget_type.dart
-
36lib/features/home/presentation/pages/widgets/home_battle_cast.dart
-
36lib/features/home/presentation/pages/widgets/home_battle_league.dart
-
105lib/features/home/presentation/pages/widgets/home_custom_widget.dart
-
4lib/features/home/presentation/pages/widgets/home_membership.dart
-
28lib/features/profile/presentation/ui/profile_page.dart
-
4lib/features/profile/presentation/ui/widgets/profile_delete_account.dart
-
4lib/features/profile/presentation/ui/widgets/profile_location.dart
-
4lib/features/profile/presentation/ui/widgets/profile_logout.dart
-
11lib/l10n/app_en.arb
-
54lib/l10n/app_localizations.dart
-
27lib/l10n/app_localizations_en.dart
@ -0,0 +1,54 @@ |
|||
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.fontSize = 14, |
|||
this.shadowColor = const Color(0xFF000000), |
|||
this.blurRadius = 0, |
|||
this.spreadRadius = 0, |
|||
this.offset = Offset.zero, |
|||
}); |
|||
|
|||
final String? text; |
|||
final Color color; |
|||
final double? fontSize; |
|||
final Color shadowColor; |
|||
final double blurRadius; |
|||
final double spreadRadius; |
|||
final Offset offset; |
|||
|
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return ShaderMask( |
|||
blendMode: BlendMode.modulate, |
|||
shaderCallback: (bounds) => LinearGradient( |
|||
begin: Alignment.topCenter, |
|||
end: Alignment.bottomCenter, |
|||
colors: [ |
|||
context.primaryColor, |
|||
context.primaryColor, |
|||
color, |
|||
], |
|||
).createShader(bounds), |
|||
child: Text( |
|||
text ?? '', |
|||
style: Lexend.extraBold.copyWith( |
|||
fontSize: fontSize, |
|||
shadows: [ |
|||
BoxShadow( |
|||
color: shadowColor, |
|||
blurRadius: blurRadius, |
|||
offset: offset, |
|||
spreadRadius: spreadRadius, |
|||
), |
|||
], |
|||
), |
|||
), |
|||
); |
|||
} |
|||
} |
|||
@ -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<CustomWidgetType, Gradient> 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<CustomWidgetType, Gradient> 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<CustomWidgetType, String> get image => { |
|||
CustomWidgetType.customLeague: MyAssets.medal, |
|||
CustomWidgetType.friendBattle: MyAssets.friendBattle, |
|||
}; |
|||
|
|||
static Map<CustomWidgetType, Color> get containerColor => { |
|||
CustomWidgetType.customLeague: Color(0XFF05542B), |
|||
CustomWidgetType.friendBattle: Color(0XFFA45A31), |
|||
}; |
|||
|
|||
static Map<CustomWidgetType, Color> get firstTextColor => { |
|||
CustomWidgetType.customLeague: Color(0XFF4FDF94), |
|||
CustomWidgetType.friendBattle: Color(0XFFE3DFD5), |
|||
}; |
|||
|
|||
static Map<CustomWidgetType, Color> get secondTextColor => { |
|||
CustomWidgetType.customLeague: Color(0XFF85C9A6), |
|||
CustomWidgetType.friendBattle: Color(0XFFDFBC9D), |
|||
}; |
|||
|
|||
static Map<CustomWidgetType, Widget> 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), |
|||
), |
|||
}; |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue