Flutter app not able to skip introduction screen for old users

I think your problem arises from here: prefShare.spAppGetter();

Since Future<bool> spAppGetter() async {...} is an async function returning a future you should call it with await so that you can be sure spAppGetter has completed before you call bool status = prefShare.isNew ?? false; and to do so you should mark your main function as async as well. Your main function would look something like this then:

void main() async {
  await prefShare.spAppGetter();
  bool status = prefShare.isNew ?? false;
    MaterialApp(home: status == true ? ButtonScreen() : Home()),

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top