ViewAppDimensContext class

EN: Context built from a FlutterView (no widget tree required). Works on every Flutter platform and updates naturally because callers re-create it per resolution or via AppDimensProvider.

PT: Contexto construído a partir de um FlutterView (sem árvore de widgets). Funciona em todas as plataformas Flutter e se atualiza naturalmente porque os chamadores o recriam por resolução ou via AppDimensProvider.

Implemented types
Available extensions

Constructors

ViewAppDimensContext({required ScreenConfiguration configuration, double density = 1.0, double xdpi = 160.0, double fontScale = 1.0, bool isInMultiWindowMode = false, UiModeType uiModeType = UiModeType.undefined})
ViewAppDimensContext.fromView(FlutterView view, {UiModeType uiModeType = UiModeType.undefined})
Builds a context from a raw ui.FlutterView.
factory

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