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');

Libraries

chalk
chalk_builder