chalk 1.1.5 chalk: ^1.1.5 copied to clipboard
Chalk helps to style your terminal strings
Style your terminal strings🎨
This is a feature clone of the awesome Chalk (JavaScript) library.
All credits go to Sindre Sorhus.
Highlights #
- Expressive API
- Highly performant
- Ability to nest styles
- Clean and focused
Install #
With dart:
$ dart pub add chalk
With Flutter:
$ flutter pub add chalk
Chalk comes with an easy to use API where you just chain the styles you want.
var ch = Chalk();
// Specify font face by using [ftFace] property
print(ch.blue('blue text', ftFace: ChalkFtFace.italic));
print(ch.red('red Text', ftFace: ChalkFtFace.bold));
// Chain styles
print(ch.faint('faint text').blue());
print(ch.cyan('cyan').bold());
// Not widely supported
print(ch.yellow('yellow').underLined());
print(ch.yellow('yellow').strikeThrough());
// Combine styled and normal strings
print('chain text'.green() + ' Normal Text ' + 'chain text2'.red());
print('\n');