ansix
0.3.6, released 8 months ago by nikosportolos.com
Provides ANSI color, text styling, grid, and tree view tools for Dart and Flutter.
What it does
AnsiX offers tools and extensions for adding ANSI color and styling support to Dart and Flutter applications. It includes terminal support detection, string and string buffer extensions, printable data grids, tree views, JSON printing, and customized widgets.
AI-written summary of version 0.3.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to print styled and colored text to the console in a CLI application or Dart server.
- You need to render formatted data grids or tree views in a terminal or inside Flutter widgets.
Skip it when
- You are looking for a state management library.
- You only need standard UI components without terminal-inspired ANSI formatting.
Strengths
- Comprehensive ANSI terminal support and detection.
- Built-in printing helpers for JSON, tree views, and data grids.
- Cross-platform support including web and WASM.
Weaknesses
- Niche utility focused heavily on terminal-style output and specific ANSI formatting.
- Not intended for general-purpose app UI design.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 5
import 'package:ansix/ansix.dart';
void main() {
AnsiX.ensureSupportsAnsi();
print('This is a bold text'.bold());
print('This is a text with red foreground color'.red());
}Alternatives
Packages that do the same job and could replace ansix.
- dcli
A Dart SDK for building cross‑platform command line applications and scripts.
84Compare - dart_style
Provides an API and CLI to format Dart source code automatically.
89Compare - cli_tools
Utilities for building command‑line interfaces, including argument parsing, analytics, and progress reporting.
83Compare - tint
Terminal string styling as an extension on String.
50Compare
Works with
Packages commonly used together with ansix: ones it builds on, ones built on it, and its own family.