getBool function
- @Deprecated('Use getBoolAsync instead without using await')
- String key, {
- dynamic defaultValue = false,
Returns a Bool if exists in SharedPref
Implementation
@Deprecated('Use getBoolAsync instead without using await')
Future<bool> getBool(String key, {defaultValue = false}) async {
return await getSharedPref().then((pref) {
return pref.getBool(key) ?? defaultValue;
});
}