File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import 'package:ht_main/entity_details/view/entity_details_page.dart';
44import 'package:ht_main/router/routes.dart' ;
55import 'package:ht_shared/ht_shared.dart' ;
66import 'package:ht_ui_kit/ht_ui_kit.dart' ;
7+ import 'package:timeago/timeago.dart' as timeago;
78
89/// {@template headline_tile_text_only}
910/// A widget to display a headline item with text only.
@@ -108,8 +109,7 @@ class _HeadlineMetadataRow extends StatelessWidget {
108109
109110 @override
110111 Widget build (BuildContext context) {
111- // TODO(anyone): Use a proper timeago library.
112- final formattedDate = headline.createdAt.toString ();
112+ final formattedDate = timeago.format (headline.createdAt);
113113
114114 // Use bodySmall for a reasonable base size, with muted accent color
115115 final metadataTextStyle = textTheme.bodySmall? .copyWith (
You can’t perform that action at this time.
0 commit comments