Aligned class
Align a point of the follower element with a point on the target element Can optionally pass a widthFactor or heightFactor so the follower element gets a size as a factor of the target element. Can optionally pass a backup which will be used if the element is going to be rendered off screen.
- Inheritance
- Implemented types
- Annotations
Constructors
- Aligned({required Alignment follower, required Alignment target, Alignment portal = Alignment.center, AxisFlag alignToPortal = const AxisFlag(), AxisFlag shiftToWithinBound = const AxisFlag(), Offset offset = Offset.zero, EnhancedCompositedTransformAnchor? backup, String? debugName, double? widthFactor, double? heightFactor})
-
const
Properties
- alignToPortal → AxisFlag
-
Whether to use portal instead of target for X and/or Y axis
finalinherited
- backup → EnhancedCompositedTransformAnchor?
-
If the calculated position would render the follower element out of bounds
(for example, a tooltip would go off screen), a backup can be used.
The offset calculations will fall back to the backup.
finalinherited
- debugName → String?
-
finalinherited
- follower → Alignment
-
The reference point on the follower element.
finalinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- heightFactor → double?
-
The height to make the follower element as a multiple of the height of the
target element.
final
- offset → Offset
-
Offset to shift the follower element by after all calculations are made.
finalinherited
- portal → Alignment
-
The reference point on the
Portal
, if enabledfinalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shiftToWithinBound → AxisFlag
-
for X and/or Y axis
finalinherited
- target → Alignment
-
The reference point on the target element, if enabled
finalinherited
- widthFactor → double?
-
The width to make the follower element as a multiple of the width of the
target element.
final
Methods
-
getFollowerConstraints(
{required Size targetSize, required BoxConstraints theaterConstraints}) → BoxConstraints -
Returns the layout constraints that are given to the follower element.
override
-
getFollowerOffset(
{required Size followerSize, required Size targetSize, required Rect theaterRect}) → Offset -
Returns the offset at which to position the follower element in relation
to the top left of the
targetSize
.inherited -
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.
override