getRectWithScale method
Implementation
Rect getRectWithScale(Rect rect) {
final double width = rect.width * totalScale;
final double height = rect.height * totalScale;
final Offset center = rect.center;
return Rect.fromLTWH(
center.dx - width / 2.0, center.dy - height / 2.0, width, height);
}