splash_page.dart 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import 'package:app/main.dart';
  2. import 'package:app/router/page/app_page_router.dart';
  3. import 'package:cs_resources/theme/app_colors_theme.dart';
  4. import 'package:flutter/material.dart';
  5. import 'package:hooks_riverpod/hooks_riverpod.dart';
  6. import 'package:cs_resources/generated/assets.dart';
  7. import 'package:shared/utils/size_config.dart';
  8. import 'package:widgets/my_load_image.dart';
  9. import 'package:auto_route/annotations.dart';
  10. import '../vm/splash_view_model.dart';
  11. import 'package:auto_route/auto_route.dart';
  12. @RoutePage()
  13. class SplashPage extends HookConsumerWidget {
  14. const SplashPage({super.key});
  15. @override
  16. Widget build(BuildContext context, WidgetRef ref) {
  17. SizeConfig().init(context);
  18. final viewModel = ref.watch(splashViewModelProvider.notifier)..setContext(context);
  19. return Scaffold(
  20. backgroundColor: context.appColors.backgroundWhite,
  21. body: const Center(
  22. child: MyAssetImage(
  23. Assets.assetsYyHomeSplash,
  24. width: 84.5,
  25. height: 100,
  26. fit: BoxFit.contain,
  27. ),
  28. ),
  29. );
  30. }
  31. }