FakeAppDimensContext class

Fixed context for tests, previews and headless engines.

Implemented types
Available extensions

Constructors

FakeAppDimensContext({ScreenConfiguration configuration = ScreenConfiguration.baseline, double density = 1.0, double xdpi = 160.0, double fontScale = 1.0, bool isInMultiWindowMode = false, UiModeType uiModeType = UiModeType.undefined})
const

Properties

configuration ScreenConfiguration
final
density double
Logical density (devicePixelRatio), guarded to finite > 0.
final
dimenMetrics DimenMetrics
Coherent snapshot derived from configuration.
no setteroverride
fontScale double
System font scale, guarded to finite > 0.
final
hashCode int
The hash code for this object.
no setterinherited
isInMultiWindowMode bool
True when the window is known to be inside a multi-window mode.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uiModeType UiModeType
Detected / forced UI-mode type.
final
xdpi double
Approximate physical pixels per inch (used by the units module).
final

Methods

axisDp(DpQualifier qualifier, Inverter inverter) double

Available on AppDimensContext, provided by the AppDimensContextX extension

Reads the screen dimension for qualifier after applying inverter.
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

phone → const FakeAppDimensContext
Phone-like baseline: 392 × 832 dp @ 2.75, font scale 1.0.
tablet → const FakeAppDimensContext
Tablet-like baseline: 800 × 1280 dp @ 2.0.