Skip to content
pubscout

humanizer

3.0.1, released 2 years ago by kent-boogaart.com

Converts raw Dart values into human-friendly representations.

WASM-ready
$ flutter pub add humanizer
Source repository

What it does

A library that converts raw Dart values into readable formats for users. It supports approximate time formatting, cardinal and ordinal numbers, plurality, string casing and truncation, programming symbols, and units of measurement.

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

Use it when

  • You need to display approximate relative time from a Duration
  • You need to format numbers into cardinal or ordinal text
  • You need to humanize units of measurement or large numbers

Skip it when

  • You require robust multilingual localization beyond English
  • You only need standard intl formatting without extra humanizer extensions

Strengths

  • Broad API surface covering times, numbers, strings, and units
  • Allows running calculations without loss of precision using Rational

Weaknesses

  • Currently only includes an English implementation despite being locale-aware

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
4
import 'package:humanizer/humanizer.dart';

// Use humanizer extensions and types in your code

Alternatives

Packages that do the same job and could replace humanizer.

  • timeago

    If you specifically need time ago formatting with extensive multi-language support.

Works with

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