FSelectMenuTile<T>.builder constructor
FSelectMenuTile<T>.builder ({
- required Widget title,
- int? count,
- FMultiValueControl<
T> ? selectControl, - FPopoverControl popoverControl = const .managed(),
- ScrollController? scrollController,
- FSelectMenuTileStyle style(
- FSelectMenuTileStyle style
- double? cacheExtent,
- double maxHeight = .infinity,
- DragStartBehavior dragStartBehavior = .start,
- ScrollPhysics physics = const ClampingScrollPhysics(),
- FItemDivider divider = .full,
- AlignmentGeometry tileAnchor = .bottomRight,
- bool autoHide = true,
- Widget? label,
- Widget? description,
- bool autofocus = false,
- String? semanticsLabel,
- Widget? prefix,
- Widget? subtitle,
- ValueWidgetBuilder<
Set< detailsBuilder = defaultSelectMenuTileBuilder,T> > - Widget? details,
- Widget? suffix,
- Map<
ShortcutActivator, Intent> ? shortcuts, - Map<
Type, Action< ? actions,Intent> > - Widget errorBuilder(
- BuildContext context,
- String message
- FormFieldSetter<
Set< ? onSaved,T> > - VoidCallback? onReset,
- FormFieldValidator<
Set< ? validator,T> > - String? forceErrorText,
- bool enabled = true,
- AutovalidateMode autovalidateMode = .disabled,
- Key? key,
Creates a FSelectMenuTile that lazily builds the menu.
The menuBuilder is called for each tile that should be built. The current level's FInheritedItemData is not
visible to menuBuilder.
- It may return null to signify the end of the group.
- It may be called more than once for the same index.
- It will be called only for indices <=
countifcountis given.
The count is the number of tiles to build. If null, menuBuilder will be called until it returns null.
Warning
May result in an infinite loop or run out of memory if:
- Placed in a parent widget that does not constrain its size, i.e., Column.
countis null andmenuBuilderalways provides a zero-size widget, i.e., SizedBox(). If possible, provide tiles with non-zero size, return null from the builder, or setcountto non-null.
Implementation
FSelectMenuTile.builder({
required this.title,
required FSelectTile<T>? Function(BuildContext context, int index) menuBuilder,
int? count,
this.selectControl,
this.popoverControl = const .managed(),
this.scrollController,
this.style,
this.cacheExtent,
this.maxHeight = .infinity,
this.dragStartBehavior = .start,
this.physics = const ClampingScrollPhysics(),
this.divider = .full,
this.menuAnchor = .topRight,
this.tileAnchor = .bottomRight,
this.menuSpacing = const .spacing(4),
this.menuOverflow = .flip,
this.menuOffset = .zero,
this.menuHideRegion = .excludeChild,
this.menuOnTapHide,
this.menuGroupId,
this.autoHide = true,
this.label,
this.description,
this.autofocus = false,
this.menuFocusNode,
this.menuOnFocusChange,
this.menuTraversalEdgeBehavior,
this.menuBarrierSemanticsLabel,
this.menuBarrierSemanticsDismissible = true,
this.semanticsLabel,
this.prefix,
this.subtitle,
this.detailsBuilder = defaultSelectMenuTileBuilder,
this.details,
this.suffix,
this.shortcuts,
this.actions,
this.errorBuilder = FFormFieldProperties.defaultErrorBuilder,
this.onSaved,
this.onReset,
this.validator,
this.forceErrorText,
this.enabled = true,
this.autovalidateMode = .disabled,
super.key,
}) : _menu = null,
_menuBuilder = menuBuilder,
_count = count;