FPopover class

A popover displays rich content in a portal that is aligned to a child.

See:

Inheritance

Constructors

FPopover.new({required FPopoverController controller, required ValueWidgetBuilder<FPopoverStyle> popoverBuilder, required Widget child, FPopoverStyle? style, Offset shift(Size, FPortalChildBox, FPortalBox) = FPortalShift.flip, FHidePopoverRegion hideOnTapOutside = FHidePopoverRegion.anywhere, bool directionPadding = false, String? semanticLabel, bool autofocus = false, FocusNode? focusNode, ValueChanged<bool>? onFocusChange, AlignmentGeometry? popoverAnchor, AlignmentGeometry? childAnchor, Key? key})
Creates a popover that only shows the popover when the controller is manually toggled.
FPopover.automatic({required ValueWidgetBuilder<FPopoverStyle> popoverBuilder, required Widget child, FPopoverController? controller, FPopoverStyle? style, Offset shift(Size, FPortalChildBox, FPortalBox) = FPortalShift.flip, FHidePopoverRegion hideOnTapOutside = FHidePopoverRegion.excludeTarget, bool directionPadding = false, bool autofocus = false, FocusNode? focusNode, ValueChanged<bool>? onFocusChange, String? semanticLabel, AlignmentGeometry? popoverAnchor, AlignmentGeometry? childAnchor, Key? key})
Creates a popover that is automatically shown when the child is tapped.

Properties

autofocus bool
True if this widget will be selected as the initial focus when no other node in its scope is currently focused.
final
child Widget
The child.
final
childAnchor AlignmentGeometry
The point on the child that connects with the popover, at the popover's anchor.
final
controller FPopoverController?
The controller that shows and hides the popover. It initially hides the popover.
final
directionPadding bool
True if the popover should include the cross-axis padding of the anchor when aligning to it. Defaults to false.
final
focusNode FocusNode?
An optional focus node to use as the focus node for this widget.
final
hashCode int
The hash code for this object.
no setterinherited
hideOnTapOutside FHidePopoverRegion
The region that can be tapped to hide the popover.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onFocusChange ValueChanged<bool>?
Handler called when the focus changes.
final
popoverAnchor AlignmentGeometry
The point on the popover (floating content) that connects with the child, at the child's anchor.
final
popoverBuilder ValueWidgetBuilder<FPopoverStyle>
The popover builder. The child passed to popoverBuilder will always be null.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
The popover'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
style FPopoverStyle?
The popover's style.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<FPopover>
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

Static Properties

defaultPlatform → ({Alignment child, Alignment popover})
The platform-specific default popover and child anchors.
no setter