Token<T> class

One token as the app declares it, in a final sceneTokens = [ … ] list beside the externals: Token<SceneColor>('brand', SceneColor(0xFF…)). The type argument is what the generated SceneTokens class types the field as, and the value is its default — so the declaration file compiles before anything has been generated from it, and the generated class is derived from it, never the other way round.

One value, and one only. A set that differs — a dark palette, a denser ramp — is another SceneTokens the app constructs and hands to a scene through its tokens formal; the library declares what the design is, not every skin it may be worn in.

Constructors

Token(String name, T value)
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
name → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → Type
no setter
value → T
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