chalkdart
library
Extensions
-
ChalkX11
on Chalk
-
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 the color
(or css
or x11
) method to get a dynamic
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.
Properties
-
ansiColorDisabled
→ bool
-
Read only. Chalk does not look at it's value.
final
-
chalk
↔ Chalk
-
Default global instance of chalk used for base call.
This can be set to a specific Chalk instance that would then serve
as basis for all calls.
getter/setter pair
-
chalkUsedAnsiInclude
→ String
-
Read only, informational only.
Name of the ansi include file used
supports_ansi.dart
is the default,
or the dart.libary.io version supports_ansi_io.dart
or the dart.library.html version supports_ansi_web.dart
.
final
-
dartSupportsAnsiColor
→ bool
-
Read only. Chalk does not use it's value although in some
situation a user might use this to set the Chalk ansi color level
(or something) I have left it here only for completeness.
Within the common debug consoles this variable is essentially
worthless because they return FALSE from both VSCode debug console
and IntelliJ/Android Studio debug consoles.
(This is because dart just checks for 'xterm' string being present in
the 'TERM' environmental variable of the console..)
See https://github.com/dart-lang/sdk/issues/31606 and
https://github.com/dart-lang/sdk/issues/41770 for more info.
final