how can I show a logo at app start, during those few seconds of loading?
FB, for example, shows this:
how can I show a logo at app start, during those few seconds of loading?
FB, for example, shows this:
Just add a widget with delay function
void main() {
runApp(DisplayLogo());
}
class DisplayLogo extends StatefulWidget {
@override
_State createState() => _State();
}
class _State extends State<DisplayLogo> {
initState() {
super.initState();
///add delay here
Timer(Duration(seconds: 2), () {
if(mounted)
runApp(MainApp());
});
}
@override
Widget build(BuildContext context) {
return Container(
color: Colors.white,
child: Center(
child: FlutterLogo(size: 300),
));
}
}