ansix 0.0.4-prerelease copy "ansix: ^0.0.4-prerelease" to clipboard
ansix: ^0.0.4-prerelease copied to clipboard

AnsiX is an extended ANSI library that provides tools and extensions for Dart & Flutter projects.

example/main.dart

// ignore_for_file: avoid_print

import 'package:ansix/ansix.dart';

void main() {
  // Ensure that the attached terminal supports ANSI formatting
  AnsiX.ensureSupportsAnsi();

  // String extensions
  print('This is a bold text'.bold());
  print('This is a text with red foreground color'.red());

  // StringBuffer extensions
  print(StringBuffer()
    ..writeWithForegroundColor('Hello ', AnsiColor.blue)
    ..writeStyled(
      'AnsiX ',
      textStyle: const AnsiTextStyle(bold: true),
      foregroundColor: AnsiColor.aquamarine2,
    )
    ..writeWithForegroundColor('!', AnsiColor.fuchsia)
    ..writeWithForegroundColor('!', AnsiColor.red1)
    ..writeWithForegroundColor('!', AnsiColor.darkOrange3)
    ..toString());
}
14
likes
0
pub points
83%
popularity

Publisher

verified publishernikosportolos.com

AnsiX is an extended ANSI library that provides tools and extensions for Dart & Flutter projects.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

collection, data_class_plugin, meta, path

More

Packages that depend on ansix