DimenScaled class

EN: Immutable builder for conditionally-scaled dimensions. Start from 100.scaledDp (or DimenSdp.scaled(100)), add .screen(...) branches and resolve with the terminal getters. Entries are matched by priority:

  1. ui-mode and qualifier and orientation
  2. ui-mode and orientation
  3. qualifier and orientation
  4. orientation only The winner's custom value (else the base) is scaled through the full engine with the entry's resolver/inverter.

PT: Construtor imutável para dimensões condicionalmente escaladas. Comece com 100.scaledDp (ou DimenSdp.scaled(100)), adicione ramos .screen(...) e resolva com os terminais. Os ramos são avaliados por prioridade (ui-mode + qualificador + orientação → … → apenas orientação). O valor customizado do vencedor (ou a base) é escalado pelo motor completo.

Constructors

DimenScaled(double base, {List<ScaledEntry> entries = const [], bool ignoreMultiWindows = false, bool applyAspectRatio = false, double? customSensitivityK})
const

Properties

applyAspectRatio → bool
final
base → double
final
customSensitivityK → double?
final
entries → List<ScaledEntry>
final
hashCode → int
The hash code for this object.
no setterinherited
hdp → double
no setter
ignoreMultiWindows → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sdp → double
Resolves through the published scope (logical dp). Requires AppDimensProvider (or an explicit context publication).
no setter
wdp → double
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(AppDimensContext context, {DpQualifier qualifier = DpQualifier.smallWidth}) → double
Resolves against an explicit window context (logical dp).
screen(UiModeType uiModeType, DpQualifier qualifierType, num qualifierValue, num customValue, {OrientationRequest orientation = OrientationRequest.any, DpQualifier? finalQualifierResolver, Inverter inverter = Inverter.standard}) → DimenScaled
P1 — matches ui-mode AND qualifier threshold.
screenMode(UiModeType uiModeType, num customValue, {DpQualifier? finalQualifierResolver, OrientationRequest orientation = OrientationRequest.any, Inverter inverter = Inverter.standard}) → DimenScaled
P2 — matches ui-mode (and optional orientation).
screenOrientation(OrientationRequest orientation, num customValue, {DpQualifier? finalQualifierResolver, Inverter inverter = Inverter.standard}) → DimenScaled
P4 — matches an orientation only.
screenQualifier(DpQualifier qualifierType, num qualifierValue, num customValue, {DpQualifier? finalQualifierResolver, OrientationRequest orientation = OrientationRequest.any, Inverter inverter = Inverter.standard}) → DimenScaled
P3 — matches a qualifier threshold (and optional orientation).
toString() → String
A string representation of this object.
inherited
withAspectRatio({bool apply = true, double? sensitivityK}) → DimenScaled
Enables the aspect-ratio aware curve.
withIgnoreMultiWindows({bool ignore = true}) → DimenScaled
Suppresses scaling inside multi-window modes.

Operators

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