splash_controller.dart 598 B

1234567891011121314151617181920212223
  1. import 'package:flustars/flustars.dart';
  2. import 'package:flutter/services.dart';
  3. import 'package:get/get.dart';
  4. import 'package:ftrecruiter/router/page_router.dart';
  5. class SplashController extends GetxController {
  6. @override
  7. void onInit() {
  8. SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]);
  9. super.onInit();
  10. }
  11. @override
  12. void onReady() async {
  13. super.onReady();
  14. //延时一秒钟进入登录页面
  15. await Future.delayed(const Duration(milliseconds: 1000));
  16. Get.offNamed(RouterPath.AUTH_LOGIN);
  17. }
  18. }