fromCenter method Null safety

Rect fromCenter(
  1. {required double x,
  2. required double y,
  3. required double width,
  4. required double height}
)

Implementation

static Rect fromCenter({
  required double x,
  required double y,
  required double width,
  required double height,
}) =>
    Rect.fromLTWH(x - width / 2, y - height / 2, width, height);