ApiResponse<BodyType, InnerType> class
Constructors
-
ApiResponse({dynamic bodyString, Pagination? pagination, int statusCode = 500, Map<
String, dynamic> ? headers, BodyType? body, Object? error, Map<String, dynamic> ? extra, required ApiRequest<BodyType, InnerType> request})
Properties
- body → BodyType?
-
final
- bodyString → dynamic
-
final
- error → Object?
-
Body of response if isSuccessful is false
final
-
extra
↔ Map<
String, dynamic> ? -
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, dynamic> ? -
final
- isSuccessful → bool
-
true if status code is >= 200 && <3
if false, error will contains the response
no setter
- pagination → Pagination?
-
final
-
request
→ ApiRequest<
BodyType, InnerType> -
final
-
resolve
→ ApiResponse<
BodyType, InnerType> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int
-
final
Methods
-
copyWith(
{int? statusCode, Object? error, Map< String, dynamic> ? headers, dynamic bodyString, BodyType? body, Pagination? pagination, Map<String, dynamic> ? extra, ApiRequest<BodyType, InnerType> ? request}) → ApiResponse<BodyType, InnerType> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited