ResponseItemDTO<T> class
A class for handling response items.
This class represents a response item, with a status, message, error, and required validation errors. It also provides methods to convert the response item to and from a JSON object.
Constructors
-
ResponseItemDTO({required ResponseModel response, dynamic fromJson(Map<
String, dynamic> )?, bool isSingleData = false}) - Creates a new instance of ResponseItemDTO.
Properties
- error → dynamic
-
no setter
-
fromJson
→ dynamic Function(Map<
String, dynamic> )? -
The function to convert the item from a JSON object.
final
- hasError → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- item ↔ T?
-
The item of the response.
getter/setter pair
- message → String?
-
no setter
-
required
→ List<
ValidationErrorModel> ? -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → int?
-
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the ResponseItemDTO to a JSON object.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited