welcome page added
This commit is contained in:
parent
9800b42d43
commit
521eee5d1f
BIN
assets/app_tour/welcome2.png
Normal file
BIN
assets/app_tour/welcome2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 144 KiB |
@ -301,6 +301,7 @@ import 'package:uae_stat/config/sessionCheckScreen.dart';
|
|||||||
import 'package:uae_stat/domain/entities/session_entity.dart';
|
import 'package:uae_stat/domain/entities/session_entity.dart';
|
||||||
import 'package:uae_stat/infrastructure/data/p_auth_repo.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/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/privacy_policy.dart';
|
||||||
import 'package:uae_stat/presentation/Screens/auth_verification/registration.dart';
|
import 'package:uae_stat/presentation/Screens/auth_verification/registration.dart';
|
||||||
import 'package:uae_stat/presentation/Screens/auth_verification/terms&conditions.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(),
|
||||||
//builder: (context, state) => LoginRoute(),
|
//builder: (context, state) => LoginRoute(),
|
||||||
),
|
),
|
||||||
|
GoRoute(
|
||||||
|
path: '/welcomePage',
|
||||||
|
builder: (context, state) => Welcomepage(),
|
||||||
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: '/myhomepage',
|
path: '/myhomepage',
|
||||||
builder: (context, state) => MyHomePage(),
|
builder: (context, state) => MyHomePage(),
|
||||||
|
|||||||
88
lib/presentation/Screens/app_tour/WelcomePage.dart
Normal file
88
lib/presentation/Screens/app_tour/WelcomePage.dart
Normal file
@ -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,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -366,7 +366,7 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
|
|||||||
// } else {
|
// } else {
|
||||||
// context.go('/myhomepage');
|
// context.go('/myhomepage');
|
||||||
// }
|
// }
|
||||||
context.go('/myhomepage');
|
context.go('/welcomePage');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(content: Text("Failed to update profile: $error")));
|
SnackBar(content: Text("Failed to update profile: $error")));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user