fontSize static method
Implementation
static double fontSize(double size, BuildContext context) {
const designSize = Size(411, 820);
final screenSize = Size(
MediaQuery.of(context).size.width,
MediaQuery.of(context).size.height,
);
final scaleWidth = screenSize.width / designSize.width;
final scaleHeight = screenSize.height / designSize.height;
final scaleText = min(scaleWidth, scaleHeight);
final fontSize = size * scaleText;
return fontSize;
}