Transform class

Represents the CSS transform property.

CSS transforms let you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model.

Use the various factory constructors to create different types of transforms. You can apply multiple transforms to an element by combining them using Transform.combine.

Read more: MDN transform

Constructors

Transform.combine(List<Transform> transforms)
Combine multiple transforms into one.
const
factory
Transform.matrix(double a, double b, double c, double d, double tx, double ty)
Describes a homogeneous 2D transformation matrix.
const
factory
Transform.perspective(Unit value)
Sets the distance between the user and the z=0 plane.
const
factory
Transform.rotate(Angle angle)
Rotates an element around a fixed point on the 2D plane.
const
factory
Transform.rotateAxis({Angle? x, Angle? y, Angle? z})
Rotates an element around the individual axes in 3D space.
const
factory
Transform.scale(double value)
Scales an element up or down on the 2D plane.
const
factory
Transform.skew({Angle? x, Angle? y})
Skews an element on the 2D plane.
const
factory
Transform.translate({Unit? x, Unit? y})
Translates an element on the 2D plane.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
The css value
final

Methods

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

Constants

inherit → const Transform
initial → const Transform
none → const Transform
No transform is applied.
revert → const Transform
revertLayer → const Transform
unset → const Transform