LocalMirror class

backend Singleton to provide all functionality related to the backend

Constructors

LocalMirror.new()
factory

Properties

failedRequestWasSuccessful → dynamic Function(String id, {bool wasntTho = false})
final
getAllFailedRequests Future<List<(String, RequestData?)>?> Function()
final
hashCode int
The hash code for this object.
no setterinherited
logFailedReq Future<String> Function(RequestData rd)
final
readDoc Future<File?> Function(String name, {int? cacheSize})
final
readImage Future<Image?> Function(String name, {int? cacheSize})
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storeData Future<String> Function<DataT extends Data>(DataT data, {bool addId = true, required String forId, OverrideMode overrideMode = OverrideMode.update})
final
storeDoc Future<File?> Function(Uint8List imgBytes, String name)
final
storeImage Future<File?> Function(Uint8List imgBytes, String name)
final

Methods

delete<DataT extends Data>(DataT? data, {Data? caller}) Future<String?>
deletes a DataT and returns the response
deleteImageByHash<DataT extends Data>(DataT? data, String hash, {Data? caller, bool forceUpdate = false}) Future<String?>
deletes an image specified by its hash and returns the response
getDocument(String docPath) Future<File?>
getImageByHash(String hash, {bool compressed = false}) Future<ImageData<Object>?>
getNextDatapoint<ChildData extends Data, ParentData extends WithOffline?>(ParentData data) Future<List<ChildData>>
gets all the ChildDatapoints for the given ParentData if no ParentData is given it defaults to root
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setMainImageByHash<DataT extends Data>(DataT? data, String mainhash, {Data? caller, bool forceUpdate = false}) Future<String?>
sets an image specified by its hash as the new main image
setNew<DataT extends Data>(DataT? data, {Data? caller}) Future<DataT?>
sets a new DataT
toString() String
A string representation of this object.
inherited
update<DataT extends Data>(DataT? data, {Data? caller, bool forceUpdate = false}) Future<String?>
updates a DataT and returns the response
uploadNewImagesOrFiles<DataT extends Data>(DataT data, List<XFile> files, {Data? caller, bool forceUpdate = false}) Future<String?>
upload a bunch of images

Operators

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