mobile_adaptive_learning/lib/features/welcome/screens/welcome_screen.dart
2024-10-10 12:49:33 +07:00

107 lines
3.7 KiB
Dart

import 'package:bootstrap_icons/bootstrap_icons.dart';
import 'package:english_learning/features/auth/screens/signin/signin_screen.dart';
import 'package:english_learning/features/onboarding/screens/onboarding_screen.dart';
import 'package:english_learning/core/widgets/global_button.dart';
import 'package:english_learning/core/utils/styles/theme.dart';
import 'package:flutter/material.dart';
class WelcomeScreen extends StatelessWidget {
const WelcomeScreen({super.key});
@override
Widget build(BuildContext context) {
final mediaQuery = MediaQuery.of(context);
final screenHeight = mediaQuery.size.height;
return Scaffold(
backgroundColor: AppColors.whiteColor,
body: Container(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Column(
children: [
SizedBox(height: screenHeight * 0.15),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Hello!',
style: AppTextStyles.blueTextStyle.copyWith(
fontSize: 32,
fontWeight: FontWeight.w600,
),
),
const SizedBox(height: 4),
Text(
'Ready to start your learning journey?\nLet\'s get everything set up perfectly for you!',
style: AppTextStyles.greyTextStyle.copyWith(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
const SizedBox(height: 50),
const Center(
child: Image(
image: AssetImage(
'lib/features/welcome/assets/images/welcome_illustration.png'),
width: 250,
height: 236.42,
),
),
],
),
),
const Spacer(flex: 2),
GlobalButton(
text: 'Get Started',
icon: BootstrapIcons.arrow_right,
iconSize: 20,
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const OnBoardingScreen()),
);
},
),
const SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'Already have an account? ',
style: AppTextStyles.greyTextStyle.copyWith(
fontSize: 14,
),
),
GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SigninScreen()),
);
},
child: Text(
'Login',
style: AppTextStyles.blueTextStyle.copyWith(
fontWeight: FontWeight.bold,
),
),
),
],
),
],
),
SizedBox(height: screenHeight * 0.1),
],
),
),
);
}
}