57 lines
1.3 KiB
Dart
57 lines
1.3 KiB
Dart
|
|
import 'package:english_learning/features/welcome/screens/welcome_screen.dart';
|
||
|
|
import 'package:flutter/material.dart';
|
||
|
|
|
||
|
|
class SplashScreen extends StatefulWidget {
|
||
|
|
const SplashScreen({super.key});
|
||
|
|
|
||
|
|
@override
|
||
|
|
State<SplashScreen> createState() => _SplashScreenState();
|
||
|
|
}
|
||
|
|
|
||
|
|
class _SplashScreenState extends State<SplashScreen>
|
||
|
|
with SingleTickerProviderStateMixin {
|
||
|
|
@override
|
||
|
|
void initState() {
|
||
|
|
super.initState();
|
||
|
|
|
||
|
|
Future.delayed(const Duration(seconds: 4), () {
|
||
|
|
Navigator.of(context).pushReplacement(
|
||
|
|
MaterialPageRoute(
|
||
|
|
builder: (_) => const WelcomeScreen(),
|
||
|
|
),
|
||
|
|
);
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
@override
|
||
|
|
Widget build(BuildContext context) {
|
||
|
|
return Scaffold(
|
||
|
|
body: Container(
|
||
|
|
width: double.infinity,
|
||
|
|
decoration: const BoxDecoration(
|
||
|
|
gradient: LinearGradient(
|
||
|
|
colors: [
|
||
|
|
Color(0xFF5674ED),
|
||
|
|
Color(0xFF34C3F9),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
),
|
||
|
|
child: const Column(
|
||
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
|
children: [
|
||
|
|
Text(
|
||
|
|
'English Learning',
|
||
|
|
style: TextStyle(
|
||
|
|
fontSize: 32,
|
||
|
|
fontWeight: FontWeight.bold,
|
||
|
|
color: Colors.white,
|
||
|
|
),
|
||
|
|
),
|
||
|
|
SizedBox(height: 16),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
),
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|