Transform.translate constructor
- Key? key,
- required Offset offset,
- bool transformHitTests = true,
- FilterQuality? filterQuality,
- Widget? child,
Creates a widget that transforms its child using a translation.
The offset
argument specifies the translation.
This example shifts the silver-colored child down by fifteen pixels.
link
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({
super.key,
required Offset offset,
this.transformHitTests = true,
this.filterQuality,
super.child,
}) : transform = Matrix4.translationValues(offset.dx, offset.dy, 0.0),
origin = null,
alignment = null;