PositioningConfig class

Holds all the necessary geometric information about the child (anchor), the overlay and the viewport.

Annotations

Constructors

PositioningConfig({required Offset childPosition, required Size childSize, required Size viewportSize, required double? overlayHeight, required double? overlayWidth, required Placement placement, AvailableSpaces? explicitSpaces, EdgeInsets padding = EdgeInsets.zero})
Creates a new positioning configuration.
const

Properties

childPosition Offset
The position of the child (anchor) widget relative to the viewport.
final
childSize Size
The size of the child (anchor) widget.
final
explicitSpaces AvailableSpaces?
Explicit spaces to use instead of deriving them from the viewport.
final
hashCode int
The hash code for this object.
no setterinherited
overlayHeight double?
The height of the overlay widget.
final
overlayWidth double?
The width of the overlay widget.
final
padding EdgeInsets
Padding to apply to the viewport boundaries.
final
placement Placement
The desired placement of the overlay relative to the child.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spaces AvailableSpaces
Calculates the available space on all four sides of the child widget.
no setter
viewportSize Size
The size of the available viewport (usually the screen or a scrollable area).
final

Methods

canFitInDirection(AxisDirection direction) bool
Checks if the overlay fits in the given direction based on the available space and the overlay's dimensions.
copyWith({Offset? childPosition, Size? childSize, Size? viewportSize, double? overlayHeight, double? overlayWidth, AvailableSpaces? explicitSpaces, EdgeInsets? padding, Placement? placement}) PositioningConfig
Creates a copy of this config with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited