FileUploadControllerModel class
The model that manages the upload state of a file. State is composed of:
FileUploadControllerModel.progress, track the file upload progress- FileUploadControllerModel.transformationProgress, track the file transformation progress
FileUploadControllerModel.status, file upload status
Expose uploadCallback and retryCallback to run the file upload. upload and retry run the same functions as uploadCallback and retryCallback
This model has everything needed to FileCard to show the file upload state.
- Mixed-in types
Constructors
- FileUploadControllerModel({required FileUploaderRef ref, bool startOnInit = true, double progress = 0, FileUploadStatus status = FileUploadStatus.waiting})
- The model that manages the upload state of a file. State is composed of:
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- progress → double
-
file upload progress (0..1)
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → FileUploadStatus
-
file upload status
no setter
- transformationProgress → double
-
file transformation progress (0..1).
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeCallback(
) → VoidCallback? - callback to remove the file uploaded
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
retry(
) → void - retry the file upload
-
retryCallback(
) → VoidCallback? - return retry if is available else null
-
toString(
) → String -
A string representation of this object.
inherited
-
upload(
) → void - upload the file
-
uploadCallback(
) → VoidCallback? - return upload if is available else null
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited