ApiResponse class
Represents a response from an API, including the response data, a digital signature, and a flag indicating whether the signature is valid.
Constructors
-
ApiResponse({required Map<
String, dynamic> response, required String signature, required bool isSignatureValid}) - Constructs an instance of ApiResponse.
-
ApiResponse.fromJson(Map<
String, dynamic> json, bool isSignatureValid) -
Creates an instance of ApiResponse from a JSON map.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSignatureValid → bool
-
A flag indicating whether the digital signature is valid.
This is typically determined by verifying the signature against the response data.
final
-
response
→ Map<
String, dynamic> -
The actual response data returned from the API.
This is typically a map containing key-value pairs of the API's response.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- signature → String
-
A digital signature associated with the response.
This is used to verify the authenticity and integrity of the response.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the ApiResponse object into a JSON map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited