getStringAsync function

String getStringAsync(
  1. String key, {
  2. String defaultValue = '',
})

Returns a String if exists in SharedPref

Implementation

String getStringAsync(String key, {String defaultValue = ''}) {
  return sharedPreferences.getString(key) ?? defaultValue;
}