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