FractionalTranslation

This widget motivated by FractionalTranslation in Flutter.

Applies a translation 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.

Hit tests will only be detected inside the bounds of the FractionalTranslation, even if the contents are offset such that they overflow.

See: https://api.flutter.dev/flutter/widgets/FractionalTranslation-class.html

Props

translation

Value: Offset

child

Value: Widget | undefined

Examples

Basic