Skip to content

Commit

Permalink
docs: updated new example
Browse files Browse the repository at this point in the history
  • Loading branch information
Shan Shaji committed Aug 5, 2021
1 parent 754dc0d commit cdd99fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ $ flutter pub add chalk
Chalk comes with an easy to use API where you just chain the styles you want.

```dart
Chalk ch = Chalk();
print(ch.bold('This is awesome').blue());
var ch = Chalk();
// Specify font face by using [ftFace] property
print(ch.blue('blue text', ftFace: ChalkFtFace.italic));
Expand All @@ -41,8 +40,13 @@ Chalk comes with an easy to use API where you just chain the styles you want.
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'.blue() + ' world ' + 'chain text2'.red());
print('chain text'.green() + ' Normal Text ' + 'chain text2'.red());
print('\n');
```


Expand Down
1 change: 1 addition & 0 deletions example/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:chalk/chalk.dart';

void main() {
var ch = Chalk();
var ch = Chalk();

// Specify font face by using [ftFace] property
print(ch.blue('blue text', ftFace: ChalkFtFace.italic));
Expand Down
Binary file modified screenshot.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cdd99fb

Please sign in to comment.