fractionalTranslation method

Widget fractionalTranslation({
  1. required Offset translation,
  2. bool transformHitTests = true,
  3. Key? key,
})

A widget that applies a transformation before painting its child.

The translation is expressed as a Offset scaled to the child's size. For example, an Offset with a dx of 0.25 will result in a horizontal translation of one quarter the width of the child.

Implementation

Widget fractionalTranslation({
  required Offset translation,
  bool transformHitTests = true,
  Key? key,
}) {
  return FractionalTranslation(
    key: key,
    translation: translation,
    transformHitTests: transformHitTests,
    child: this,
  );
}