DataSourceDataActionsHttpSources<T extends BaseEntityDataModel> class

A Dio-based implementation of IBaseDataActionsSource for HTTP endpoints.

This class handles remote data actions by making HTTP requests to a backend API.

Inheritance

Constructors

DataSourceDataActionsHttpSources({String? baseUrl = "", required String url, Map<String, dynamic>? query, Map<String, dynamic>? params, T dataBuilder(Map<String, dynamic> jsondata, String? docId)?})
Standard constructor for DataSourceDataActionsHttpSources.
DataSourceDataActionsHttpSources.inputs({String? baseUrl = "", required String url, required T dataModyle, Map<String, dynamic>? query, Map<String, dynamic>? params, T dataBuilder(Map<String, dynamic> jsondata, String? docId)?, MultipartFile? file})
Factory constructor to create an instance with initial data.
factory

Properties

baseUrl ↔ String
The base URL for all requests.
getter/setter pair
data ↔ T?
The data model to be sent in the request body.
getter/setter pair
dataBuilder ↔ T Function(Map<String, dynamic> jsondata, String? docId)?
Optional builder function to construct the data model from JSON.
getter/setter pair
file ↔ MultipartFile?
Optional file to be uploaded in a multipart request.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
imagfileld ↔ String
The field name for the file in a multipart request.
getter/setter pair
params ↔ Map<String, dynamic>?
Additional parameters.
getter/setter pair
query ↔ Map<String, dynamic>?
Query parameters to be included in the request URL.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
url ↔ String
The specific endpoint path relative to the base URL.
getter/setter pair

Methods

addDataItem({String? id}) → Future<Result<RemoteBaseModel, RemoteBaseModel<String>>>
Adds a new data item.
override
deleteDataItem(String id) → Future<Result<RemoteBaseModel, RemoteBaseModel>>
Deletes a data item identified by id.
override
editeDataItem(String id) → Future<Result<RemoteBaseModel, RemoteBaseModel>>
Edits an existing data item identified by id.
override
getDataList() → Future<Result<RemoteBaseModel, RemoteBaseModel<List<T>>>>
Retrieves a list of data items.
override
getSingleData(String id) → Future<Result<RemoteBaseModel, RemoteBaseModel<T>>>
Retrieves a single data item identified by id.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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