firstWhere method

  1. @override
Future<Map<String, dynamic>?> firstWhere(
  1. String column, [
  2. String? operator = '=',
  3. dynamic value,
  4. List<String> columns = const ['*'],
])
override

Implementation

@override
Future<Map<String, dynamic>?> firstWhere(
  String column, [
  String? operator = '=',
  value,
  List<String> columns = const ['*'],
]) async {
  if (value == null) {
    throw InvalidArgumentException(
      "Invalid input: Value cannot be null. A valid value must be provided for the firstWhere method.",
    );
  }
  where(column, operator ?? '=', value);
  return await first(columns);
}