firstError method

String? firstError(
  1. String field
)

Returns the first error message for field, or null if none exists.

Implementation

String? firstError(String field) {
  final list = _fieldErrors[field];
  return (list != null && list.isNotEmpty) ? list.first : null;
}