shan-shaji / chalkdart

Chalk package helps to style your terminal strings🎨.

Home Page:https://pub.dev/packages/chalk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Chalk package helps to style your terminal strings🎨.

https://pub.dev/packages/chalk

License:MIT License


Languages

Language:Dart 100.0%