getString method

String? getString(
  1. String key
)

Access a String value.

Returns null if there is no such key or if it is not a String.

Implementation

String? getString(String key) {
  if (get(key) is! String) {
    return null;
  }

  return get(key);
}