textScaleFactorOf method Null safety
- BuildContext context
Returns textScaleFactor for the nearest MediaQuery ancestor or 1.0, if no such ancestor exists.
Implementation
static double textScaleFactorOf(BuildContext context) {
return MediaQuery.maybeOf(context)?.textScaleFactor ?? 1.0;
}