FileUploader class
A button that handles file uploads.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- FileUploader
Constructors
- FileUploader.new({required FileUploaderBuilderCallback builder, Key? key, double height = _kButtonHeight, double width = double.maxFinite, OnFileAdded? onFileAdded, OnPressedAddFilesCallback? onPressedAddFiles, Widget? placeholder, BoxBorder? border, BorderRadiusGeometry? borderRadius, FileUploaderLogger? logger, double gap = _kBuilderGap, OnFileRemoved? onFileRemoved, OnFileUploaded? onFileUploaded, int? limit, Widget errorBuilder(BuildContext context, dynamic errorOnFiles)?, Widget loadingBuilder(BuildContext context)?, bool? hideOnLimit, Color? color})
-
Upon tapping, the
onPressedAddFiles
function is triggered, and thenonFileAdded
is called for each file.const
Properties
- border → BoxBorder?
-
border of FileUploader
final
- borderRadius → BorderRadiusGeometry?
-
border radius of FileUploader
final
- builder → FileUploaderBuilderCallback
-
used to create the file upload handler
final
- color → Color?
-
FileUploader color used on default border and tap effects.
final
- errorBuilder → Widget Function(BuildContext context, dynamic errorOnFiles)?
-
child of FileUploader when some files went in error under processing
final
- gap → double
-
gap between builder widgets
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
height of the button
final
- hideOnLimit → bool?
-
hide file uploader button on limit reached
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- limit → int?
-
maximum number of files that can be uploaded
final
- loadingBuilder → Widget Function(BuildContext context)?
-
child of FileUploader under processing
final
- logger → FileUploaderLogger?
-
logger
final
- onFileAdded → OnFileAdded?
-
after onPressedAddFiles for every file the onFileAdded is called
final
- onFileRemoved → OnFileRemoved?
-
every time a file is removed
final
- onFileUploaded → OnFileUploaded?
-
every time a file is uploaded
final
- onPressedAddFiles → OnPressedAddFilesCallback?
-
callback fired when FileUploader is tapped
final
- placeholder → Widget?
-
child of FileUploader when is waiting files
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → double
-
width of the button
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.
inherited
-
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