TransformEffect class

An Effect that applies a transform to a Widget.

Inheritance

Constructors

TransformEffect({double translateX = 0, double translateY = 0, double translateZ = 0, double rotateX = 0, double rotateY = 0, double rotateZ = 0, double scaleX = 1, double scaleY = 1, double scaleZ = 1, double depth = 0, AlignmentGeometry alignment = Alignment.center, Offset origin = Offset.zero})
Creates a TransformEffect.

Properties

alignment AlignmentGeometry
The alignment of the Widget within its parent. Directly mapped to the Transform widget.
final
depth double
Defines the depth of the Widget in z direction. This is used to create a 3D effect. This is used on the transform matrix to set the entry at given depth. Tip: 0.001 are good numbers for depth perception.
final
hashCode int
The hash code for this object.
no setterinherited
origin Offset
The origin of the Widget relative to its size. Directly mapped to the Transform widget.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
rotateX double
The amount to rotate the Widget around the x axis. Directly mapped to the Transform widget.
final
rotateY double
The amount to rotate the Widget around the y axis. Directly mapped to the Transform widget.
final
rotateZ double
The amount to rotate the Widget around the z axis. Directly mapped to the Transform widget.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleX double
The amount to scale the Widget in the x direction. Directly mapped to the Transform widget.
final
scaleY double
The amount to scale the Widget in the y direction. Directly mapped to the Transform widget.
final
scaleZ double
The amount to scale the Widget in the z direction. Directly mapped to the Transform widget.
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
translateX double
The amount to translate the Widget in the x direction. Directly mapped to the Transform widget.
final
translateY double
The amount to translate the Widget in the y direction. Directly mapped to the Transform widget.
final
translateZ double
The amount to translate the Widget in the z direction. Directly mapped to the Transform widget.
final

Methods

apply(BuildContext context, Widget child) Widget
Applies this Effect to given child. This is called by Effect builder widgets to apply the effect to given child.
override
lerp(covariant TransformEffect other, double value) TransformEffect
Linearly interpolates between two Effects. This is used to animate between two Effects. The value argument is a fraction that determines the position of this effect between this and other.
override
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