NetworkFailure class
No connection or the request timed out.
Constructors
-
NetworkFailure({Iterable<
String> messages = const []})
Properties
- defaultMessage → String
-
Plain English text for this kind of problem, for when the backend sent
no message. Each failure type has its own; an app's own failure types
override it, and an app may always show its own text instead.
no setteroverride
- displayMessage → String
-
What to show the user: the backend's message, else defaultMessage.
no setterinherited
-
fieldErrors
→ Map<
String, List< String> > -
Problems per form field, e.g.
{'email': ['Already registered']}, so a form can show them under the right field. Empty when the backend sent none.finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- message → String?
-
All messages on one line each, or null when there are none.
no setterinherited
-
messages
→ List<
String> -
Texts from the backend, ready to show. Empty when the backend gave
none, then show displayMessage (or the app's own text).
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
fieldError(
String field) → String? -
The first problem for
field, or null, handy as a field'serrorText.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited