getString method

String? getString(
  1. String key
)

Reads a value from persistent storage, throwing an exception if it's not a String.

Implementation

String? getString(String key) => _preferenceCache[key] as String?;