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';
4
4
import 'package:ht_main/router/routes.dart' ;
5
5
import 'package:ht_shared/ht_shared.dart' ;
6
6
import 'package:ht_ui_kit/ht_ui_kit.dart' ;
7
+ import 'package:timeago/timeago.dart' as timeago;
7
8
8
9
/// {@template headline_tile_image_top}
9
10
/// A shared widget to display a headline item with a large image at the top.
@@ -147,8 +148,7 @@ class _HeadlineMetadataRow extends StatelessWidget {
147
148
148
149
@override
149
150
Widget build (BuildContext context) {
150
- // TODO(anyone): Use a proper timeago library.
151
- final formattedDate = headline.createdAt.toString ();
151
+ final formattedDate = timeago.format (headline.createdAt);
152
152
153
153
// Use bodySmall for a reasonable base size, with muted accent color
154
154
final metadataTextStyle = textTheme.bodySmall? .copyWith (
You can’t perform that action at this time.
0 commit comments