Skip to content
pubscout

pretty_string

1.0.1, released 4 years ago by an unverified publisher

Converts hard-to-read toString output from Equatable or Freezed into human-readable formatted strings.

WASM-ready
$ flutter pub add pretty_string
Source repository

What it does

Provides a `.toPrettier()` extension method that formats single-line `toString()` outputs from complex objects or strings into multi-line, indented representations. It supports custom indentation, separators, and brackets.

AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to improve log readability for complex data models generated by Equatable or Freezed.
  • You need a quick way to pretty-print serialized object strings during debugging.

Skip it when

  • You require complex object serialization for network transport rather than debugging logs.

Strengths

  • Simple extension method API (.toPrettier()).
  • Customizable indentation, separators, and bracket definitions.
  • Works out-of-the-box with Equatable and Freezed toString outputs.

Weaknesses

  • Limited to string formatting and debugging use cases.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

No native setup or build runner required.

final object = VeryComplicatedObject(...);
log(object.toPrettier());