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