getScaledFontSize static method
Implementation
static double getScaledFontSize({
@required Size size,
@required double fontSize,
@required Size xdScreenSize,
}) {
double sizeRatio = sqrt(pow(size.height, 2) + pow(size.width, 2));
double xdRatio =
sqrt(pow(xdScreenSize.height, 2) + pow(xdScreenSize.width, 2));
return fontSize * sizeRatio / xdRatio;
}