Android 14 nonlinear font scaling enabled



Android 14 introduced nonlinear font scaling up to 200%. It may change how your app looks when the user changes the accessibility text scaling in system preferences.



The Android 14 nonlinear font scaling feature prevents excessive accessibility font scaling by scaling larger text at a lesser rate when the user increases the text scaling value in system preferences.

Migration guide


As the Android 14 feature overview suggests, test your UI with the maximum font size enabled (200%). This should verify that your app can apply the font sizes correctly and can accommodate larger font sizes without impacting usability.

To adopt nonlinear font scaling in your app and custom widgets, consider migrating from textScaleFactor to TextScaler. To learn how to migrate to TextScaler, check out the Deprecate textScaleFactor in favor of TextScaler migration guide.

Temporarily Opting Out

To opt-out of nonlinear text scaling on Android 14 until you migrate your app, add a modified MediaQuery at the top of your app's widget tree:

  Builder(builder: (context) {
    final mediaQueryData = MediaQuery.of(context);
    final mediaQueryDataWithLinearTextScaling = mediaQueryData
      .copyWith(textScaler: TextScaler.linear(mediaQueryData.textScaler.textScaleFactor));
    return MediaQuery(data: mediaQueryDataWithLinearTextScaling, child: realWidgetTree);

This uses the deprecated textScaleFactor API. It will stop working once that API is removed from the Flutter API.



Landed in version: 3.14.0-11.0.pre
In stable release: 3.16



API documentation:

Relevant issues:

Relevant PRs:

See also: