chalk 1.2.1 copy "chalk: ^1.2.1" to clipboard
chalk: ^1.2.1 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.


  // Specify font face by using [ftFace] property
  print(chalk.blue('blue text', ftFace: ChalkFtFace.italic));
  print(chalk.red('red Text', ftFace: ChalkFtFace.bold));

  // Chain styles
  print(chalk.faint('faint text').blue());
  print(chalk.cyan('cyan').bold());

  // Not widely supported
  print(chalk.yellow('yellow').underLined());
  print(chalk.yellow('yellow').strikeThrough());

  // Combine styled and normal strings
  print('chain text'.green() + ' Normal Text ' + 'chain text2'.red());
  print('\n');
8
likes
140
pub points
69%
popularity

Publisher

unverified uploader

Chalk helps to style your terminal strings

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on chalk