Transform.translate constructor
Creates a widget that transforms its child using a translation.
The offset
argument must not be null. It specifies the translation.
This example shifts the silver-colored child down by fifteen pixels.
Transform.translate(
offset: const Offset(0.0, 15.0),
child: Container(
padding: const EdgeInsets.all(8.0),
color: const Color(0xFF7F7F7F),
child: const Text('Quarter'),
),
)
Implementation
Transform.translate({
Key key,
@required Offset offset,
this.transformHitTests = true,
Widget child,
}) : transform = Matrix4.translationValues(offset.dx, offset.dy, 0.0),
origin = null,
alignment = null,
super(key: key, child: child);