TokenParser class
A parser that will parse a map of Design tokens and can resolve references to other tokens (e.g. {color.primary})
Constructors
-
TokenParser([List<
String> sets = const [], List<TokenTheme> themes = const []]) - Creates a new TokenParser instance.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sets
→ List<
String> -
final
-
themes
↔ List<
TokenTheme> -
getter/setter pair
Methods
-
findTokens(
String parent, Map< String, dynamic> input, [String? groupType]) → Map<String, Token> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
Map< String, dynamic> input) → void -
Parses the given json map recursively and saves the tokens in the
tokenMap
. -
resolve(
String key, [String theme = kDefaultThemeName]) → Token? -
resolvedTokens(
{String themeName = kDefaultThemeName}) → List< Token> - Returns a list of all tokens that have been parsed and all references resolved.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited