error property

String? get error

Returns the first general error message, or null if there are no errors.

This is a convenience getter for accessing the most important general error when you only need to display a single error message to the user.

Implementation

String? get error => generalErrors.isNotEmpty ? generalErrors[0] : null;