FPopover.tappable constructor

FPopover.tappable({
  1. required ValueWidgetBuilder<FPopoverStyle> followerBuilder,
  2. required Widget target,
  3. FPopoverController? controller,
  4. FPopoverStyle? style,
  5. Offset shift(
    1. Size,
    2. FPortalTarget,
    3. FPortalFollower
    ) = FPortalFollowerShift.flip,
  6. bool hideOnTapOutside = true,
  7. bool ignoreDirectionalPadding = true,
  8. String? semanticLabel,
  9. bool autofocus = false,
  10. FocusNode? focusNode,
  11. ValueChanged<bool>? onFocusChange,
  12. Alignment? followerAnchor,
  13. Alignment? targetAnchor,
  14. Key? key,
})

Creates a popover that is automatically shown when the target is tapped.

It is not recommended for the target to contain a GestureDetector, such as FButton. This is because only one GestureDetector will be called if there are multiple overlapping GestureDetectors.

Implementation

FPopover.tappable({
  required this.followerBuilder,
  required this.target,
  this.controller,
  this.style,
  this.shift = FPortalFollowerShift.flip,
  this.hideOnTapOutside = true,
  this.ignoreDirectionalPadding = true,
  this.semanticLabel,
  this.autofocus = false,
  this.focusNode,
  this.onFocusChange,
  Alignment? followerAnchor,
  Alignment? targetAnchor,
  super.key,
})  : followerAnchor = followerAnchor ?? _platform.follower,
      targetAnchor = targetAnchor ?? _platform.target,
      _tappable = true;