criada as telas register_home_screen.dart, register_individual_screen.dart e splash_screen.dart
This commit is contained in:
43
lib/screens/splash_screen.dart
Normal file
43
lib/screens/splash_screen.dart
Normal file
@@ -0,0 +1,43 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm/utils/const_variable.dart';
|
||||
|
||||
class SplashScreen extends StatefulWidget {
|
||||
const SplashScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<SplashScreen> createState() => _SplashScreenState();
|
||||
}
|
||||
|
||||
class _SplashScreenState extends State<SplashScreen> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
timer();
|
||||
}
|
||||
|
||||
timer()async{
|
||||
Future.delayed(Duration(seconds: 3),(){
|
||||
Navigator.pushReplacementNamed(context, '/home');
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
return Scaffold(
|
||||
body: Container(
|
||||
decoration: ConstVariable().backgroundGradient,
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Image.asset('assets/images/logo.PNG',width: width*0.5,),
|
||||
CircularProgressIndicator()
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user