findFirst method

  1. @override
Future<T?> findFirst()
override

Runs the query and returns the first result, or null if there is none.

Implementation

@override
Future<T?> findFirst() async {
  final results = await findAll();
  return results.isEmpty ? null : results.first;
}