Fluent2FieldPopover class

Holds a popover under (or, short of room, over) its child: Fluent's positioning="below-start" with a 4 gap, as wide as the child (at least minWidth) or width, at most maxHeight tall and never past the window's edge less 8; a tap outside both, or Escape, calls onDismiss. Shown and hidden through controller. The popover follows its anchor as the page scrolls. The system back (Android's) closes it through onDismiss before it pops the page under it. A route pushed over the anchor's (an alert, a dialog, a sheet), on its navigator or another, closes it through onDismiss too, focus left to the new route: it is never left open under the route, nor found open once the route is gone.

Inheritance

Constructors

Fluent2FieldPopover({required OverlayPortalController controller, required Widget popover(BuildContext context), required Widget child, VoidCallback? onDismiss, double? width, double minWidth = 160, double maxHeight = 360, Object? groupId, Key? key})
Anchors the popover popover builds to child, shown while controller shows it.
const

Properties

child → Widget
The anchor: the field the popover opens from.
final
controller → OverlayPortalController
Shows and hides the popover.
final
groupId → Object?
The tap region the anchor and the popover share (a text field inside the anchor passes the same id, so a tap in the popover does not take its focus); null keeps one of the popover's own.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxHeight → double
The tallest the popover stands before it scrolls.
final
minWidth → double
The narrowest the popover stands.
final
onDismiss → VoidCallback?
Called when a tap outside, Escape, the system back or a route pushed over the anchor's closes the popover; null hides it through controller.
final
popover → Widget Function(BuildContext context)
Builds what the popover holds.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
width → double?
The popover's width; null is the anchor's, at least minWidth.
final

Methods

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