getString method

String? getString(
  1. String key, {
  2. String? defaultValue,
})

Returns the stored String, or defaultValue if not found.

Implementation

String? getString(String key, {String? defaultValue}) {
  try {
    return _store.getString(key) ?? defaultValue;
  } catch (e, st) {
    throw StorageException(
      message: 'Failed to get String',
      key: key,
      cause: e,
      stackTrace: st,
    );
  }
}