Uncategorized

What does sharedPreferences return?

It returns a future when you create an instance of it.

So you need to initialize it like below

final sharedPreferences = await SharedPreferences.getInstance();

Learn more about it on here

Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *