offset method

Widget offset({
  1. double x = 0,
  2. double y = 0,
  3. bool transformHitTests = true,
})

A modifier that translates its widget to the specified offset.

Example:

Icon(Icons.person)
    .offset(x: 12, y: 12);

Implementation

Widget offset({double x = 0, double y = 0, bool transformHitTests = true}) {
  return Transform.translate(
    child: this,
    offset: Offset(x, y),
    transformHitTests: transformHitTests,
  );
}