SceneTokenOwner enum
One shared value the package declares, as the editor reads it — the name, the kind, and the value the declaration gives.
Tokens are declared once per package, by hand, in scene_tokens.dart
(Token<SceneColor>('brand', SceneColor(0xFF…))), and every scene of the
package may read them: fill: tokens.brand. The tool only READS that
file, so a token has no door here — editing a property bound to one
detaches it rather than moving the token, the way a design tool detaches
a variable when you type over it. The kinds are the parameter kinds
minus list: what a property can read.
Two kinds. A VALUE token — SceneColor, double, String, bool — the
editor renders and any property of that kind may read. An OPAQUE token —
an InputDecoration, a ButtonStyle, anything the app owns — the editor
can only name and pass: it reaches an external widget's argument through
tokens.name, and never the canvas. Its type is the declaration's type
argument, verbatim, so the generated class can spell it back.
Who owns a token: the editor (a library, values it wrote and can draw)
or the app (an export, a name and a type the editor never sees inside).
Values
- library → const SceneTokenOwner
- export → const SceneTokenOwner
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Constants
-
values
→ const List<
SceneTokenOwner> - A constant List of the values in this enum, in order of their declaration.