scaleToWidth method
Scales the widget proportionally to the screen's width.
Implementation
Widget scaleToWidth({
required BuildContext context,
double factor = 1.0,
}) {
final screenWidth = MediaQuery.of(context).size.width;
return Transform.scale(
scale: screenWidth / 100 * factor,
child: this,
);
}