I am using getx.
I want to add a delay to the initialRoute of GetMatrialApp.
initialRoute : splash screen
I want to stay on splashscrren for 2-3 seconds and then go to the login screen.
There is no delay even if you put a delay function in the splashscreen's init function.
init function :
void initState() {
Timer(Duration(seconds: 3), () async {
await Navigator.of(context).pushReplacement(
MaterialPageRoute(builder: (BuildContext context) => loginScreen()));
});
super.initState();
}