AndroidFontScale enum

Android Settings → Display → Font size presets.

Maps to Configuration.fontScale values. On Android 14+ native apps use non-linear scaling; Flutter goldens apply these as linear textScaleFactor values for layout regression testing.

supportedTextScales: [1.0, AndroidFontScale.extraLarge.value],
Inheritance
Available extensions

Values

small → const AndroidFontScale

Small (~85%).

const AndroidFontScale(0.85)
defaultScale → const AndroidFontScale

Default (100%).

const AndroidFontScale(1.0)
large → const AndroidFontScale

Large (~115%).

const AndroidFontScale(1.15)
largest → const AndroidFontScale

Largest classic preset (~130%).

const AndroidFontScale(1.30)
extraLarge → const AndroidFontScale

Common slider point (~150%).

const AndroidFontScale(1.50)
extraExtraLarge → const AndroidFontScale

Common slider point (~180%).

const AndroidFontScale(1.80)
maximum → const AndroidFontScale

Maximum commonly available on the font-size slider (~200%).

const AndroidFontScale(2.0)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value double
Linear scale factor used by goldenTest.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<AndroidFontScale>
A constant List of the values in this enum, in order of their declaration.