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.

Build Status

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');
2
likes
110
pub points
29%
popularity

Chalk helps to style your terminal strings

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on chalk