FSelectMenuTile<T>.fromMap constructor
FSelectMenuTile<T>.fromMap (
- required Text title,
- 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 with the given menu.
Contract
Each key in menu must map to a unique value. Having multiple keys map to the same value will result in
undefined behavior.
Implementation
factory FSelectMenuTile.fromMap(
Map<String, T> menu, {
required Text title,
FMultiValueControl<T>? selectControl,
FPopoverControl popoverControl = const .managed(),
ScrollController? scrollController,
FSelectMenuTileStyle Function(FSelectMenuTileStyle style)? style,
double? cacheExtent,
double maxHeight = .infinity,
DragStartBehavior dragStartBehavior = .start,
ScrollPhysics physics = const ClampingScrollPhysics(),
FItemDivider divider = .full,
AlignmentGeometry menuAnchor = .topRight,
AlignmentGeometry tileAnchor = .bottomRight,
FPortalSpacing menuSpacing = const .spacing(4),
FPortalOverflow menuOverflow = .flip,
Offset menuOffset = .zero,
FPopoverHideRegion menuHideRegion = .excludeChild,
VoidCallback? menuOnTapHide,
Object? menuGroupId,
bool autoHide = true,
Widget? label,
Widget? description,
bool autofocus = false,
FocusScopeNode? menuFocusNode,
ValueChanged<bool>? menuOnFocusChange,
TraversalEdgeBehavior? menuTraversalEdgeBehavior,
String? menuBarrierSemanticsLabel,
bool menuBarrierSemanticsDismissible = true,
String? semanticsLabel,
Widget? prefix,
Widget? subtitle,
ValueWidgetBuilder<Set<T>> detailsBuilder = defaultSelectMenuTileBuilder,
Widget? details,
Widget? suffix,
Map<ShortcutActivator, Intent>? shortcuts,
Map<Type, Action<Intent>>? actions,
Widget Function(BuildContext context, String message) errorBuilder = FFormFieldProperties.defaultErrorBuilder,
FormFieldSetter<Set<T>>? onSaved,
VoidCallback? onReset,
FormFieldValidator<Set<T>>? validator,
String? forceErrorText,
bool enabled = true,
AutovalidateMode autovalidateMode = .disabled,
Key? key,
}) => .new(
title: title,
menu: [for (final MapEntry(:key, :value) in menu.entries) FSelectTile<T>(title: Text(key), value: value)],
selectControl: selectControl,
popoverControl: popoverControl,
scrollController: scrollController,
style: style,
cacheExtent: cacheExtent,
maxHeight: maxHeight,
dragStartBehavior: dragStartBehavior,
physics: physics,
divider: divider,
menuAnchor: menuAnchor,
tileAnchor: tileAnchor,
menuSpacing: menuSpacing,
menuOverflow: menuOverflow,
menuOffset: menuOffset,
menuHideRegion: menuHideRegion,
menuOnTapHide: menuOnTapHide,
menuGroupId: menuGroupId,
autoHide: autoHide,
label: label,
description: description,
autofocus: autofocus,
menuFocusNode: menuFocusNode,
menuOnFocusChange: menuOnFocusChange,
menuTraversalEdgeBehavior: menuTraversalEdgeBehavior,
menuBarrierSemanticsLabel: menuBarrierSemanticsLabel,
menuBarrierSemanticsDismissible: menuBarrierSemanticsDismissible,
semanticsLabel: semanticsLabel,
prefix: prefix,
subtitle: subtitle,
detailsBuilder: detailsBuilder,
details: details,
suffix: suffix,
shortcuts: shortcuts,
actions: actions,
errorBuilder: errorBuilder,
onSaved: onSaved,
onReset: onReset,
validator: validator,
forceErrorText: forceErrorText,
enabled: enabled,
autovalidateMode: autovalidateMode,
key: key,
);