$CollectionService class
- Inheritance
-
- Mixed-in types
-
Methods
-
create({RequestPolicy requestPolicy = RequestPolicy.cacheAndNetwork, Map<String, dynamic> body = const {}, Map<String, dynamic> query = const {}, List<MultipartFile> files = const [], String? expand, String? fields})
→ Future<CollectionModel>
-
Creates a new item.
inherited
-
delete(String id, {RequestPolicy requestPolicy = RequestPolicy.cacheAndNetwork, Map<String, dynamic> body = const {}, Map<String, dynamic> query = const {}, })
→ Future<void>
-
Deletes an single item by its id.
inherited
-
getFirstListItem(String filter, {String? expand, String? fields, Map<String, dynamic> query = const {}, RequestPolicy requestPolicy = RequestPolicy.cacheAndNetwork})
→ Future<CollectionModel>
-
Returns the first found list item by the specified filter.
override
-
getFirstListItemOrNull(String filter, {String? expand, String? fields, Map<String, dynamic> query = const {}, RequestPolicy requestPolicy = RequestPolicy.cacheAndNetwork})
→ Future<CollectionModel?>
-
inherited
-
getFullList({int batch = 200, String? expand, String? filter, String? sort, String? fields, Map<String, dynamic> query = const {}, RequestPolicy requestPolicy = RequestPolicy.cacheAndNetwork, Duration timeout = const Duration(seconds: 30)})
→ Future<List<CollectionModel>>
-
Returns a list with all items batch fetched at once.
inherited
-
getList({int page = 1, int perPage = 30, bool skipTotal = false, String? expand, String? filter, String? sort, String? fields, Map<String, dynamic> query = const {}, RequestPolicy requestPolicy = RequestPolicy.cacheAndNetwork, Duration timeout = const Duration(seconds: 30)})
→ Future<ResultList<CollectionModel>>
-
Returns paginated items list.
inherited
-
getOne(String id, {String? expand, String? fields, Map<String, dynamic> query = const {}, RequestPolicy requestPolicy = RequestPolicy.cacheAndNetwork})
→ Future<CollectionModel>
-
Returns single item by its id.
override
-
getOneOrNull(String id, {String? expand, String? fields, Map<String, dynamic> query = const {}, RequestPolicy requestPolicy = RequestPolicy.cacheAndNetwork})
→ Future<CollectionModel?>
-
inherited
-
getScaffolds({Map<String, dynamic> body = const {}, Map<String, dynamic> query = const {}, })
→ Future<Map<String, CollectionModel>>
-
Returns type indexed map with scaffolded collection models
populated with their default field values.
inherited
-
import(List<CollectionModel> collections, {bool deleteMissing = false, Map<String, dynamic> body = const {}, Map<String, dynamic> query = const {}, })
→ Future<void>
-
Imports the provided collections.
inherited
-
itemFactoryFunc(Map<String, dynamic> json)
→ CollectionModel
-
The factory function (eg.
fromJson()) that will be used to
decode the returned items from the crud endpoints.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
setLocal(List<CollectionModel> items, {bool removeAll = true})
→ Future<void>
-
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
truncate(String collectionIdOrName, {Map<String, dynamic> body = const {}, Map<String, dynamic> query = const {}, })
→ Future<void>
-
Deletes all records associated with the specified collection.
inherited
-
update(String id, {RequestPolicy requestPolicy = RequestPolicy.cacheAndNetwork, Map<String, dynamic> body = const {}, Map<String, dynamic> query = const {}, List<MultipartFile> files = const [], String? expand, String? fields})
→ Future<CollectionModel>
-
Updates an single item by its id.
inherited