APIResponse<T> class

Constructors

APIResponse(bool success, String message, int statusCode, {Map<String, String>? errors, dynamic body, T? value})
const

Properties

body → dynamic
final
errors Map<String, String>?
final
hashCode int
The hash code for this object.
no setterinherited
message String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
final
success bool
final
value → T?
final

Methods

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

Static Methods

fromResponse<T>(String response, int statusCode, {bool log = true, String errorsField = 'errors', Map<String, String> decodeErrors(Map errors)?}) APIResponse<T>