console
4.1.0, released 6 years ago by an unverified publisher
Console library for ANSI colors, keyboard input, progress bars, and more
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.
- console_bars
A package for creating a customizable progress bar in the console easily.
71Compare - string_to_color
Convert strings to colors, hex strings, or hex integers in Dart and Flutter.
42Compare
Works with
Packages commonly used together with console: ones it builds on, ones built on it, and its own family.
- vector_mathconsole depends on itVector math library for 2D/3D/4D vectors, matrices, quaternions, and geometry.
- msixBuilt on consoleCLI tool that creates MSIX installers from Flutter Windows build outputs.
- index_generatorBuilt on consoleAutomatically generate index / barrel / library files with all exports needed.
- dart_apitoolBuilt on consoleAnalyze and diff public APIs of Dart packages to check semantic versioning.
- derryBuilt on consoleA script manager to define and run shortcut scripts inside your pubspec.yaml file.
- linkcheckBuilt on consoleA very fast link-checker that crawls websites and checks integrity of links in HTML and CSS.