ApiError class

Constructors

ApiError({String? attribute, String? type, Map<String, String>? details, String? message})
Returns a new ApiError instance.

Properties

attribute ↔ String?
The attribute that this error applies to. Omitted if this error is not in the context of a resource, or cannot be isolated to a single attribute.
getter/setter pair
details ↔ Map<String, String>?
Variables associated with this error that can be injected into a custom error template, or used to parameterize any other programatic actions.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
message ↔ String?
A human-readable, English description of the error.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type ↔ String?
A classification for this error, which can be used to render the appropriate custom error template, or take other programmatic actions.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → ApiError?
Returns a new ApiError instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<ApiError>
mapFromJson(dynamic json) → Map<String, ApiError>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<ApiError>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.