FileUploadControllerModel class

The model that manages the upload state of a file. State is composed of:

  • FileUploadControllerModel.progress, track the file upload 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

Mixed-in types

Constructors

FileUploadControllerModel.new({required FileUploaderRef ref, bool startOnInit = true, double progress = 0, FileUploadStatus status = FileUploadStatus.waiting})
The model that manages the upload state of a file

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
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status FileUploadStatus
file upload status
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. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeCallback() → void Function()?
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() → void Function()?
return retry if is available else null
toString() String
A string representation of this object.
inherited
upload() → void
upload the file
uploadCallback() → void Function()?
return upload if is available else null

Operators

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