|
|
@ -0,0 +1,99 @@ |
|
|
|
|
|
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/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/utils/screen_size.dart'; |
|
|
|
|
|
import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; |
|
|
|
|
|
import 'package:shia_game_flutter/features/intro/presentation/controller/intro_controller.dart'; |
|
|
|
|
|
import 'package:shia_game_flutter/features/intro/presentation/ui/widgets/intro_loading.dart'; |
|
|
|
|
|
|
|
|
|
|
|
class IntroPage extends GetView<IntroController> { |
|
|
|
|
|
const IntroPage({super.key}); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
|
Widget build(BuildContext context) { |
|
|
|
|
|
return Scaffold( |
|
|
|
|
|
backgroundColor: context.introBackgroundColor, |
|
|
|
|
|
body: SafeArea( |
|
|
|
|
|
child: SizedBox.expand( |
|
|
|
|
|
child: Stack( |
|
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
|
children: [ |
|
|
|
|
|
_logo(context), |
|
|
|
|
|
_bottomLoading(context), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Stack _logo(BuildContext context) { |
|
|
|
|
|
return Stack( |
|
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
|
children: [ |
|
|
|
|
|
PositionedDirectional( |
|
|
|
|
|
top: context.heightScreen / 3.2, |
|
|
|
|
|
end: 50, |
|
|
|
|
|
child: MyImage(asset: MyAssets.question), |
|
|
|
|
|
), |
|
|
|
|
|
PositionedDirectional( |
|
|
|
|
|
top: context.heightScreen / 3.5, |
|
|
|
|
|
end: context.widthScreen / 2.4, |
|
|
|
|
|
child: MyImage(asset: MyAssets.question, size: 30), |
|
|
|
|
|
), |
|
|
|
|
|
PositionedDirectional( |
|
|
|
|
|
top: context.heightScreen / 2.8, |
|
|
|
|
|
start: 80, |
|
|
|
|
|
child: MyImage(asset: MyAssets.question, size: 24), |
|
|
|
|
|
), |
|
|
|
|
|
PositionedDirectional( |
|
|
|
|
|
bottom: context.heightScreen / 3.2, |
|
|
|
|
|
start: 80, |
|
|
|
|
|
child: MyImage(asset: MyAssets.question), |
|
|
|
|
|
), |
|
|
|
|
|
PositionedDirectional( |
|
|
|
|
|
bottom: context.heightScreen / 3.2, |
|
|
|
|
|
end: 50, |
|
|
|
|
|
child: MyImage(asset: MyAssets.question, size: 20), |
|
|
|
|
|
), |
|
|
|
|
|
PositionedDirectional( |
|
|
|
|
|
bottom: context.heightScreen / 2.6, |
|
|
|
|
|
start: context.widthScreen / 2, |
|
|
|
|
|
child: MyImage(asset: MyAssets.question, size: 20), |
|
|
|
|
|
), |
|
|
|
|
|
Container( |
|
|
|
|
|
width: context.widthScreen, |
|
|
|
|
|
height: context.heightScreen, |
|
|
|
|
|
decoration: ShapeDecoration( |
|
|
|
|
|
gradient: RadialGradient( |
|
|
|
|
|
colors: [const Color(0xFF321A6D), const Color(0x00160C30)], |
|
|
|
|
|
), |
|
|
|
|
|
shape: OvalBorder(), |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
MyImage(asset: MyAssets.shiaMind), |
|
|
|
|
|
], |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Positioned _bottomLoading(BuildContext context) { |
|
|
|
|
|
return Positioned( |
|
|
|
|
|
bottom: MySpaces.s16, |
|
|
|
|
|
child: Column( |
|
|
|
|
|
spacing: MySpaces.s10, |
|
|
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
|
|
children: [ |
|
|
|
|
|
Text( |
|
|
|
|
|
context.translate.loading, |
|
|
|
|
|
style: Lexend.regular.copyWith(fontSize: MySpaces.s14), |
|
|
|
|
|
), |
|
|
|
|
|
IntroLoading(), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
} |