first method

Future<T?> first()

Returns the first matching model, or null if none found.

Implementation

Future<T?> first() async {
  final row = await _builder.first();
  if (row == null) return null;
  final model = _factory(row);
  model.setRawData(_executor, row);
  return model;
}