ApiDataSource<T extends Entity<EntityKey>> class abstract

Constructors

ApiDataSource({required Api api, required String path, DataEncryptor? encryptor})

Properties

api Api
final
database → Dio
no setter
encryptor → DataEncryptor?
finalinherited
hashCode int
The hash code for this object.
no setterinherited
isEncryptor bool
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(dynamic source) → T
inherited
checkById(String id, {bool isConnected = false, DataFieldParams? params}) Future<Response<T>>
Method to check data by ID with optional data source builder.
clear({bool isConnected = false, DataFieldParams? params}) Future<Response<T>>
Method to clear data with optional data source builder.
count({DataFieldParams? params}) Future<Response<int>>
Method to count data with optional data source builder.
inherited
create(T data, {bool isConnected = false, DataFieldParams? params}) Future<Response<T>>
Method to create data with optional data source builder.
creates(List<T> data, {bool isConnected = false, DataFieldParams? params}) Future<Response<T>>
Method to create multiple data entries with optional data source builder.
deleteById(String id, {bool isConnected = false, DataFieldParams? params}) Future<Response<T>>
Method to delete data by ID with optional data source builder.
deleteByIds(List<String> ids, {bool isConnected = false, DataFieldParams? params}) Future<Response<T>>
Method to delete data by multiple IDs with optional data source builder.
execute<S extends Object>(Future<Response<S>> callback()) Future<Response<S>>
inherited
executeStream<S extends Object>(Stream<Response<S>> callback()) Stream<Response<S>>
inherited
get({bool isConnected = false, DataFieldParams? params}) Future<Response<T>>
Method to get data with optional data source builder.
getById(String id, {bool isConnected = false, DataFieldParams? params}) Future<Response<T>>
Method to get data by ID with optional data source builder.
getByIds(List<String> ids, {bool isConnected = false, DataFieldParams? params}) Future<Response<T>>
Method to get data by multiple IDs with optional data source builder.
getByQuery({bool isConnected = false, DataFieldParams? params, List<DataQuery> queries = const [], List<DataSelection> selections = const [], List<DataSorting> sorts = const [], DataPagingOptions options = const DataPagingOptions()}) Future<Response<T>>
Method to get data by query with optional data source builder.
listen({bool isConnected = false, DataFieldParams? params}) Stream<Response<T>>
Stream method to listen for data changes with optional data source builder.
listenById(String id, {bool isConnected = false, DataFieldParams? params}) Stream<Response<T>>
Stream method to listen for data changes by ID with optional data source builder.
listenByIds(List<String> ids, {bool isConnected = false, DataFieldParams? params}) Stream<Response<T>>
Stream method to listen for data changes by multiple IDs with optional data source builder.
listenByQuery({bool isConnected = false, DataFieldParams? params, List<DataQuery> queries = const [], List<DataSelection> selections = const [], List<DataSorting> sorts = const [], DataPagingOptions options = const DataPagingOptions()}) Stream<Response<T>>
Stream method to listen for data changes by query with optional data source builder.
listenCount({DataFieldParams? params}) Stream<Response<int>>
Method to listenCount data with optional data source builder.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
Method to check data by query with optional data source builder.
toString() String
A string representation of this object.
inherited
updateById(String id, Map<String, dynamic> data, {bool isConnected = false, DataFieldParams? params}) Future<Response<T>>
Method to update data by ID with optional data source builder.
updateByIds(List<UpdatingInfo> updates, {bool isConnected = false, DataFieldParams? params}) Future<Response<T>>
Method to update data by multiple IDs with optional data source builder.

Operators

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