io
1.1.0, released 3 months ago by tools.dart.dev
Utilities for the Dart VM Runtime including ANSI colors, file copying, and exit code values.
What it does
Provides helper utilities for Dart VM applications such as ANSI color wrappers for terminal output, file path copying functions, a process manager for spawning subprocesses, and a subscriber-safe wrapper around standard input.
AI-written summary of version 1.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a command-line interface (CLI) or Dart VM script that needs terminal colors.
- You need to spawn and manage external processes with forwarded I/O streams.
- You need to copy directory trees recursively or check if files are executable.
Skip it when
- You are building a Flutter mobile or web application where CLI terminal utilities and process spawning are not applicable.
Strengths
- Simplifies working with command-line processes and standard input streams.
- Provides built-in ANSI coloring helpers for terminal output.
- Includes recursive file and directory copying utilities.
Weaknesses
- Limited to Dart VM environments and does not apply to standard Flutter UI development.
- Small feature set focused strictly on specific VM utilities.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
import 'package:io/ansi.dart';
void main() {
print(wrapWith('** Important **', [red, styleBold, styleUnderlined]));
}Alternatives
Packages that do the same job and could replace io.
- gtk
GTK utilities for Flutter Linux applications, providing settings and application lifecycle helpers.
76Compare - mime
Utilities to resolve MIME types from file names, magic bytes, and to parse multipart streams.
92Compare - source_span
Standard representation for source code locations, spans, and human-friendly error messages.
84Compare - black_hole_flutter
Flutter utility functions, extension methods, and custom widgets.
83Compare
Works with
Packages commonly used together with io: ones it builds on, ones built on it, and its own family.
- string_scannerio depends on itA class for parsing strings using a sequence of patterns.
- yamlSame familyA Dart library for parsing YAML documents into Dart data structures.
- globSame familyA file and directory globbing library that supports Bash-style path matching and listing.
- test_apiSame familyThe user facing API for structuring Dart tests and checking expectations.
- boolean_selectorSame familyParses and evaluates simplified Dart-like boolean expression strings.
- testBuilt on ioA full featured library for writing and running Dart tests across platforms.
- build_runnerBuilt on ioA build system for Dart code generation and modular compilation.
- mason_loggerBuilt on ioA lightweight CLI logger with prompts, progress, and custom styling.