|
@@ -1,4 +1,5 @@
|
|
|
import 'package:flutter/material.dart';
|
|
|
+import 'package:flutter_chinese_chees/routes.dart';
|
|
|
|
|
|
/// Description: 闪屏页
|
|
|
/// Time : 04/28/2023 Friday
|
|
@@ -21,10 +22,21 @@ class _SplashPageState extends State<SplashPage> {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // after 3s go to main page
|
|
|
+ void goMain() {
|
|
|
+ Future.delayed(const Duration(seconds: 3), () {
|
|
|
+ Navigator.pushNamed(context, Routes.home);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
+ goMain();
|
|
|
return const Scaffold(
|
|
|
- body: Text("x"),
|
|
|
- );
|
|
|
+ body: SafeArea(
|
|
|
+ child: Center(
|
|
|
+ child: Text("splash page"),
|
|
|
+ ),
|
|
|
+ ));
|
|
|
}
|
|
|
}
|