translate method
Implementation
Widget translate({
Key? key,
required Offset offset,
bool transformHitTests = true,
bool animate = false,
}) =>
animate
? _StyledAnimatedBuilder(
key: key,
builder: (animation) {
return _AnimatedTransform(
child: this,
transform:
Matrix4.translationValues(offset.dx, offset.dy, 0.0),
transformHitTests: transformHitTests,
duration: animation.duration,
curve: animation.curve,
);
},
)
: Transform.translate(
key: key,
offset: offset,
transformHitTests: transformHitTests,
child: this,
);