colored_print 0.0.2
colored_print: ^0.0.2 copied to clipboard

This package makes it possible to use colored prints.

Fork   Star   Watches

Plugin   Example

Print Color #

This package makes it possible to use colored prints.

Usage #

pubspec.yaml

dependency:
  colored_print: <lastest version>

your_file.dart

import 'package:colored_print/colored_print.dart';

print('${PrintColor.magenta('Magenta Color')} and ${PrintColor.yellow('Yellow Color')}');

Result:

image

ColoredPrint #

To facilitate its use, the auxiliary class ColoredPrint was created:

import 'package:colored_print/colored_print.dart';

//For single color line
ColoredPrint.show("Single Color Message", messageColor: PrintColor.cyan);

//For warning messages
ColoredPrint.warning("Warning Message");

//For error messages
ColoredPrint.error("Error Message");

//For success messages
ColoredPrint.success("Success Message");

//For logs (default)
ColoredPrint.log("Custom Log Message");

//For logs using custom tag and custom colors
ColoredPrint.log(
  "Custom Message",
  tag: "WALLACE", //Optional parameter. Default: "LOG"
  messageColor: PrintColor.white, //Optional parameter. Default: PrintColor.yellow
  tagColor: PrintColor.grey, //Optional parameter. Default: PrintColor.grey
);

Result:

image

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

10
likes
100
pub points
37%
popularity

This package makes it possible to use colored prints.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

davidsdearaujo@gmail.com

License

MIT (LICENSE)

Dependencies

ansicolor

More

Packages that depend on colored_print