getString method

Future<String?> getString({
  1. required String key,
  2. String? defaultValue,
})

Implementation

Future<String?> getString({
  required String key,
  String? defaultValue,
}) async {
  try {
    return Database.getSharedPreferences().getString(key) ?? defaultValue;
  } catch (_) {}

  return defaultValue;
}