asNonNullableList<T> method

List<T> asNonNullableList<T>({
  1. String? format,
})

Returns the content of this snapshot as a non-nullable list of objects of type T.

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

The returned list is cached and unmodifiable.

Implementation

List<T> asNonNullableList<T>({String? format}) {
  if (value == null) throw TypeError();
  return asList<T>(format: format)!;
}