diff --git a/assets/app_tour/welcome2.png b/assets/app_tour/welcome2.png new file mode 100644 index 00000000..35e0938d Binary files /dev/null and b/assets/app_tour/welcome2.png differ diff --git a/lib/config/my_router.dart b/lib/config/my_router.dart index d6f4b2b9..855366ba 100644 --- a/lib/config/my_router.dart +++ b/lib/config/my_router.dart @@ -301,6 +301,7 @@ import 'package:uae_stat/config/sessionCheckScreen.dart'; import 'package:uae_stat/domain/entities/session_entity.dart'; import 'package:uae_stat/infrastructure/data/p_auth_repo.dart'; import 'package:uae_stat/presentation/Screens/Bottom%20Navigation%20Pages/UAE_Numbers/Social/marriages.dart'; +import 'package:uae_stat/presentation/Screens/app_tour/WelcomePage.dart'; import 'package:uae_stat/presentation/Screens/auth_verification/privacy_policy.dart'; import 'package:uae_stat/presentation/Screens/auth_verification/registration.dart'; import 'package:uae_stat/presentation/Screens/auth_verification/terms&conditions.dart'; @@ -384,6 +385,10 @@ final GoRouter router = GoRouter( builder: (context, state) => LoginRoute(), //builder: (context, state) => LoginRoute(), ), + GoRoute( + path: '/welcomePage', + builder: (context, state) => Welcomepage(), + ), GoRoute( path: '/myhomepage', builder: (context, state) => MyHomePage(), diff --git a/lib/presentation/Screens/app_tour/WelcomePage.dart b/lib/presentation/Screens/app_tour/WelcomePage.dart new file mode 100644 index 00000000..34fa76d2 --- /dev/null +++ b/lib/presentation/Screens/app_tour/WelcomePage.dart @@ -0,0 +1,88 @@ +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:uae_stat/domain/use_cases/language.dart'; +import 'package:uae_stat/infrastructure/services/img_asset_paths/banner_asset_path.dart'; +import 'package:uae_stat/infrastructure/services/img_asset_paths/logo_asset_path.dart'; + +class Welcomepage extends StatelessWidget { + const Welcomepage({super.key}); + + @override + Widget build(BuildContext context) { + double myheight = MediaQuery.of(context).size.height; + double mywidth = MediaQuery.of(context).size.width; + final fcscBanner = Image.asset( + BannerAssetPath.fcsc, + height: 40, + ); + final uaestat = Image.asset( + LogoAssetPath.uaeStat, + height: 50, + ); + + return SafeArea( + child: Scaffold( + body: Container( + width: mywidth, + height: myheight, + padding: EdgeInsets.zero, + margin: EdgeInsets.zero, + color: Colors.white, + child: Column( + children: [ + Container( + padding: EdgeInsets.only(top: myheight*0.05,left: mywidth*0.2,right: mywidth*0.2,bottom: 0), + height: myheight > 500 ? myheight * 0.35 : 230, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( context.translate('Welcome to','مرحبًا بك في'), + textAlign: TextAlign.center, + style: TextStyle(fontFamily: 'Roboto',fontSize: 30,fontWeight: FontWeight.normal,color: Colors.black,),), + SizedBox(height: 6,), + uaestat, + SizedBox(height: 6,), + Text(context.translate('Your Ultimate statistics Companion','رفيقك الأمثل للإحصائيات'), + textAlign: TextAlign.center, + style: TextStyle(fontFamily: 'Roboto',fontSize: 22,color: Color(0xFF898C81)),), + ], + ), + ), + Container( + padding: EdgeInsets.zero, + margin: EdgeInsets.zero, + width: mywidth, + height: myheight*0.5, + decoration: BoxDecoration( + image: DecorationImage(image: AssetImage('assets/app_tour/welcome2.png'), + fit: BoxFit.fitWidth, + ), + ), + child: Padding( + padding: EdgeInsets.only(bottom: 40), + child: Align( + alignment: Alignment.bottomCenter, + child: ElevatedButton(onPressed: (){ + context.go('/myhomepage'); + }, + style: ButtonStyle( + backgroundColor: WidgetStateProperty.all(Color(0xFF90B0D5)), + ), + child: Text(context.translate("Let's get Started",'لنبدأ'), + style: TextStyle(color: Colors.white, fontFamily: 'Roboto',fontSize: 16), + ), + ), + ), + ), + ), + Center( + child: fcscBanner, + ), + ], + ), + ), + ), + ); + } +} + diff --git a/lib/presentation/Screens/profilepage.dart b/lib/presentation/Screens/profilepage.dart index 1475ce25..a3a4f625 100644 --- a/lib/presentation/Screens/profilepage.dart +++ b/lib/presentation/Screens/profilepage.dart @@ -366,7 +366,7 @@ class _ProfileScreenState extends ConsumerState { // } else { // context.go('/myhomepage'); // } - context.go('/myhomepage'); + context.go('/welcomePage'); } catch (error) { ScaffoldMessenger.of(context).showSnackBar( SnackBar(content: Text("Failed to update profile: $error")));