backend/offlineProvider library

Enums

OverrideMode

Extensions

SerializableBaseRequest on BaseRequest
SerializableMultiPartReq on MultipartRequest
SerializableRequest on Request

Constants

FAILEDCOLLECTION → const String
OTHERCOLLECTION → const String
SKIPPEDCOLLECTION → const String
useOldImgEncoding → const bool

Properties

db Localstore
final
failedReqLogCollection CollectionRef
final
localPath Future<String>
no setter
otherCollection CollectionRef
final
skippedReqLogCollection CollectionRef
final

Functions

convertToCompressedHashName(String hash) String
deleteAll({bool keepSkippedRequests = false}) Future<void>
deleteData<DataT extends Data>(String id, {required String parentId}) Future
deletes a DataT via its id and corresponding parentId
deleteImage(String name) Future<File>
tries to remove an Image given by its name , throws if unsuccessful
failedRequestWasSuccessful(String id, {bool wasntTho = false}) → dynamic
getAllChildrenFrom<ChildData extends Data>(String id) Future<List<ChildData?>?>
this is probably the most used in this project it returns all Data (ChildData) -points that correspond to the ParentData with given id
getAllFailedRequests() Future<List<(String, RequestData?)>?>
returns a List of weird structures of the id of the failed request and a tuple where exactly one is null, either a http.Response or an http.MultipartRequest
getJson(String documentName) Future<Map<String, dynamic>?>
localFile(String name, [String? doc]) Future<File>
logFailedReq(RequestData rd) Future<String>
permaStoreCachedXFile(XFile file, [String? _name]) Future<String>
readDoc(String name, {int? cacheSize}) Future<File?>
readImage(String name, {int? cacheSize}) Future<Image?>
tries to open an Image given by its name and returns it if successful
retrieveData<DataT extends Data>(String id, {required String parentId}) Future<DataT?>
retrieves a DataT via its id and corresponding parentId
retrieveStoredXFile(String name) Future<XFile>
storeData<DataT extends Data>(DataT data, {required String forId, bool addId = true, OverrideMode overrideMode = OverrideMode.update}) Future<String>
permanently stores a DataT in its corresponding collection
storeDoc(Uint8List imgBytes, String name) Future<File?>
storeImage(Uint8List imgBytes, String name) Future<File?>
stores the imgBytes as an image given by the name, returns the new File
storeJson(String documentName, Map<String, dynamic> json) → dynamic

Exceptions / Errors

NoImagePlaceholderException