AlignPositioned class
For more info, see: https://pub.dartlang.org/packages/align_positioned
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- RenderObjectWidget
- SingleChildRenderObjectWidget
- AlignPositioned
Constructors
- AlignPositioned({Key? key, Widget? child, Alignment? alignment, double? dx, double? dy, double? moveByChildWidth, double? moveByChildHeight, double? moveByContainerWidth, double? moveByContainerHeight, double? moveVerticallyByChildWidth, double? moveHorizontallyByChildHeight, double? moveVerticallyByContainerWidth, double? moveHorizontallyByContainerHeight, double? childWidth, double? childHeight, double? minChildWidth, double? minChildHeight, double? maxChildWidth, double? maxChildHeight, double? childWidthRatio, double? childHeightRatio, double? minChildWidthRatio, double? minChildHeightRatio, double? maxChildWidthRatio, double? maxChildHeightRatio, double? rotateDegrees, Matrix4Transform? matrix4Transform, Wins wins = Wins.min, Touch touch = Touch.inside})
-
const
Properties
- alignment → Alignment
-
final
- child → Widget?
-
The widget below this widget in the tree.
finalinherited
- childHeight → double?
-
You may define preferred child sizes, in absolute terms, or relative to the container size.
If you define both, they will be added.
final
- childHeightRatio → double?
-
You may define preferred child sizes, in absolute terms, or relative to the container size.
If you define both, they will be added.
final
- childWidth → double?
-
You may define preferred child sizes, in absolute terms, or relative to the container size.
If you define both, they will be added.
final
- childWidthRatio → double?
-
You may define preferred child sizes, in absolute terms, or relative to the container size.
If you define both, they will be added.
final
- dx → double
-
Position.
final
- dy → double
-
Position.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- matrix4Transform → Matrix4Transform?
-
Some transformation to apply to the child.
This uses Matrix4Transform instead of Matrix4, since it's easier to use.
However, you can still use Matrix4 directly with the constructor
Matrix4Transform.from(matrix4)
.final - maxChildHeight → double?
-
You can also define min and max values, both in absolute and relative terms.
If you define min sizes in both relative and absolute terms, both are applied.
If you define max sizes in both relative and absolute terms, both are applied.
final
- maxChildHeightRatio → double?
-
You can also define min and max values, both in absolute and relative terms.
If you define min sizes in both relative and absolute terms, both are applied.
If you define max sizes in both relative and absolute terms, both are applied.
final
- maxChildWidth → double?
-
You can also define min and max values, both in absolute and relative terms.
If you define min sizes in both relative and absolute terms, both are applied.
If you define max sizes in both relative and absolute terms, both are applied.
final
- maxChildWidthRatio → double?
-
You can also define min and max values, both in absolute and relative terms.
If you define min sizes in both relative and absolute terms, both are applied.
If you define max sizes in both relative and absolute terms, both are applied.
final
- minChildHeight → double?
-
You can also define min and max values, both in absolute and relative terms.
If you define min sizes in both relative and absolute terms, both are applied.
If you define max sizes in both relative and absolute terms, both are applied.
final
- minChildHeightRatio → double?
-
You can also define min and max values, both in absolute and relative terms.
If you define min sizes in both relative and absolute terms, both are applied.
If you define max sizes in both relative and absolute terms, both are applied.
final
- minChildWidth → double?
-
You can also define min and max values, both in absolute and relative terms.
If you define min sizes in both relative and absolute terms, both are applied.
If you define max sizes in both relative and absolute terms, both are applied.
final
- minChildWidthRatio → double?
-
You can also define min and max values, both in absolute and relative terms.
If you define min sizes in both relative and absolute terms, both are applied.
If you define max sizes in both relative and absolute terms, both are applied.
final
- moveByChildHeight → double
-
Position.
final
- moveByChildWidth → double
-
Position.
final
- moveByContainerHeight → double
-
Position.
final
- moveByContainerWidth → double
-
Position.
final
- moveHorizontallyByChildHeight → double
-
Position moving orthogonally.
final
- moveHorizontallyByContainerHeight → double
-
Position moving orthogonally.
final
- moveVerticallyByChildWidth → double
-
Position moving orthogonally.
final
- moveVerticallyByContainerWidth → double
-
Position moving orthogonally.
final
- rotateDegrees → double?
-
The rotation, in degrees (1 turn is 360 degrees).
The position of the axis of the rotation (the "origin") depends on the
alignment
parameter and the parent. So, for example,Alignment.center
means the axis of rotation is at the center of the parent.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- touch → Touch
-
If
touch
isTouch.inside
, thenalignment
works just like the alignment for theAlign
widget, aligning the child inside of the container. However, iftouch
isTouch.outside
, then the alignment happens outside of the container.final - wins → Wins
-
If min/max sizes are incompatible, you may define which wins.
final
Methods
-
createElement(
) → SingleChildRenderObjectElement -
RenderObjectWidgets always inflate to a RenderObjectElement subclass.
inherited
-
createRenderObject(
BuildContext context) → _RenderAlignPositionedBox -
Creates an instance of the RenderObject class that this
RenderObjectWidget represents, using the configuration described by this
RenderObjectWidget.
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.
inherited
-
didUnmountRenderObject(
covariant RenderObject renderObject) → void -
A render object previously associated with this widget has been removed
from the tree. The given RenderObject will be of the same type as
returned by this object's createRenderObject.
inherited
-
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
-
updateRenderObject(
BuildContext context, covariant _RenderAlignPositionedBox renderObject) → void -
Copies the configuration described by this RenderObjectWidget to the
given RenderObject, which will be of the same type as returned by this
object's createRenderObject.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
expand(
{Key? key, Widget? child, Alignment? alignment, double? dx, double? dy, double? moveByChildWidth, double? moveByChildHeight, double? moveByContainerWidth, double? moveByContainerHeight, double? moveVerticallyByChildWidth, double? moveHorizontallyByChildHeight, double? moveVerticallyByContainerWidth, double? moveHorizontallyByContainerHeight, double? childWidth, double? childHeight, double? minChildWidth, double? minChildHeight, double? maxChildWidth, double? maxChildHeight, double? childWidthRatio, double? childHeightRatio, double? minChildWidthRatio, double? minChildHeightRatio, double? maxChildWidthRatio, double? maxChildHeightRatio, double? rotateDegrees, Matrix4Transform? matrix4Transform, Wins wins = Wins.min, Touch touch = Touch.inside}) → Positioned - Use this if you put an AlignPositioned inside of a Stack. The AlignPositioned will then expand and fix itself to the corners of the Stack. The Stack will size itself to their other non-positioned widgets, and then you can use the AlignPositioned to position its child in relation to the Stack.
-
relative(
Widget main, Widget relative, {Key? key, Widget? child, Alignment? alignment, double? dx, double? dy, double? moveByChildWidth, double? moveByChildHeight, double? moveByContainerWidth, double? moveByContainerHeight, double? moveVerticallyByChildWidth, double? moveHorizontallyByChildHeight, double? moveVerticallyByContainerWidth, double? moveHorizontallyByContainerHeight, double? childWidth, double? childHeight, double? minChildWidth, double? minChildHeight, double? maxChildWidth, double? maxChildHeight, double? childWidthRatio, double? childHeightRatio, double? minChildWidthRatio, double? minChildHeightRatio, double? maxChildWidthRatio, double? maxChildHeightRatio, double? rotateDegrees, Matrix4Transform? matrix4Transform, Wins wins = Wins.min, Touch touch = Touch.inside}) → Widget - Use this if you have a main widget, and you want to position/size/rotate/translate another widget relative to the main one, but the second is NOT a child of the first.