14 changed files with 144 additions and 152 deletions
-
BINassets/videos/intro_1.mp4
-
BINassets/videos/intro_2.mp4
-
BINassets/videos/intro_3.mp4
-
BINassets/videos/intro_4.mp4
-
BINassets/videos/intro_5.mp4
-
77lib/features/intro/presentation/bloc/intro_bloc.dart
-
4lib/features/intro/presentation/bloc/intro_event.dart
-
2lib/features/intro/presentation/ui/intro_page.dart
-
56lib/features/intro/presentation/ui/screens/intro_1_screen.dart
-
40lib/features/intro/presentation/ui/screens/intro_2_screen.dart
-
40lib/features/intro/presentation/ui/screens/intro_3_screen.dart
-
39lib/features/intro/presentation/ui/screens/intro_4_screen.dart
-
37lib/features/intro/presentation/ui/screens/intro_5_screen.dart
-
1pubspec.yaml
@ -1,54 +1,24 @@ |
|||||
import 'package:flutter/material.dart'; |
import 'package:flutter/material.dart'; |
||||
import 'package:hadi_hoda_flutter/common_ui/resources/my_assets.dart'; |
|
||||
import 'package:hadi_hoda_flutter/common_ui/resources/my_spaces.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/utils/my_localization.dart'; |
|
||||
|
import 'package:flutter_bloc/flutter_bloc.dart'; |
||||
import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; |
import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; |
||||
import 'package:hadi_hoda_flutter/core/utils/set_platform_size.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/widgets/animations/slide_up_fade.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/widgets/images/my_image.dart'; |
|
||||
import 'package:hadi_hoda_flutter/features/intro/presentation/ui/widgets/bubble_chat_widget.dart'; |
|
||||
|
import 'package:hadi_hoda_flutter/features/intro/presentation/bloc/intro_bloc.dart'; |
||||
|
import 'package:pod_player/pod_player.dart'; |
||||
|
|
||||
class Intro1Screen extends StatelessWidget { |
class Intro1Screen extends StatelessWidget { |
||||
const Intro1Screen({super.key}); |
const Intro1Screen({super.key}); |
||||
|
|
||||
@override |
@override |
||||
Widget build(BuildContext context) { |
Widget build(BuildContext context) { |
||||
return Stack( |
|
||||
alignment: Alignment.center, |
|
||||
children: [ |
|
||||
Positioned.fill( |
|
||||
child: MyImage(image: MyAssets.intro_1, fit: BoxFit.cover), |
|
||||
), |
|
||||
PositionedDirectional( |
|
||||
end: setSize<double>( |
|
||||
context: context, |
|
||||
mobile: MySpaces.s10, |
|
||||
tablet: 0.15.w, |
|
||||
), |
|
||||
top: setSize<double>( |
|
||||
context: context, |
|
||||
mobile: 0.15.h, |
|
||||
tablet: 0.25.h, |
|
||||
), |
|
||||
width: 290, |
|
||||
child: SlideUpFade( |
|
||||
delay: Duration(milliseconds: 300), |
|
||||
child: BubbleChatWidget( |
|
||||
text: context.translate.intro_1_1, |
|
||||
flip: true, |
|
||||
), |
|
||||
), |
|
||||
), |
|
||||
PositionedDirectional( |
|
||||
start: setSize(context: context, mobile: MySpaces.s30, tablet: 0.2.w), |
|
||||
top: setSize(context: context, mobile: 0.3.h, tablet: 0.35.h), |
|
||||
width: 250, |
|
||||
child: SlideUpFade( |
|
||||
delay: Duration(milliseconds: 800), |
|
||||
child: BubbleChatWidget(text: context.translate.intro_1_2), |
|
||||
), |
|
||||
), |
|
||||
], |
|
||||
|
return SizedBox.expand( |
||||
|
child: PodVideoPlayer( |
||||
|
controller: context.read<IntroBloc>().podController1, |
||||
|
overlayBuilder: (options) => SizedBox.shrink(), |
||||
|
alwaysShowProgressBar: false, |
||||
|
videoAspectRatio: context.widthScreen / context.heightScreen, |
||||
|
frameAspectRatio: context.widthScreen / context.heightScreen, |
||||
|
backgroundColor: Color(0XFF00154C), |
||||
|
onLoading: (context) => SizedBox.shrink(), |
||||
|
), |
||||
); |
); |
||||
} |
} |
||||
} |
} |
||||
@ -1,37 +1,25 @@ |
|||||
import 'package:flutter/material.dart'; |
import 'package:flutter/material.dart'; |
||||
import 'package:hadi_hoda_flutter/common_ui/resources/my_assets.dart'; |
|
||||
import 'package:hadi_hoda_flutter/common_ui/resources/my_spaces.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/utils/my_localization.dart'; |
|
||||
|
import 'package:flutter_bloc/flutter_bloc.dart'; |
||||
|
import 'package:hadi_hoda_flutter/common_ui/resources/my_colors.dart'; |
||||
import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; |
import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; |
||||
import 'package:hadi_hoda_flutter/core/utils/set_platform_size.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/widgets/animations/slide_up_fade.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/widgets/images/my_image.dart'; |
|
||||
import 'package:hadi_hoda_flutter/features/intro/presentation/ui/widgets/bubble_chat_widget.dart'; |
|
||||
|
import 'package:hadi_hoda_flutter/features/intro/presentation/bloc/intro_bloc.dart'; |
||||
|
import 'package:pod_player/pod_player.dart'; |
||||
|
|
||||
class Intro2Screen extends StatelessWidget { |
class Intro2Screen extends StatelessWidget { |
||||
const Intro2Screen({super.key}); |
const Intro2Screen({super.key}); |
||||
|
|
||||
@override |
@override |
||||
Widget build(BuildContext context) { |
Widget build(BuildContext context) { |
||||
return Stack( |
|
||||
alignment: Alignment.center, |
|
||||
children: [ |
|
||||
Positioned.fill( |
|
||||
child: Transform.flip( |
|
||||
flipX: true, |
|
||||
child: MyImage(image: MyAssets.intro_2, fit: BoxFit.cover), |
|
||||
), |
|
||||
), |
|
||||
PositionedDirectional( |
|
||||
end: setSize(context: context, mobile: MySpaces.s40, tablet: 0.3.w), |
|
||||
top: setSize(context: context, mobile: 0.17.h, tablet: 0.23.h), |
|
||||
width: 250, |
|
||||
child: SlideUpFade( |
|
||||
delay: Duration(milliseconds: 300), |
|
||||
child: BubbleChatWidget(text: context.translate.intro_2), |
|
||||
), |
|
||||
), |
|
||||
], |
|
||||
|
return SizedBox.expand( |
||||
|
child: PodVideoPlayer( |
||||
|
controller: context.read<IntroBloc>().podController2, |
||||
|
overlayBuilder: (options) => SizedBox.shrink(), |
||||
|
alwaysShowProgressBar: false, |
||||
|
videoAspectRatio: context.widthScreen / context.heightScreen, |
||||
|
frameAspectRatio: context.widthScreen / context.heightScreen, |
||||
|
backgroundColor: MyColors.transparent, |
||||
|
onLoading: (context) => SizedBox.shrink(), |
||||
|
), |
||||
); |
); |
||||
} |
} |
||||
} |
} |
||||
@ -1,37 +1,25 @@ |
|||||
import 'package:flutter/material.dart'; |
import 'package:flutter/material.dart'; |
||||
import 'package:hadi_hoda_flutter/common_ui/resources/my_assets.dart'; |
|
||||
import 'package:hadi_hoda_flutter/common_ui/resources/my_spaces.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/utils/my_localization.dart'; |
|
||||
|
import 'package:flutter_bloc/flutter_bloc.dart'; |
||||
|
import 'package:hadi_hoda_flutter/common_ui/resources/my_colors.dart'; |
||||
import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; |
import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; |
||||
import 'package:hadi_hoda_flutter/core/utils/set_platform_size.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/widgets/animations/slide_up_fade.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/widgets/images/my_image.dart'; |
|
||||
import 'package:hadi_hoda_flutter/features/intro/presentation/ui/widgets/bubble_chat_widget.dart'; |
|
||||
|
import 'package:hadi_hoda_flutter/features/intro/presentation/bloc/intro_bloc.dart'; |
||||
|
import 'package:pod_player/pod_player.dart'; |
||||
|
|
||||
class Intro3Screen extends StatelessWidget { |
class Intro3Screen extends StatelessWidget { |
||||
const Intro3Screen({super.key}); |
const Intro3Screen({super.key}); |
||||
|
|
||||
@override |
@override |
||||
Widget build(BuildContext context) { |
Widget build(BuildContext context) { |
||||
return Stack( |
|
||||
alignment: Alignment.center, |
|
||||
children: [ |
|
||||
Positioned.fill( |
|
||||
child: MyImage(image: MyAssets.intro_3, fit: BoxFit.cover), |
|
||||
), |
|
||||
PositionedDirectional( |
|
||||
start: setSize(context: context, mobile: MySpaces.s30), |
|
||||
top: setSize(context: context, mobile: 180, tablet: 0.25.h), |
|
||||
width: 270, |
|
||||
child: SlideUpFade( |
|
||||
delay: Duration(milliseconds: 300), |
|
||||
child: BubbleChatWidget( |
|
||||
text: context.translate.intro_3, |
|
||||
flip: true, |
|
||||
), |
|
||||
), |
|
||||
), |
|
||||
], |
|
||||
|
return SizedBox.expand( |
||||
|
child: PodVideoPlayer( |
||||
|
controller: context.read<IntroBloc>().podController3, |
||||
|
overlayBuilder: (options) => SizedBox.shrink(), |
||||
|
alwaysShowProgressBar: false, |
||||
|
videoAspectRatio: context.widthScreen / context.heightScreen, |
||||
|
frameAspectRatio: context.widthScreen / context.heightScreen, |
||||
|
backgroundColor: MyColors.transparent, |
||||
|
onLoading: (context) => SizedBox.shrink(), |
||||
|
), |
||||
); |
); |
||||
} |
} |
||||
} |
} |
||||
@ -1,36 +1,25 @@ |
|||||
import 'package:flutter/material.dart'; |
import 'package:flutter/material.dart'; |
||||
import 'package:hadi_hoda_flutter/common_ui/resources/my_assets.dart'; |
|
||||
import 'package:hadi_hoda_flutter/common_ui/resources/my_spaces.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/utils/my_localization.dart'; |
|
||||
|
import 'package:flutter_bloc/flutter_bloc.dart'; |
||||
|
import 'package:hadi_hoda_flutter/common_ui/resources/my_colors.dart'; |
||||
import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; |
import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; |
||||
import 'package:hadi_hoda_flutter/core/utils/set_platform_size.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/widgets/animations/slide_up_fade.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/widgets/images/my_image.dart'; |
|
||||
import 'package:hadi_hoda_flutter/features/intro/presentation/ui/widgets/bubble_chat_widget.dart'; |
|
||||
|
import 'package:hadi_hoda_flutter/features/intro/presentation/bloc/intro_bloc.dart'; |
||||
|
import 'package:pod_player/pod_player.dart'; |
||||
|
|
||||
class Intro4Screen extends StatelessWidget { |
class Intro4Screen extends StatelessWidget { |
||||
const Intro4Screen({super.key}); |
const Intro4Screen({super.key}); |
||||
|
|
||||
@override |
@override |
||||
Widget build(BuildContext context) { |
Widget build(BuildContext context) { |
||||
return Stack( |
|
||||
alignment: Alignment.center, |
|
||||
children: [ |
|
||||
Positioned.fill( |
|
||||
child: MyImage(image: MyAssets.intro_4, fit: BoxFit.cover), |
|
||||
), |
|
||||
PositionedDirectional( |
|
||||
start: setSize(context: context, mobile: MySpaces.s10, tablet: 0.2.w), |
|
||||
bottom: setSize(context: context, mobile: 0.4.h, tablet: 0.4.h), |
|
||||
width: 237, |
|
||||
child: SlideUpFade( |
|
||||
delay: Duration(milliseconds: 300), |
|
||||
child: BubbleChatWidget( |
|
||||
text: context.translate.intro_4, |
|
||||
), |
|
||||
), |
|
||||
), |
|
||||
], |
|
||||
|
return SizedBox.expand( |
||||
|
child: PodVideoPlayer( |
||||
|
controller: context.read<IntroBloc>().podController4, |
||||
|
overlayBuilder: (options) => SizedBox.shrink(), |
||||
|
alwaysShowProgressBar: false, |
||||
|
videoAspectRatio: context.widthScreen / context.heightScreen, |
||||
|
frameAspectRatio: context.widthScreen / context.heightScreen, |
||||
|
backgroundColor: MyColors.transparent, |
||||
|
onLoading: (context) => SizedBox.shrink(), |
||||
|
), |
||||
); |
); |
||||
} |
} |
||||
} |
} |
||||
@ -1,34 +1,25 @@ |
|||||
import 'package:flutter/material.dart'; |
import 'package:flutter/material.dart'; |
||||
import 'package:hadi_hoda_flutter/common_ui/resources/my_assets.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/utils/my_localization.dart'; |
|
||||
|
import 'package:flutter_bloc/flutter_bloc.dart'; |
||||
|
import 'package:hadi_hoda_flutter/common_ui/resources/my_colors.dart'; |
||||
import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; |
import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; |
||||
import 'package:hadi_hoda_flutter/core/utils/set_platform_size.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/widgets/animations/slide_up_fade.dart'; |
|
||||
import 'package:hadi_hoda_flutter/core/widgets/images/my_image.dart'; |
|
||||
import 'package:hadi_hoda_flutter/features/intro/presentation/ui/widgets/bubble_chat_widget.dart'; |
|
||||
|
import 'package:hadi_hoda_flutter/features/intro/presentation/bloc/intro_bloc.dart'; |
||||
|
import 'package:pod_player/pod_player.dart'; |
||||
|
|
||||
class Intro5Screen extends StatelessWidget { |
class Intro5Screen extends StatelessWidget { |
||||
const Intro5Screen({super.key}); |
const Intro5Screen({super.key}); |
||||
|
|
||||
@override |
@override |
||||
Widget build(BuildContext context) { |
Widget build(BuildContext context) { |
||||
return Stack( |
|
||||
alignment: Alignment.center, |
|
||||
children: [ |
|
||||
Positioned.fill( |
|
||||
child: MyImage(image: MyAssets.intro_5, fit: BoxFit.cover), |
|
||||
), |
|
||||
PositionedDirectional( |
|
||||
top: setSize(context: context, mobile: 0.37.h, tablet: 0.42.h), |
|
||||
width: 200, |
|
||||
child: SlideUpFade( |
|
||||
delay: Duration(milliseconds: 300), |
|
||||
child: BubbleChatWidget( |
|
||||
text: context.translate.intro_5, |
|
||||
), |
|
||||
), |
|
||||
), |
|
||||
], |
|
||||
|
return SizedBox.expand( |
||||
|
child: PodVideoPlayer( |
||||
|
controller: context.read<IntroBloc>().podController5, |
||||
|
overlayBuilder: (options) => SizedBox.shrink(), |
||||
|
alwaysShowProgressBar: false, |
||||
|
videoAspectRatio: context.widthScreen / context.heightScreen, |
||||
|
frameAspectRatio: context.widthScreen / context.heightScreen, |
||||
|
backgroundColor: MyColors.transparent, |
||||
|
onLoading: (context) => SizedBox.shrink(), |
||||
|
), |
||||
); |
); |
||||
} |
} |
||||
} |
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue