Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shan-shaji/chalkdart
Chalk package helps to style your terminal strings🎨.
https://github.com/shan-shaji/chalkdart
ansi-escape-codes ansi-escape-sequences chalk chalk-dart chalkdart cli dart dart-cli hacktoberfest-accepted
Last synced: about 1 month ago
JSON representation
Chalk package helps to style your terminal strings🎨.
- Host: GitHub
- URL: https://github.com/shan-shaji/chalkdart
- Owner: shan-shaji
- License: mit
- Created: 2021-07-28T04:24:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-30T16:07:59.000Z (almost 2 years ago)
- Last Synced: 2023-08-20T21:30:53.821Z (over 1 year ago)
- Topics: ansi-escape-codes, ansi-escape-sequences, chalk, chalk-dart, chalkdart, cli, dart, dart-cli, hacktoberfest-accepted
- Language: Dart
- Homepage: https://pub.dev/packages/chalk
- Size: 433 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Style your terminal strings🎨
----
This is a feature clone of the awesome [Chalk](https://github.com/chalk/chalk) (JavaScript) library.
All credits go to [Sindre Sorhus](https://github.com/sindresorhus).
[![Build Status](https://www.travis-ci.com/shan-shaji/chalkdart.svg?branch=main)](https://www.travis-ci.com/shan-shaji/chalkdart)
## Highlights
- Expressive API
- Highly performant
- Ability to nest styles
- Clean and focused## Install
With dart:
```dart
$ dart pub add chalk
```
With Flutter:```dart
$ flutter pub add chalk
```
Chalk comes with an easy to use API where you just chain the styles you want.```dart
// 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');
```