tint
2.0.1, released 4 years ago by frenco.dev
Terminal string styling as an extension on String.
What it does
Tint is a library for terminal string styling extended upon Dart's String type. It provides foreground colors, background colors, attributes, dynamic colors, and utilities like reset and strip.
AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to style terminal output with colors and attributes using string extension methods.
- You need a lightweight way to add ANSI colors to command-line tool outputs.
Skip it when
- You are building a Flutter GUI application rather than a command-line interface tool.
- You need complex terminal UI components rather than just string styling.
Strengths
- Provides a clean API using extension methods directly on String types.
- Includes foreground colors, background colors, attributes, dynamic RGB colors, and ANSI utility functions.
Weaknesses
- Limited strictly to string styling for terminals.
- Not documented beyond basic terminal output usage.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Not documented
import 'package:tint/tint.dart';
void main() {
print('underlined blue text on white background'
.underline()
.blue()
.onWhite());
}Alternatives
Packages that do the same job and could replace tint.
- extension_utils
Dart and Flutter extension library for strings, collections, dates, numbers, and colors.
74Compare - attributed_text
Text with metadata spans for easy text editing and styling.
72Compare - kartal
Collection of Dart and Flutter extensions for context, primitive variables, and common utilities.
71Compare - ansi
Terminal string styling with builtin style functions and string extensions.
45Compare
Works with
Packages commonly used together with tint: ones it builds on, ones built on it, and its own family.
- interactBuilt on tintCustomizable interactive command-line components for Dart
- fvmBuilt on tintCLI to manage Flutter SDK versions per project
- import_sorterBuilt on tintAutomatically sorts Dart imports alphabetically and groups them by type
- derryBuilt on tintA script manager to define and run shortcut scripts inside your pubspec.yaml file.
- import_path_converterBuilt on tintAutomatically convert relative and absolute import paths in Dart files.
- cli_notifyBuilt on tintCheck pub.dev for updates for your Dart CLI and print update information.
- pmvvmBuilt on tintA clean MVVM state management solution for Flutter using the Provider package and hooks.
- dart_license_checkerBuilt on tintTool to view all dependencies and their licenses in your Dart or Flutter project.