FSelectMenuTile<T> class
A tile that, when triggered, displays a list of options for the user to pick from.
A FSelectMenuTile is internally a FormField, therefore it can be used in a Form.
For desktop, an FSelectGroup is generally recommended over this.
See:
- https://forui.dev/docs/tile/select-menu-tile for working examples.
- FSelectTile for a single select tile.
- FSelectMenuTileStyle for customizing a select menu tile's appearance.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FormField<
Set< T> > - FSelectMenuTile
- Mixed-in types
Constructors
-
FSelectMenuTile.new({required Widget title, FSelectMenuTileController<
T> ? selectController, FPopoverController? popoverController, ScrollController? scrollController, FSelectMenuTileStyle style(FSelectMenuTileStyle)?, double? cacheExtent, double maxHeight = double.infinity, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollPhysics physics = const ClampingScrollPhysics(), FItemDivider divider = FItemDivider.full, AlignmentGeometry tileAnchor = Alignment.bottomRight, FPortalSpacing spacing = const FPortalSpacing(4), Offset shift(Size, FPortalChildBox, FPortalBox) = FPortalShift.flip, Offset offset = Offset.zero, FHidePopoverRegion hideOnTapOutside = FHidePopoverRegion.excludeTarget, bool autoHide = true, Widget? label, Widget? description, bool autofocus = false, FocusScopeNode? focusNode, ValueChanged<bool> ? onFocusChange, TraversalEdgeBehavior traversalEdgeBehavior = TraversalEdgeBehavior.closedLoop, String? barrierSemanticsLabel, bool barrierSemanticsDismissible = true, String? semanticsLabel, Widget? prefix, Widget? subtitle, ValueWidgetBuilder<Set< detailsBuilder = _builder, Widget? details, Widget? suffix, Map<T> >ShortcutActivator, Intent> ? shortcuts, Map<Type, Action< ? actions, ValueChanged<Intent> >Set< ? onChange, ValueChanged<T> >(T, bool)> ? onSelect, Widget errorBuilder(BuildContext, String) = FFormFieldProperties.defaultErrorBuilder, T? initialValue, FormFieldSetter<Set< ? onSaved, FormFieldValidator<T> >Set< ? validator, String? forceErrorText, bool enabled = true, AutovalidateMode? autovalidateMode, String? restorationId, Key? key})T> > - Creates a FSelectMenuTile that eagerly builds the menu.
-
FSelectMenuTile.builder({required Widget title, int? count, FSelectMenuTileController<
T> ? selectController, FPopoverController? popoverController, ScrollController? scrollController, FSelectMenuTileStyle style(FSelectMenuTileStyle)?, double? cacheExtent, double maxHeight = double.infinity, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollPhysics physics = const ClampingScrollPhysics(), FItemDivider divider = FItemDivider.full, AlignmentGeometry tileAnchor = Alignment.bottomRight, FPortalSpacing spacing = const FPortalSpacing(4), Offset shift(Size, FPortalChildBox, FPortalBox) = FPortalShift.flip, Offset offset = Offset.zero, FHidePopoverRegion hideOnTapOutside = FHidePopoverRegion.excludeTarget, bool autoHide = true, Widget? label, Widget? description, bool autofocus = false, FocusScopeNode? focusNode, ValueChanged<bool> ? onFocusChange, TraversalEdgeBehavior traversalEdgeBehavior = TraversalEdgeBehavior.closedLoop, String? barrierSemanticsLabel, bool barrierSemanticsDismissible = true, String? semanticsLabel, Widget? prefix, Widget? subtitle, ValueWidgetBuilder<Set< detailsBuilder = _builder, Widget? details, Widget? suffix, Map<T> >ShortcutActivator, Intent> ? shortcuts, Map<Type, Action< ? actions, ValueChanged<Intent> >Set< ? onChange, ValueChanged<T> >(T, bool)> ? onSelect, Widget errorBuilder(BuildContext, String) = FFormFieldProperties.defaultErrorBuilder, T? initialValue, FormFieldSetter<Set< ? onSaved, FormFieldValidator<T> >Set< ? validator, String? forceErrorText, bool enabled = true, AutovalidateMode? autovalidateMode, String? restorationId, Key? key})T> > - Creates a FSelectMenuTile that lazily builds the menu.
Properties
-
actions
→ Map<
Type, Action< ?Intent> > -
The actions. Defaults to selecting a tile when ActivateIntent is invoked.
final
- autofocus → bool
-
True if this widget will be selected as the initial focus when no other node in its scope is currently focused.
final
- autoHide → bool
-
True if the menu should be automatically hidden after a menu option is selected. Defaults to true.
final
- autovalidateMode → AutovalidateMode
-
Used to enable/disable this form field auto validation and update its
error text.
finalinherited
- barrierSemanticsDismissible → bool
-
Whether the barrier semantics are included in the semantics tree. Defaults to true.
final
- barrierSemanticsLabel → String?
-
The popover's barrier label used by accessibility frameworks.
final
-
builder
→ FormFieldBuilder<
Set< T> > -
Function that returns the widget representing this form field.
finalinherited
- cacheExtent → double?
-
The menu's cache extent in logical pixels.
final
- description → Widget?
-
The description.
final
- details → Widget?
-
The details.
final
-
detailsBuilder
→ ValueWidgetBuilder<
Set< T> > -
An optional builder which returns the details.
final
- divider → FItemDivider
-
The divider between select tiles. Defaults to FItemDivider.indented.
final
- dragStartBehavior → DragStartBehavior
-
Determines the way that the menu's drag start behavior is handled. Defaults to DragStartBehavior.start.
final
- enabled → bool
-
Whether the form is able to receive user input.
finalinherited
- errorBuilder → FormFieldErrorBuilder?
-
Function that returns the widget representing the error to display.
finalinherited
- focusNode → FocusScopeNode?
-
An optional focus node to use as the focus node for this widget.
final
- forceErrorText → String?
-
An optional property that forces the FormFieldState into an error state
by directly setting the FormFieldState.errorText property without
running the validator function.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hideOnTapOutside → FHidePopoverRegion
-
The region that can be tapped to hide the popover.
final
-
initialValue
→ Set<
T> ? -
An optional value to initialize the form field to, or null otherwise.
finalinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → Widget?
-
The label.
final
- maxHeight → double
-
The menu's max height, in logical pixels. Defaults to infinity.
final
-
The point on the menu (floating content) that connects with the tile at the tile's anchor.
final
- offset → Offset
-
The offset to adjust the popover by. Defaults to Offset.zero.
final
-
onChange
→ ValueChanged<
Set< ?T> > -
The callback that is called when the value changes.
final
-
onFocusChange
→ ValueChanged<
bool> ? -
Handler called when the focus changes.
final
-
onSaved
→ FormFieldSetter<
Set< ?T> > -
An optional method to call with the final value when the form is saved via
FormState.save.
finalinherited
-
onSelect
→ ValueChanged<
(T, bool)> ? -
The callback that is called when an item is selected.
final
- physics → ScrollPhysics
-
The scroll physics of the group. Defaults to ClampingScrollPhysics.
final
- popoverController → FPopoverController?
-
The controller that shows and hides the menu. It initially hides the menu.
final
- prefix → Widget?
-
The prefix.
final
- restorationId → String?
-
Restoration ID to save and restore the state of the form field.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
The scroll controller used to control the position to which this menu is scrolled.
final
-
selectController
→ FSelectMenuTileController<
T> ? -
The controller that controls the selected tiles. Defaults to
FSelectMenuTileController.radio
.final - semanticsLabel → String?
-
The menu's semantic label used by accessibility frameworks.
final
- shift → Offset Function(Size, FPortalChildBox, FPortalBox)
-
The shifting strategy used to shift a popover when it overflows out of the viewport. Defaults to
FPortalShift.flip.
final
-
shortcuts
→ Map<
ShortcutActivator, Intent> ? -
The shortcuts. Defaults to calling ActivateIntent.
final
- spacing → FPortalSpacing
-
The spacing between the child's anchor and popover's anchor. Defaults to
FPortalSpacing(4)
.final - style → FSelectMenuTileStyle Function(FSelectMenuTileStyle)?
-
The style.
final
- subtitle → Widget?
-
The subtitle.
final
- suffix → Widget?
-
The suffix. Defaults to
Icon(FIcons.chevronsUpDown)
.final - tileAnchor → AlignmentGeometry
-
The point on the tile that connects with the menu at the menu's anchor.
final
- title → Widget
-
The title.
final
- traversalEdgeBehavior → TraversalEdgeBehavior
-
Controls the transfer of focus beyond the first and the last items in a popover. Defaults to
TraversalEdgeBehavior.closedLoop.
final
-
validator
→ FormFieldValidator<
Set< ?T> > -
An optional method that validates an input. Returns an error string to
display if the input is invalid, or null otherwise.
finalinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → FormFieldState< Set< T> > -
Creates the mutable state for this widget at a given location in the tree.
override
-
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