FileServiceNotifier class

A provider that manages the business logic for file operations.

This provider handles all file-related operations including upload, download, and deletion, while maintaining the state of these operations.

Inheritance

Constructors

FileServiceNotifier.new({required bool isVaccination, required bool isDiary, required bool isMedication, required bool isBloodPressure})

Properties

debugState FileState
A development-only way to access state outside of StateNotifier.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
If a listener has been added using addListener and hasn't been removed yet.
no setterinherited
isBloodPressure bool
final
isDiary bool
final
isMedication bool
final
isVaccination bool
final
mounted bool
Whether dispose was called or not.
no setterinherited
onError ErrorListener?
A callback for error reporting if one of the listeners added with addListener throws.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state FileState
The current "state" of this StateNotifier.
getter/setter pairinherited
stream Stream<FileState>
A broadcast stream representation of a StateNotifier.
no setterinherited

Methods

addListener(Listener<FileState> listener, {bool fireImmediately = true}) RemoveListener
Subscribes to this object.
inherited
dispose() → void
Frees all the resources associated with this object.
inherited
handleDelete(BuildContext context) Future<void>
Handles file deletion from the POD.
handleDownload(BuildContext context) Future<void>
Handles the download and decryption of files from the POD.
handleUpload(BuildContext context) Future<void>
Handles file upload by reading its contents and encrypting it for upload.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshBrowser() → void
setDownloadFile(String file) → void
Updates the selected file for download.
setFilePreview(String preview) → void
Updates the file preview content.
setRefreshCallback(Function callback) → void
setRemoteFileName(String fileName) → void
Updates the remote file name.
setUploadFile(String? file) → void
Updates the selected file for upload.
togglePreview() → void
Toggles the preview visibility.
toString() String
A string representation of this object.
inherited
updateCurrentPath(String path) → void
Updates the current path and notifies listeners.
updateImportInProgress(bool inProgress) → void
Updates import in progress state.
updateShouldNotify(FileState old, FileState current) bool
Whether to notify listeners or not when state changes
inherited

Operators

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