FPortal class
A portal renders a follower widget that "floats" on top of a target widget.
Similar to an OverlayPortal, it requires an Overlay ancestor. Unlike an OverlayPortal, the follower is aligned relative to the target.
See:
- FPortalFollowerShift for shifting strategies when a follower overflows outside of the viewport.
- OverlayPortalController for controlling the follower's visibility.
- OverlayPortal for the underlying widget.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FPortal
Constructors
- FPortal({required OverlayPortalController controller, required WidgetBuilder followerBuilder, required Widget child, Alignment followerAnchor = Alignment.topCenter, Alignment targetAnchor = Alignment.bottomCenter, Offset shift(Size, FPortalTarget, FPortalFollower) = FPortalFollowerShift.flip, Offset offset = Offset.zero, Key? key})
-
Creates a portal.
const
Properties
- child → Widget
-
The target.
final
- controller → OverlayPortalController
-
The controller that shows and hides the follower. It initially hides the follower.
final
- followerAnchor → Alignment
-
The anchor of the follower to which the targetAnchor is aligned to. Defaults to Alignment.topCenter.
final
- followerBuilder → WidgetBuilder
-
The follower.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- offset → Offset
-
The offset to adjust the shifted follower by. Defaults to Offset.zero.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shift → Offset Function(Size, FPortalTarget, FPortalFollower)
-
The shifting strategy used to shift a follower when it overflows out of the viewport. Defaults to
FPortalFollowerShift.flip.
final
- targetAnchor → Alignment
-
The anchor of the target to which the followerAnchor is aligned to. Defaults to Alignment.bottomCenter.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< FPortal> -
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.
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}) → 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