sharedPrefs function
Implementation
Future<SharedPreferences> sharedPrefs() async {
if (_sharedPrefCompl == null) {
if (isDevBuild) {
// on dev we put this into a prefix to separate from any installed version
SharedPreferences.setPrefix('dev.flutter');
}
final Completer<SharedPreferences> completer =
Completer<SharedPreferences>();
completer.complete(SharedPreferences.getInstance());
_sharedPrefCompl = completer;
}
return _sharedPrefCompl!.future;
}