@@ -402,74 +402,73 @@ class _HeadlineDetailsPageState extends State<HeadlineDetailsPage> {
402
402
final chips = < Widget > [];
403
403
404
404
final formattedDate = DateFormat ('MMM d, yyyy' ).format (headline.createdAt);
405
- chips.add (
406
- Chip (
407
- avatar: Icon (
408
- Icons .calendar_today_outlined,
409
- size: chipAvatarSize,
410
- color: chipAvatarColor,
411
- ),
412
- label: Text (formattedDate),
413
- labelStyle: chipLabelStyle,
414
- backgroundColor: chipBackgroundColor,
415
- padding: chipPadding,
416
- shape: chipShape,
417
- visualDensity: VisualDensity .compact,
418
- materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
419
- ),
420
- );
421
-
422
- chips.add (
423
- InkWell (
424
- onTap: () {
425
- context.push (
426
- Routes .sourceDetails,
427
- extra: EntityDetailsPageArguments (entity: headline.source),
428
- );
429
- },
430
- borderRadius: BorderRadius .circular (AppSpacing .sm),
431
- child: Chip (
405
+ chips
406
+ ..add (
407
+ Chip (
432
408
avatar: Icon (
433
- Icons .source_outlined ,
409
+ Icons .calendar_today_outlined ,
434
410
size: chipAvatarSize,
435
411
color: chipAvatarColor,
436
412
),
437
- label: Text (headline.source.name ),
413
+ label: Text (formattedDate ),
438
414
labelStyle: chipLabelStyle,
439
415
backgroundColor: chipBackgroundColor,
440
416
padding: chipPadding,
441
417
shape: chipShape,
442
418
visualDensity: VisualDensity .compact,
443
419
materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
444
420
),
445
- ),
446
- );
447
-
448
- chips.add (
449
- InkWell (
450
- onTap: () {
451
- context.push (
452
- Routes .topicDetails,
453
- extra: EntityDetailsPageArguments (entity: headline.topic),
454
- );
455
- },
456
- borderRadius: BorderRadius .circular (AppSpacing .sm),
457
- child: Chip (
458
- avatar: Icon (
459
- Icons .category_outlined,
460
- size: chipAvatarSize,
461
- color: chipAvatarColor,
421
+ )
422
+ ..add (
423
+ InkWell (
424
+ onTap: () {
425
+ context.push (
426
+ Routes .sourceDetails,
427
+ extra: EntityDetailsPageArguments (entity: headline.source),
428
+ );
429
+ },
430
+ borderRadius: BorderRadius .circular (AppSpacing .sm),
431
+ child: Chip (
432
+ avatar: Icon (
433
+ Icons .source_outlined,
434
+ size: chipAvatarSize,
435
+ color: chipAvatarColor,
436
+ ),
437
+ label: Text (headline.source.name),
438
+ labelStyle: chipLabelStyle,
439
+ backgroundColor: chipBackgroundColor,
440
+ padding: chipPadding,
441
+ shape: chipShape,
442
+ visualDensity: VisualDensity .compact,
443
+ materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
462
444
),
463
- label: Text (headline.topic.name),
464
- labelStyle: chipLabelStyle,
465
- backgroundColor: chipBackgroundColor,
466
- padding: chipPadding,
467
- shape: chipShape,
468
- visualDensity: VisualDensity .compact,
469
- materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
470
445
),
471
- ),
472
- );
446
+ )
447
+ ..add (
448
+ InkWell (
449
+ onTap: () {
450
+ context.push (
451
+ Routes .topicDetails,
452
+ extra: EntityDetailsPageArguments (entity: headline.topic),
453
+ );
454
+ },
455
+ borderRadius: BorderRadius .circular (AppSpacing .sm),
456
+ child: Chip (
457
+ avatar: Icon (
458
+ Icons .category_outlined,
459
+ size: chipAvatarSize,
460
+ color: chipAvatarColor,
461
+ ),
462
+ label: Text (headline.topic.name),
463
+ labelStyle: chipLabelStyle,
464
+ backgroundColor: chipBackgroundColor,
465
+ padding: chipPadding,
466
+ shape: chipShape,
467
+ visualDensity: VisualDensity .compact,
468
+ materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
469
+ ),
470
+ ),
471
+ );
473
472
474
473
return chips;
475
474
}
0 commit comments