import 'package:clean/base/base_page.dart';
import 'package:clean/module/main/main_view.dart';
import 'package:clean/module/splash/splash_controller.dart';
import 'package:clean/resource/assets.gen.dart';
import 'package:clean/resource/string.gen.dart';
import 'package:flutter/Material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:lottie/lottie.dart';

class SplashPage extends BasePage<SplashController> {
  const SplashPage({super.key});

  @override
  bool immersive() {
    return true;
  }

  @override
  bool statusBarDarkFont() {
    return false;
  }

  @override
  Widget buildBody(BuildContext context) {
    return Stack(children: [
      Container(
        width: double.infinity,
        height: double.infinity,
        child: SafeArea(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.center,
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                SizedBox(
                    child: Lottie.asset(
                  Assets.anim.animSplash,
                  controller: controller.animation,
                  width: 150.w,
                  height: 150.w,
                  repeat: true,
                )),
                Text(
                  StringName.appName,
                  textAlign: TextAlign.center,
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 24.sp,
                    fontWeight: FontWeight.w900,
                  ),
                ),
              ],
            )),
      ),
      IgnorePointer(
        child: Assets.images.bgPhotoSelectedPreviewFinish.image(
          width: 360.w,

        ),
      ),
    ]);
  }


}
