初始化
This commit is contained in:
30
lib/pages/common/splash/splash_page.dart
Normal file
30
lib/pages/common/splash/splash_page.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
import 'package:app/router/route_paths.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
class SplashPage extends StatefulWidget {
|
||||
const SplashPage({super.key});
|
||||
|
||||
@override
|
||||
State<SplashPage> createState() => _SplashPageState();
|
||||
}
|
||||
|
||||
class _SplashPageState extends State<SplashPage> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
initPermission();
|
||||
}
|
||||
|
||||
///权限效验初始化
|
||||
void initPermission() async {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
context.go(RoutePaths.login);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user