FormeFileGrid class

Inheritance

Constructors

FormeFileGrid({int? maximum, Key? key, String? name, List<FormeFile> initialValue = const [], FormeAsyncValidator<List<FormeFile>>? asyncValidator, Duration? asyncValidatorDebounce, AutovalidateMode? autovalidateMode, FormeFieldDecorator<List<FormeFile>>? decorator, bool enabled = true, FocusNode? focusNode, FormeFieldInitialized<List<FormeFile>>? onInitialized, FormeFieldSetter<List<FormeFile>>? onSaved, FormeFieldStatusChanged<List<FormeFile>>? onStatusChanged, int? order, bool quietlyValidate = false, bool readOnly = false, bool requestFocusOnUserInteraction = true, FormeFieldValidationFilter<List<FormeFile>>? validationFilter, FormeValidator<List<FormeFile>>? validator, bool showFilePickerWhenReadOnly = true, bool disableFilePicker = false, Color? filePickerColor, Color? filePickerDisabledColor, Widget? filePickerChild, bool showGridItemRemoveWidget = true, Widget imageLoadingErrorBuilder(BuildContext context, FormeFile item, VoidCallback retry, Object error, StackTrace? stackTrace)?, BoxFit imageFit = BoxFit.cover, bool removable(FormeFile image, int index)?, bool draggable(FormeFile item, int index)?, Duration? longPressDelayStartDrag, Widget childWhenDraggingBuilder(BuildContext context, FormeFile item, int index, Widget child)?, Widget feedbackBuilder(BuildContext context, FormeFile item, int index, Widget child, Size? size)?, bool reOrderable = true, Widget imageLoadingBuilder(BuildContext context, FormeFile item, Widget child, ImageChunkEvent? loadingProgress, bool isImageLoaded)?, OnFileUploadSuccess? onUploadSuccess, OnFileUploadFail? onUploadFail, required void pickFiles(FormeFileGridState state, int? maximum), FilePickerBuilder? filePickerBuilder, Widget thumbnailLoadingBuilder(BuildContext context, FormeFile item)?, BoxDecoration? uploadBackgroundDecoration, Color? uploadErrorIconColor, IconData? uploadErrorIconData, Color? uploadIconColor, IconData? uploadIconData, Widget? gridItemRemoveWidget, void onGridItemTap(FormeFile tapped, List<FormeFile> value)?, EdgeInsetsGeometry? gridViewPadding, ScrollPhysics? physics, ScrollController? scrollController, bool shrinkWrap = true, Curve? slideCurve, Duration? animateDuration, InputDecoration? decoration, required SliverGridDelegate gridDelegate})

Properties

animateDuration Duration?
final
asyncValidator → FormeAsyncValidator<List<FormeFile>>?
used to perform an async validation
finalinherited
asyncValidatorDebounce Duration?
not worked when validate manually
finalinherited
autovalidateMode AutovalidateMode
finalinherited
builder → FormeFieldBuilder<List<FormeFile>>
finalinherited
childWhenDraggingBuilder → (Widget Function(BuildContext context, FormeFile item, int index, Widget child)?)
final
decoration InputDecoration?
final
decorator → FormeFieldDecorator<List<FormeFile>>?
used to decorate field
finalinherited
disableFilePicker bool
whether show file picker or not
final
draggable → (bool Function(FormeFile item, int index)?)
whether item is draggable , default every item is draggable
final
enabled bool
whether field is enabled,
finalinherited
feedbackBuilder → (Widget Function(BuildContext context, FormeFile item, int index, Widget child, Size? size)?)
final
fieldType Type
no setterinherited
filePickerBuilder FilePickerBuilder?
used to build your custom file picker
final
filePickerChild Widget?
child of file picker , default is Icon(Icons.add)
final
filePickerColor Color?
file picker color , default Colors.grey.withOpacity(0.3)
final
filePickerDisabledColor Color?
color when file picker is not clickable , default is Theme.of(context).disabledColor
final
focusNode FocusNode?
finalinherited
gridDelegate SliverGridDelegate
final
gridItemRemoveWidget Widget?
final
gridViewPadding EdgeInsetsGeometry?
final
hashCode int
The hash code for this object.
no setterinherited
imageFit BoxFit
image fit , default is BoxFit.cover
final
imageLoadingBuilder → (Widget Function(BuildContext context, FormeFile item, Widget child, ImageChunkEvent? loadingProgress, bool isImageLoaded)?)
image loading builder
final
imageLoadingErrorBuilder → (Widget Function(BuildContext context, FormeFile item, VoidCallback retry, Object error, StackTrace? stackTrace)?)
builder display widget when thumbnail create failed or image loading failed
final
initialValue List<FormeFile>
initial value
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
longPressDelayStartDrag Duration?
final
maximum int?
final
name String?
field name
finalinherited
onGridItemTap → (void Function(FormeFile tapped, List<FormeFile> value)?)
final
onInitialized → FormeFieldInitialized<List<FormeFile>>?
called immediately after FormeFieldState.initStatus
finalinherited
onSaved → FormeFieldSetter<List<FormeFile>>?
finalinherited
onStatusChanged → FormeFieldStatusChanged<List<FormeFile>>?
listen field status change
finalinherited
onUploadFail OnFileUploadFail?
final
onUploadSuccess OnFileUploadSuccess?
final
order int?
used to support Forme.autovalidateByOrder
finalinherited
physics ScrollPhysics?
final
pickFiles → void Function(FormeFileGridState state, int? maximum)
use FormeFileGridState.insertFiles to insert your picked files
final
quietlyValidate bool
quietlyValidate
finalinherited
readOnly bool
finalinherited
removable → (bool Function(FormeFile image, int index)?)
whether an image can be removed by user interactive
final
reOrderable bool
whether reOrderable on drag
final
requestFocusOnUserInteraction bool
whether request focus when field value changed
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
final
showFilePickerWhenReadOnly bool
whether show file picker when readOnly or disabled, default is true
final
showGridItemRemoveWidget bool
whether show remove icon or not
final
shrinkWrap bool
final
slideCurve Curve?
final
thumbnailLoadingBuilder → (Widget Function(BuildContext context, FormeFile item)?)
builder display widget when thumbnail future is working
final
uploadBackgroundDecoration BoxDecoration?
default is BoxDecoration(color: Colors.black.withOpacity(0.4))
final
uploadErrorIconColor Color?
final
uploadErrorIconData IconData?
final
uploadIconColor Color?
final
uploadIconData IconData?
final
validationFilter → FormeFieldValidationFilter<List<FormeFile>>?
used to determine whether perform a validation
finalinherited
validator → FormeValidator<List<FormeFile>>?
sync validator
finalinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → FormeFieldState<List<FormeFile>>
Creates the mutable state for this widget at a given location in the tree.
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}) 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