OverlayPopup class
A widget that shows a popup as an overlay, triggered by the child widget. The popup can include optional features such as background blur, customizable content, and padding for fine-tuned positioning.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- OverlayPopup
Constructors
- OverlayPopup.new({Key? key, required Widget child, required Widget content(VoidCallback ), Color? backgroundColor, int? horizontalPadding, int? verticalPadding, VoidCallback? onOpened, bool blurBackground = false, double? blurOpacity})
-
Creates an
OverlayPopup
widget.const
Properties
- backgroundColor → Color?
-
The optional background color of the popup. If not provided, the background is transparent.
final
- blurBackground → bool
-
If true, the background behind the popup will be blurred.
final
- blurOpacity → double?
-
The opacity of the blurred background, used only when
blurBackground
is true. The default opacity is 0.2.final - child → Widget
-
The widget that triggers the popup when tapped.
final
- content → Widget Function(VoidCallback )
-
A function that returns the content to be displayed inside the popup.
The content receives a callback function that can be used to close the popup.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- horizontalPadding → int?
-
Optional padding on the horizontal axis, used for adjusting the position of the popup.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onOpened → VoidCallback?
-
Optional callback that is fired when the popup is opened.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- verticalPadding → int?
-
Optional padding on the vertical axis, used for adjusting the position of the popup.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _OverlayPopupState -
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.
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited