single method

(Entity, A) single()

Implementation

(Entity, A) single() {
  final match = singleOrNull();
  if (match == null) {
    throw StateError(
      'Query1<$A>.single: expected exactly one matching entity, found none.',
    );
  }
  return match;
}