first method

Future<Map<String, dynamic>?> first()

Returns the first result or null

Implementation

Future<Map<String, dynamic>?> first() async {
  final results = await limit(1).get();
  return results.isEmpty ? null : results.first;
}