timeago method
Formats provided date to a fuzzy time like 'a moment ago' (use timeago package to change locales)
- If
localeis passed will look for message for that locale, if you want to add or override locales usesetLocaleMessages. Defaults to 'en' - If
clockis passed this will be the point of reference for calculating the elapsed time. Defaults to DateTime.now() - If
allowFromNowis passed, format will use the From prefix, ie. a date 5 minutes from now in 'en' locale will display as '5 minutes from now' If locales was not loaded previously en would be used use timeago.setLocaleMessages to set them
Implementation
String timeago({String? locale, DateTime? clock, bool? allowFromNow}) =>
timeago_lib.format(
this,
locale: locale,
clock: clock,
allowFromNow: allowFromNow ?? false,
);