RemoteBaseModel<T> class
A generic class that represents a remote data model.
This class is used to encapsulate the data, status, message, and error information retrieved from a remote source.
Constructors
- RemoteBaseModel({StatusModel? status, String? message, T? data, Object? error})
- Constructs a RemoteBaseModel instance with optional parameters.
-
RemoteBaseModel.fromJson(Map<
String, dynamic> json) -
Creates a RemoteBaseModel instance from a JSON map.
factory
Properties
- data ↔ T?
-
The data retrieved from the remote source.
getter/setter pair
- error ↔ Object?
-
An optional error object if the remote operation failed.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- message ↔ String?
-
An optional message associated with the remote operation.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status ↔ StatusModel?
-
The status of the remote operation.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the RemoteBaseModel instance to a JSON map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited