firstByField method

Where firstByField (
  1. String fieldName,
  2. List<WhereCondition> conditions
)

Find the first occurrance of a condition that evaluates a specific field For all conditions, use byField.

Implementation

static Where firstByField(String fieldName, List<WhereCondition> conditions) {
  final results = byField(fieldName, conditions);
  if (results?.isEmpty ?? true) return null;
  return results.first;
}