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
September 11, 2023
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