ApiResponse<T> class Null safety

every request will wrap its response with this contains api status, body data, and error message

Constructors

ApiResponse.completed({T? data, dynamic jsonMap, int? statusCode, String? message})
ApiResponse.error({String? message, int? statusCode, T? data})
ApiResponse.loading()

Properties

data ↔ T?
read / write
hashCode int
The hash code for this object.
read-onlyinherited
jsonMap ↔ dynamic
read / write
message String?
read / write
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
status ApiStatus
read / write
statusCode int?
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited