asNonNullableMap<T> method

Map<String, T> asNonNullableMap<T>({
  1. String? format,

Returns the content of this snapshot as a non-nullable map with value objects of type T.

The content should be a map and the value items of the map should be convertible to objects of type T.

The returned map is cached and unmodifiable.


Map<String, T> asNonNullableMap<T>({String? format}) {
  if (value == null) throw TypeError();
  return asMap(format: format) as Map<String, T>;