FPortal class
A portal renders a portal widget that "floats" on top of a child widget.
Similar to an OverlayPortal, it requires an Overlay ancestor. Unlike an OverlayPortal, the Portal is aligned relative to the child.
See:
- FPortalShift for shifting strategies when a portal overflows outside of the viewport.
- OverlayPortalController for controlling the portal's visibility.
- OverlayPortal for the underlying widget.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FPortal
Constructors
- FPortal.new({required OverlayPortalController controller, required WidgetBuilder portalBuilder, required Widget child, AlignmentGeometry portalAnchor = Alignment.topCenter, AlignmentGeometry childAnchor = Alignment.bottomCenter, Offset shift(Size, FPortalChildBox, FPortalBox) = FPortalShift.flip, Offset offset = Offset.zero, Key? key})
-
Creates a portal.
const
Properties
- child → Widget
-
The child which the portal is aligned to.
final
- childAnchor → AlignmentGeometry
-
The point on the child widget that connections with the portal (floating content), at the portal's anchor.
final
- controller → OverlayPortalController
-
The controller that shows and hides the portal. It initially hides the portal.
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 portal by. Defaults to Offset.zero.
final
- portalAnchor → AlignmentGeometry
-
The point on the portal (floating content) that connects with the child, at the child's anchor.
final
- portalBuilder → WidgetBuilder
-
The portal builder which returns the floating content.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shift → Offset Function(Size, FPortalChildBox, FPortalBox)
-
The shifting strategy used to shift a portal when it overflows out of the viewport. Defaults to
FPortalShift.flip.
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, 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