key property
Animates between two matrix transformations.
from is the starting Matrix4 (defaults to identity) and to is the target transformation. alignment controls the pivot point for the transformation (defaults to no specific alignment). origin specifies a pixel-based offset from the alignment point.
Basic Usage
Actor(
acts: [
.transform(
to: Matrix4.diagonal4Values(1.5, 1.5, 1, 1),
),
],
motion: .smooth(damping: 23),
child: MyWidget(),
)
With Alignment and Origin
Actor(
acts: [
.transform(
from: Matrix4.identity(),
to: Matrix4.rotationZ(3.14159 / 4), // ~45 degrees
alignment: Alignment.center,
origin: Offset(0, -20),
),
],
motion: .smooth(damping: 23),
child: MyWidget(),
)
Implementation
@override
final ActKey key = const ActKey('Transform');