collection<T> method

IsarCollection<T> collection<T>()

Get a collection by its type.

You should use the generated extension methods instead.

Implementation

IsarCollection<T> collection<T>() {
  requireOpen();
  final collection = _collections[T];
  if (collection == null) {
    throw IsarError('Missing ${T.runtimeType}Schema in Isar.open');
  }
  return collection as IsarCollection<T>;
}