timeago_text

Build Status

Flutter text widget with fuzzy date time and auto update text time (ex. 1 minute ago)

Since it's just basically a flutter text widget, so you can use every properties as the flutter text widget.

  • now supporting 4 types of text
    • en
    • en_short
    • th
    • th_short

Installing

dependencies:
  timeago_text: ^0.0.2+1

Import

import 'package:timeago_text/timeago_text.dart';

Usage

Use the package as following:

TimeAgoText(date: yourDate, lang: 'en')
// normal English text format (ex. 15 minutes ago)
TimeAgoText(date: yourDate, lang: 'en_short')
// short English text format (ex. 15 min)
TimeAgoText(date: yourDate, lang: 'th')
// normal Thai text format (ex. 15 นาทีที่แล้ว)
TimeAgoText(date: yourDate, lang: 'th_short')
// short Thai text format (ex. 15 น.)

More

Note that it's just a flutter stateful widget with a predefined unique key for the widget.

Libraries

en
en_short
th
th_short
timeago_text
TimeAgoText