splash_page.dart 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/src/widgets/framework.dart';
  3. import 'package:flutter_screenutil/flutter_screenutil.dart';
  4. import 'package:location/base/base_page.dart';
  5. import 'package:location/module/splash/splash_controller.dart';
  6. import 'package:location/resource/assets.gen.dart';
  7. import '../main/main_page.dart';
  8. class SplashPage extends BasePage<SplashController> {
  9. const SplashPage({super.key});
  10. @override
  11. bool immersive() {
  12. return true;
  13. }
  14. @override
  15. Widget buildBody(BuildContext context) {
  16. Future.delayed(Duration(seconds: 1), () {
  17. MainPage.start();
  18. });
  19. //测试代码
  20. return Stack(
  21. children: [
  22. Assets.images.bgPageBackground.image(width: double.infinity),
  23. Column(
  24. children: [
  25. SizedBox(height: 170.h),
  26. Center(
  27. child: Assets.images.iconLogo.image(width: 76.w, height: 76.w)),
  28. ],
  29. ),
  30. Padding(
  31. padding: EdgeInsets.only(bottom: 40.h),
  32. child: Align(
  33. alignment: Alignment.bottomCenter,
  34. child: Assets.images.iconSplashTitle.image(width: 167.w)),
  35. )
  36. ],
  37. );
  38. }
  39. }