Fluent2Popover class
Words or a small form on Fluent's flyout beside its trigger, opened and closed by a press. Escape, a press outside and Tab out close it, and the focus goes back to the trigger. Fluent2Flyout.show raises a flyout from code with no trigger of its own.
With openOnHover it is Fluent's hover card (v9's openOnHover): it
opens while the pointer rests on the trigger, while the keyboard focuses
it or on a long press, leaves focus on the trigger, and closes
mouseLeaveDelay after the pointer leaves both, so the pointer can
travel into it (more about a person over their name).
A neutral popover is the menu's surface: its fill, ink and stroke follow the menu theme (Fluent2ThemeData.menuTheme) where that sets them.
Fluent2Popover(label: 'Sharing', trigger: (context, toggle) => Fluent2Button('Share', onPressed: toggle), content: const Text('Shared with 4 people'))
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- Fluent2Popover
Constructors
- Fluent2Popover({Key? key, required String label, required Widget trigger(BuildContext context, VoidCallback close), required Widget content, DesignOverlaySide side = DesignOverlaySide.below, DesignOverlayAlign align = DesignOverlayAlign.start, double width = 288, Fluent2FlyoutAppearance appearance = Fluent2FlyoutAppearance.neutral, Fluent2FlyoutSize size = Fluent2FlyoutSize.medium, bool openOnHover = false, Duration mouseLeaveDelay = const Duration(milliseconds: 500)})
-
A popover opened by what
triggerbuilds.const
Properties
- align → DesignOverlayAlign
-
How it lines up with the trigger along that side.
final
- appearance → Fluent2FlyoutAppearance
-
Fluent's surface: neutral, brand or inverted.
final
- content → Widget
-
What it holds.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String
-
The popover's name, read as it opens.
final
- mouseLeaveDelay → Duration
-
How long a hover card stays once the pointer leaves the trigger and
the card, Fluent's
mouseLeaveDelay.final - openOnHover → bool
-
Whether a resting pointer, keyboard focus or a long press on the
trigger opens it (a hover card), rather than a press.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- side → DesignOverlaySide
-
The side of the trigger it opens on; it flips where there's no room.
final
- size → Fluent2FlyoutSize
-
Its padding, Fluent's
size.final - trigger → Widget Function(BuildContext context, VoidCallback close)
-
Builds the control that opens it: call
togglefrom its press.final - width → double
-
Its width, never wider than the window leaves.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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
Constants
- hoverOpenDelay → const Duration
- Fluent's tooltip delay, which a hover card waits before it opens.