textScaleFactorOf method

double textScaleFactorOf (
  1. 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.of(context, nullOk: true)?.textScaleFactor ?? 1.0;
}