MinPopover class

A popover anchored to any widget. Replaces MinPopover.

MinPopover(
  content: (ctx, ctrl) => Text('Hello'),
  child: ElevatedButton(
    onPressed: null, // MinPopover handles the tap
    child: Text('Open'),
  ),
)

Controlled:

MinPopover(
  controller: _ctrl,
  content: (ctx, ctrl) => MyMenu(onSelect: (_) => ctrl.hide()),
  child: MyButton(),
)
Inheritance

Constructors

MinPopover({Key? key, required Widget child, required Widget content(BuildContext context, MinFloatingController controller), MinFloatingController? controller, bool? visible, bool enabled = true, bool openOnTap = true, MinUiAnchorSide? side, Duration? duration, Duration? reverseDuration, Curve? curve, bool? closeOnTapOutside, bool? closeOnEscape, bool? closeOnScroll, Color? barrierColor, bool? useDimmedBarrier, MinFloatingAnimation animation = MinFloatingAnimation.slideAndFade, Object? groupId, EdgeInsetsGeometry? padding, double? width, BoxConstraints? constraints, BorderRadiusGeometry? borderRadius, Color? backgroundColor, Color? borderColor, List<BoxShadow>? shadows})
const

Properties

animation → MinFloatingAnimation
finalinherited
backgroundColor → Color?
final
barrierColor → Color?
finalinherited
borderColor → Color?
final
borderRadius → BorderRadiusGeometry?
final
child → Widget
The anchor widget (trigger). Always visible.
finalinherited
closeOnEscape → bool?
finalinherited
closeOnScroll → bool?
finalinherited
closeOnTapOutside → bool?
finalinherited
constrainToViewport → bool
Constrains floating content to the visible viewport.
finalinherited
constraints → BoxConstraints?
final
content → Widget Function(BuildContext context, MinFloatingController controller)
Builder for the popover panel content. Receives controller so inner widgets can call controller.hide().
final
controller → MinFloatingController?
External controller. If null, an internal one is created.
finalinherited
curve → Curve?
finalinherited
duration → Duration?
finalinherited
enabled → bool
If false, tapping the trigger does nothing.
finalinherited
groupId → Object?
TapRegion group id. Defaults to the State instance.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
openOnTap → bool
Open the floating element when the trigger is tapped.
finalinherited
padding → EdgeInsetsGeometry?
final
reverseDuration → Duration?
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shadows → List<BoxShadow>?
final
side → MinUiAnchorSide?
finalinherited
useDimmedBarrier → bool?
finalinherited
viewportPadding → EdgeInsets
Safe margin from screen edges when constrainToViewport is enabled.
finalinherited
visible → bool?
Controlled visibility (uncontrolled if null).
finalinherited
width → double?
final

Methods

buildContent(BuildContext context, MinFloatingController controller) → Widget
Override in subclasses to build the floating panel content.
override
createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<MinFloatingBase>
Creates the mutable state for this widget at a given 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.
inherited
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
wrapOverlay(BuildContext anchorContext, Widget overlayChild) → Widget
Lets subclasses wrap overlay content with inherited dependencies captured from the anchor subtree (for example, a custom theme).
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited