Popup class
Create a popup, here parentKey key is important as the popup will appear according to the parent widget represented by the parentKey only.
- Inheritance
Constructors
-
Popup({required Widget child, GlobalKey<
State< ? parentKey, Key? key, Alignment childAlign = Alignment.topLeft, Alignment parentAlign = Alignment.bottomRight, Size? childSize, Offset offset = Offset.zero, AnimatedSwitcherTransitionBuilder? transitionBuilder, LazyWidgetBuilder? builder, Curve switchOutCurve = Curves.linear, Curve switchInCurve = Curves.linear, bool inAnimationWithController = false})StatefulWidget> > -
NOTE:- This widget uses PositionedAlign Widget, which may cause, loss of
frame. For further information, look into the Documentation of
PositionedAlign.
const
Properties
- builder → LazyWidgetBuilder?
-
This will be called after the size of child is found. As default it will
return the child only.
final
- child → Widget
-
final
- childAlign → Alignment
-
Defines the popup alignment at the parentAlign position of the parent.
final
- childSize → Size?
-
If not null, then will be passed to PositionedAlign to prevent it from
creating the popup "lazily".
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inAnimationWithController → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- offset → Offset
-
To add an offset to the popup from its position after parentAlign.
final
- parentAlign → Alignment
-
Determines the position of parent where, the pop will be.
final
-
parentKey
→ GlobalKey<
State< ?StatefulWidget> > -
GlobalKey of the parent widget in the widget tree, relative to which we
want to show our popup.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- switchInCurve → Curve
-
final
- switchOutCurve → Curve
-
final
- transitionBuilder → AnimatedSwitcherTransitionBuilder?
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → PopupState -
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}) → 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