first method
Execute and get first result (throws if not found)
Implementation
Future<T> first() async {
final result = await firstOrDefault();
if (result == null) {
throw Exception('No matching record found');
}
return result;
}
Execute and get first result (throws if not found)
Future<T> first() async {
final result = await firstOrDefault();
if (result == null) {
throw Exception('No matching record found');
}
return result;
}