offset method

Transform offset({
  1. double x = 0.0,
  2. double y = 0.0,
})

Translates (moves) the widget by the given x and y coordinates.

x The translation along the X-axis. y The translation along the Y-axis.

Implementation

Transform offset({double x = 0.0, double y = 0.0}) {
  return Transform.translate(
    offset: Offset(x, y), // Apply translation along both axes
    child: this,
  );
}