PopupController class
To show and remove a popup on the screen.
Get a PopupController object, using the PopupController.of static method.
Using this, one can show popups either inside a PopupScope or using an Overlay, i.e above the whole screen.
Properties
- context → BuildContext
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
final
-
key
→ GlobalKey<
PopupScopeState> ? -
final
- mounted → bool
-
no setter
- onDismiss ↔ (void Function()?)
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
) → Future< void> - Removes the popup, being shown via this controller.
-
show(
{required WidgetBuilder builder, bool barrierDismissible = true, bool showBarrier = false, Color barrierColor = Colors.black38, AnimationSwitchController? animationController, bool animation = false, void onHoverInBarrier(PointerHoverEvent)?, bool dismissCondition(TapDownDetails)?, void onDismiss()?}) → PopupController - Shows Popup widget.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
of(
BuildContext context, {String? id, bool forceOverlay = false, void onDismiss()?}) → PopupController - Return a PopupController object. This also determines, whether the popup will show using an Overlay over whole screen, or inside a PopupScope.