colors_parser library

Classes

Context
An instantiable class for parsing colors. Unlike the top-level functions, this lets you explicitly specify the colors map.

Properties

colorsMap Map<String, Color>
Gets the colors map associated with the colors parser context like Context.colorsMap.
read-only
colorsMapEN Map<String, Color>
Default English language colors map.
final
context Context
The colors parser context. [...]
final

Functions

parse(String source) Color
Parses a string containing a Colors name or ARGB number into a Color like Context.parse.
toColorsString(Color color) String
Converts color to a Material Colors name or ARGB number like Context.toColorsString.
tryParse(String source) Color
Parse source as a Colors name or ARGB number and return its value like Context.tryParse.