StudioFileDrop class
A tray to put files in: a recess in the metal with an engraved dashed edge, what it takes printed in it and a key that opens the chooser. The files below it each show a row with its size, a fine meter while it goes up, and a key that takes it out.
Studio does not read the platform's files: onChoose does (with
file_selector or the like) and hands them back in files. A null
onChoose disables it.
Reads style's fill (the tray), then StudioThemeData.fileDropStyle.
StudioFileDrop(label: 'Audio', hint: 'WAV or MP3, up to 500 MB', files: files, onChoose: pick, onRemove: (f) => setState(() => files.remove(f)))
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- StudioFileDrop
Constructors
-
StudioFileDrop({Key? key, required VoidCallback? onChoose, List<
StudioFile> files = const [], ValueChanged<StudioFile> ? onRemove, String? label, String? hint, String? error, String chooseLabel = 'Choose a file', String removeLabel = 'Remove', bool multiple = true, StudioStyle? style}) -
A tray holding
files.const
Properties
- chooseLabel → String
-
The chooser key's legend.
final
- error → String?
-
What is wrong (it would not go up), under it.
final
-
files
→ List<
StudioFile> -
The files in it.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hint → String?
-
What it takes, printed in the tray.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String?
-
The label above it.
final
- multiple → bool
-
Whether it takes more than one file. Taking one (a cover, an avatar),
the file in it stands in the tray's place until it is taken out.
final
- onChoose → VoidCallback?
-
Opens the chooser; null disables it.
final
-
onRemove
→ ValueChanged<
StudioFile> ? -
Takes one out; null keeps them.
final
- removeLabel → String
-
A remove key's name ("Remove take-3.wav").
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → StudioStyle?
-
Its style, over StudioThemeData.fileDropStyle.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited