getBool method Null safety

bool getBool(
  1. {String? forKey}
)

Read as bool from persistent cache

Implementation

bool getBool({String? forKey}) {
  assert(forKey != null);
  final value = _storage[forKey];
  if (value == null) {
    return false;
  }
  return value;
}