textScaleFactorOf static method
- BuildContext context
Returns textScaleFactor for the nearest MediaQuery ancestor or 1.0, if no such ancestor exists.
Use of this method will cause the given context
to rebuild any time that
the MediaQueryData.textScaleFactor property of the ancestor MediaQuery changes.
Implementation
static double textScaleFactorOf(BuildContext context) => maybeTextScaleFactorOf(context) ?? 1.0;