PopoverPositionDelegate class

A delegate for computing the layout of a tooltip to be displayed above or below a target specified in the global coordinate system.

Inheritance

Constructors

PopoverPositionDelegate({required Offset position, required Size boxSize, required Offset? clickPosition, OffsetCalculator? offsetCalculator, ValueChanged<Size>? onSizeFind, OverflowAlgorithm? overflowAlgorithm, required double gap, required EdgeInsets? margin, required Placement placement, required ValueChanged<PlacementShift> onPlacementShift})
Creates a delegate for computing the layout of a tooltip.

Properties

boxSize Size
final
clickPosition Offset?
final
gap double
The amount of vertical distance between the target and the displayed tooltip.
final
hashCode int
The hash code for this object.
no setterinherited
margin EdgeInsets?
final
offsetCalculator OffsetCalculator?
final
onPlacementShift ValueChanged<PlacementShift>
final
onSizeFind ValueChanged<Size>?
final
overflowAlgorithm OverflowAlgorithm?
final
placement Placement
final
position Offset
The offset of the target the tooltip is positioned near in the global coordinate system.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clickOffset(double childHeight, double areaHeight) Offset
getConstraintsForChild(BoxConstraints constraints) BoxConstraints
The constraints for the child given the incoming constraints.
override
getPositionForChild(Size areaSize, Size overlaySize) Offset
areaSize 容器尺寸 overlaySize 浮层尺寸 boxSize 目标组件尺寸 position 目标组件中心的坐标
override
getSize(BoxConstraints constraints) Size
The size of this object given the incoming constraints.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRelayout(covariant PopoverPositionDelegate oldDelegate) bool
Called whenever a new instance of the custom layout delegate class is provided to the RenderCustomSingleChildLayoutBox object, or any time that a new CustomSingleChildLayout object is created with a new instance of the custom layout delegate class (which amounts to the same thing, because the latter is implemented in terms of the former).
override
toString() String
A string representation of this object.
inherited

Operators

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