Skip to content

Commit

Permalink
Fix order of operations (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
SchrodingersGat authored Dec 23, 2024
1 parent 1a59920 commit f5e3b4a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/widget/stock/stock_detail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -738,19 +738,19 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {

Widget? _expiryIcon;

if (widget.item.stale) {
_expiryIcon = Text(L10().expiryStale, style: TextStyle(color: COLOR_WARNING));
} else if (widget.item.expired) {
if (widget.item.expired) {
_expiryIcon = Text(L10().expiryExpired, style: TextStyle(color: COLOR_DANGER));
} else if (widget.item.stale) {
_expiryIcon = Text(L10().expiryStale, style: TextStyle(color: COLOR_WARNING));
}

tiles.add(
ListTile(
title: Text(L10().expiryDate),
subtitle: Text(widget.item.expiryDateString),
leading: Icon(TablerIcons.calendar_x),
trailing: _expiryIcon,
)
ListTile(
title: Text(L10().expiryDate),
subtitle: Text(widget.item.expiryDateString),
leading: Icon(TablerIcons.calendar_x),
trailing: _expiryIcon,
)
);
}

Expand Down

0 comments on commit f5e3b4a

Please sign in to comment.