Skip to content
pubscout

console

4.1.0, released 6 years ago by an unverified publisher

Console library for ANSI colors, keyboard input, progress bars, and more

$ flutter pub add console
Source repository

What it does

Provides a high‑level API for building terminal applications in Dart. It supports ANSI color formatting, UTF‑8 icons, keyboard capture, clipboard, progress bars, prompts, and unit testing utilities.

AI-written summary of version 4.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Building command‑line tools that need colored output
  • Creating interactive prompts or menus in a terminal
  • Adding progress bars or loading indicators to CLI scripts

Skip it when

  • Developing web or Flutter UI applications
  • Running in environments that lack terminal support (e.g., browsers)

Strengths

  • Cross‑platform support for desktop and mobile terminals
  • Null safety and modern Dart syntax
  • Built‑in unit testing helpers for console output

Weaknesses

  • Does not work in browsers
  • Limited to console environments only

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1

Add dependency and call Console.init(); no special permissions required

import "package:console/console.dart";

void main() {
  Console.init();
  Console.writeLine("Hello, ${Console.ANSI_GREEN}world${Console.ANSI_RESET}");
}

Alternatives

Packages that do the same job and could replace console.

Works with

Packages commonly used together with console: ones it builds on, ones built on it, and its own family.