translate method

Widget translate({
  1. Key? key,
  2. required Offset offset,
  3. bool transformHitTests = true,
  4. bool animate = false,
})

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,
          );