getFontScale static method

double getFontScale(
  1. BuildContext context
)

screen density 当前屏幕 字体scale大小

Implementation

static double getFontScale(BuildContext context) {
  var mediaQuery = MediaQuery.of(context);
  return mediaQuery.textScaleFactor;
}