ValueEvaluator class

Interprets analyzed Dart values (EdgeInsets.all(16), Colors.blue, ...) as design values.

Constructors

ValueEvaluator(MaterialTheme theme, {double screenWidth = 390, double screenHeight = 844})

Properties

hashCode → int
The hash code for this object.
no setterinherited
projectColors → Map<String, IrColor>
Colors referenced through project constants (AppColors.brand), by token name. They become design tokens alongside the color scheme.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
screenHeight → double
final
screenWidth → double
What MediaQuery.of(context).size resolves to: the exported screen.
final
theme ↔ MaterialTheme
The theme Theme.of(context) resolves to at the current point in the tree. The compiler swaps it inside Theme widgets.
getter/setter pair

Methods

alignment(DartValue? v) → (double, double)?
Alignment.x → (x, y) with components in -1..1.
border(DartValue? v) → IrStroke?
Border.all(...) or a uniform Border(...).
borderRadius(DartValue? v) → IrCorners?
borderSide(DartValue? v) → IrStroke?
boxShadows(DartValue? v) → List<IrShadow>
color(DartValue? v) → IrColor?
colorScheme(DartValue? v) → ColorSchemeValue?
Evaluates a ColorScheme expression: the constructors, fromSeed, copyWith, or Theme.of(context).colorScheme.
deref(DartValue? v) → DartValue?
Follows references and project calls to the values they stand for.
enumName(DartValue? v) → String?
Name of an enum-like constant: CrossAxisAlignment.start → start.
fontWeight(DartValue? v) → int?
insets(DartValue? v) → IrInsets?
integer(DartValue? v) → int?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
number(DartValue? v) → double?
radius(DartValue? v) → double?
shape(DartValue? v) → (IrCorners?, IrStroke?)
Shape → (corners, stroke). Stadium/circle shapes use a large radius.
spanText(DartValue? v) → String
Text of a TextSpan tree, concatenated.
string(DartValue? v) → String?
text(DartValue? v) → String
Plain text for a Text data argument. Non-constant parts become {placeholders}.
textStyle(DartValue? v) → TextStyleSpec?
textTheme(DartValue? v) → Map<String, TextStyleSpec>?
Evaluates a TextTheme expression into the entries it sets.
toString() → String
A string representation of this object.
inherited
unwrapStateProperty(DartValue? v) → DartValue?
Unwraps WidgetStatePropertyAll(x) / MaterialStatePropertyAll(x).

Operators

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