Open baimamboukar opened 1 year ago
i added some code please add this code to your project
import 'dart:async';
import 'package:band_two_pro/utils/routes/route_name.dart'; import 'package:flutter/material.dart';
class SplashPage extends StatefulWidget { const SplashPage({Key? key}) : super(key: key);
@override
State
class _SplashPageState extends State
SplashServer(BuildContext context){ Timer(Duration(seconds: 3), () { Navigator.pushNamed(context, RoutesName.location); }); }
@override void initState() { // TODO: implement initState super.initState(); SplashServer(context); } Widget build(BuildContext context) { final size = MediaQuery.sizeOf(context); return Container( decoration: BoxDecoration( image: DecorationImage( image: AssetImage("assets/images/img.png"), fit: BoxFit.fill, ), ), child: Scaffold( backgroundColor: Colors.transparent, body: Container( height: size.height 1, width: size.width 1, decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ Colors.black.withOpacity(0.2), Colors.black.withOpacity(0.2), ], ), ), ), ), ); } }
I would like to add splash screen. Please assign this issue to me.
A splash screen is the initial screen that appears when the app is launched, providing a smooth and visually appealing transition into the main interface. This task involves designing and implementing a splash screen for your Flutter mobile app
Todo
flutter_native_splash
package or manually create a custom splash screen.