UFilePickerController class

State of a UFilePicker: already-uploaded files, newly picked files, removals and the cover.

Inheritance

Constructors

UFilePickerController({List<UFileData> existingFiles = const <UFileData>[], List<UFileData> files = const <UFileData>[], UFileData? cover})
UFilePickerController.fromMedia(List<UMediaResponse> media)
Starts from already-uploaded media; the one tagged TagMedia.cover is the cover.
factory

Properties

all → List<UFileData>
Every file (existing + new).
no setter
cover → UFileData?
File marked as cover.
no setter
coverChanged → bool
True when the cover changed.
no setter
existingFiles → List<UFileData>
Already-uploaded files that are still kept.
no setter
files → List<UFileData>
Newly picked files; a picked file's category is its first tag.
no setter
hasChanges → bool
True when files were added/removed/changed.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
removedFiles → List<UFileData>
Already-uploaded files the user removed.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(Iterable<UFileData> files) → void
Adds files.
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
isCover(UFileData file) → bool
True when file is the cover.
isNew(UFileData file) → bool
True for a file picked in this session (not uploaded yet).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
remove(UFileData file) → void
Removes a file.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
replace(Iterable<UFileData> files) → void
Replaces all files.
setCover(UFileData? file) → void
Marks the cover file.
toString() → String
A string representation of this object.
inherited

Operators

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