FPopoverMenu.automatic constructor

const FPopoverMenu.automatic({
  1. required List<FTileGroupMixin<FTileMixin>> menu,
  2. required Widget child,
  3. FPopoverMenuStyle? style,
  4. FPopoverController? popoverController,
  5. ScrollController? scrollController,
  6. double? cacheExtent,
  7. double maxHeight = double.infinity,
  8. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  9. FTileDivider divider = FTileDivider.full,
  10. AlignmentGeometry menuAnchor = Alignment.topCenter,
  11. AlignmentGeometry childAnchor = Alignment.bottomCenter,
  12. FPortalSpacing spacing = const FPortalSpacing(4),
  13. Offset shift(
    1. Size,
    2. FPortalChildBox,
    3. FPortalBox
    ) = FPortalShift.flip,
  14. Offset offset = Offset.zero,
  15. Object? groupId,
  16. FHidePopoverRegion hideOnTapOutside = FHidePopoverRegion.excludeTarget,
  17. String? semanticsLabel,
  18. bool autofocus = false,
  19. FocusScopeNode? focusNode,
  20. ValueChanged<bool>? onFocusChange,
  21. TraversalEdgeBehavior traversalEdgeBehavior = TraversalEdgeBehavior.closedLoop,
  22. Key? key,
})

Creates a menu that is automatically shown when the child is tapped.

It is not recommended for the child to contain a GestureDetector, such as FButton. Only one GestureDetector will be called if there are multiple overlapping GestureDetectors, leading to unexpected behavior.

Implementation

const FPopoverMenu.automatic({
  required this.menu,
  required this.child,
  this.style,
  this.popoverController,
  this.scrollController,
  this.cacheExtent,
  this.maxHeight = double.infinity,
  this.dragStartBehavior = DragStartBehavior.start,
  this.divider = FTileDivider.full,
  this.menuAnchor = Alignment.topCenter,
  this.childAnchor = Alignment.bottomCenter,
  this.spacing = const FPortalSpacing(4),
  this.shift = FPortalShift.flip,
  this.offset = Offset.zero,
  this.groupId,
  this.hideOnTapOutside = FHidePopoverRegion.excludeTarget,
  this.semanticsLabel,
  this.autofocus = false,
  this.focusNode,
  this.onFocusChange,
  this.traversalEdgeBehavior = TraversalEdgeBehavior.closedLoop,
  super.key,
}) : _automatic = true;