TermFileField class

A field for files: a framed box titled labelText saying where they come from, a browse button that calls onBrowse (the app opens its own picker), and each file chosen as a tag with × to take it away.

TermFileField(
  labelText: 'attach logs',
  files: picked,
  onBrowse: pickFiles,
  onRemoved: (i) => setState(() => picked.removeAt(i)),
)
Inheritance

Constructors

TermFileField({Key? key, required List<String> files, required VoidCallback? onBrowse, ValueChanged<int>? onRemoved, String? labelText, String hintText = 'no file chosen', String? helperText, TermStyle? style})
A field holding files.
const

Properties

files → List<String>
The files' names.
final
hashCode → int
The hash code for this object.
no setterinherited
helperText → String?
Help, dim, under the box.
final
hintText → String
What it says with no file.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelText → String?
What the field is for, cut into its top line.
final
onBrowse → VoidCallback?
Opens the app's picker; null disables the field.
final
onRemoved → ValueChanged<int>?
Takes the file at an index away; null: they stay.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
style → TermStyle?
Overrides, over the theme's TermThemeData.textFieldStyle: edge (the frame) and foreground (the names).
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