flutter_timeago_pro
3.0.9, released 2 months ago by aslamambiloly.2bd.net
Formats nullable DateTime into human‑friendly relative or absolute timestamps.
What it does
Provides an extension that converts a DateTime? into a readable string like "Just now", "5m ago" or a formatted date when the value is older. It intelligently switches between relative and absolute representations and supports custom locales, time patterns, and future dates.
AI-written summary of version 3.0.9, based on the package's README and metadata. Report an inaccuracy
Use it when
- Displaying chat or notification timestamps
- Showing feed items where recent dates should be relative and older dates absolute
Skip it when
- When exact timestamps are required without any relative wording
- High‑frequency updates where formatting overhead matters
Strengths
- Smart switching between relative and absolute formats
- Customizable locale and time pattern
- Supports both past and future dates
Weaknesses
- Flutter‑only, no pure‑Dart fallback
- Relies on intl package, increasing bundle size
- Limited built‑in locale support, requires manual configuration for others
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:flutter_timeago_pro/flutter_timeago_pro.dart';
final dt = DateTime.now().subtract(const Duration(minutes: 25));
print(dt.toTimeagoFormat()); // "25m ago"
final future = DateTime.now().add(const Duration(minutes: 45));
print(future.toTimeagoFormat()); // "in 45m"Alternatives
Packages that do the same job and could replace flutter_timeago_pro.
- gtk
GTK utilities for Flutter Linux applications, providing settings and application lifecycle helpers.
76Compare - flutter_flavorizr
A utility to easily create and configure application flavors in Flutter.
86Compare - timeago
Humanize dates into fuzzy timestamps like "15 minutes ago"
62Compare - get_time_ago
Relative time formatting for Dart and Flutter supporting 22 locales and CLDR plurals.
82Compare
Works with
Packages commonly used together with flutter_timeago_pro: ones it builds on, ones built on it, and its own family.