You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:my_flutter_puzzle/screens/level_list/cubit/level_list_cubit.dart'; import 'package:my_flutter_puzzle/screens/level_list/screen/level_list_screen.dart'; import 'package:my_flutter_puzzle/utils/extensions/string_extensions.dart';
class SplashScreen extends StatefulWidget { const SplashScreen({Key? key}) : super(key: key);
@override State<SplashScreen> createState() => _SplashScreenState(); }
class _SplashScreenState extends State<SplashScreen> { @override void initState() { Timer(const Duration(milliseconds: 2000), () { Navigator.push(context, MaterialPageRoute( builder: (context) { return const LevelListScreen(); }, )); }); super.initState(); }
@override Widget build(BuildContext context) { return Scaffold( backgroundColor: const Color(0xff6236FF), body: Center( child: Container( decoration: BoxDecoration( image: DecorationImage( image: AssetImage('splash_screen_image'.pngPath), ), ), ), ), ); } }
|