getInt function
- @Deprecated('Use getIntAsync instead without using await')
- String key, {
- dynamic defaultValue = 0,
Returns a Int if exists in SharedPref
Implementation
@Deprecated('Use getIntAsync instead without using await')
Future<int> getInt(String key, {defaultValue = 0}) async {
return await getSharedPref().then((pref) {
return pref.getInt(key) ?? defaultValue;
});
}