splash_page.dart 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import 'dart:io';
  2. import 'package:flutter/cupertino.dart';
  3. import 'package:flutter/src/widgets/framework.dart';
  4. import 'package:flutter_screenutil/flutter_screenutil.dart';
  5. import 'package:get/get.dart';
  6. import 'package:get/get_core/src/get_main.dart';
  7. import 'package:location/base/base_page.dart';
  8. import 'package:location/data/consts/app_config.dart';
  9. import 'package:location/module/splash/splash_controller.dart';
  10. import 'package:location/resource/assets.gen.dart';
  11. class SplashPage extends BasePage<SplashController> {
  12. SplashPage({super.key});
  13. @override
  14. final SplashController controller = Get.put(SplashController());
  15. @override
  16. bool immersive() {
  17. return true;
  18. }
  19. @override
  20. Widget buildBody(BuildContext context) {
  21. return Stack(
  22. children: [
  23. Assets.images.bgPageBackground.image(width: double.infinity),
  24. Column(
  25. children: [
  26. SizedBox(height: 170.h),
  27. Center(
  28. child: BuildConfig.logoImage.image(width: 76.w, height: 76.w)),
  29. ],
  30. ),
  31. Padding(
  32. padding: EdgeInsets.only(bottom: 40.h),
  33. child: Align(
  34. alignment: Alignment.bottomCenter,
  35. child: Platform.isAndroid
  36. ? Assets.images.iconSplashTitleAndroid.image(width: 167.w)
  37. : Assets.images.iconSplashTitleIos.image(width: 167.w)),
  38. )
  39. ],
  40. );
  41. }
  42. }