I am trying to launch a 'How to Use' screen if the app launches for the first time using a FutureBuilder().
isFisrtTime() returns true if the app is launched for the first time.
Here is the FutureBuilder code:
body: FutureBuilder(
future: isFirstTime(),
initialData: Container(),
builder: (context, snapshot){
if(snapshot.data == true){
Navigator.pushNamed(context, '/howtouse');
return (currentScreen == 'Home')
? HomeBody()
: CBook(changeScreen: changeCurrentScreen);
}
else {
return (currentScreen == 'Home')
? HomeBody()
: CBook(changeScreen: changeCurrentScreen);
}
},
),
Please Help