chalk_x11 library Null safety
Add all of the standard SVG/CSS/X11 colors to chalkdart
Extensions
- ChalkX11
-
This extension class adds proper methods to Chalk for all of the
standard X11/CSS/SVG color names for use by Chalk.
This extension has the added advantage of providing code completion and type
checking at coding/compile time. Using the dynamic color method cannot provide
any coding/compile time checks because it works via a dynamic lookup at run time.
Example of using this extension for Chalk:
chalk.lightGoldenrodYellow.onCornflowerBlue(...)
versus having to use thecolor
(orcss
orx11
) method to get adynamic
so you can use the dynamic lookups:chalk.color.lightGoldenrodYellow.onCornflowerBlue(...)
Because of the dynamic lookup is not resolved until run time that method can be prone to errors which would not be detected until run time.