Skip to content
pubscout

tint

2.0.1, released 4 years ago by frenco.dev

Terminal string styling as an extension on String.

WASM-readySingle maintainer
$ flutter pub add tint
Source repository

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.

  • attributed_text

    Text with metadata spans for easy text editing and styling.

  • kartal

    Collection of Dart and Flutter extensions for context, primitive variables, and common utilities.

  • ansi

    Terminal string styling with builtin style functions and string extensions.

Works with

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