From 3a9210c8cbefde85f77c9e2bdf187de93dfb288a Mon Sep 17 00:00:00 2001 From: M Date: Wed, 27 Jul 2022 16:15:18 +0100 Subject: [PATCH] Fixed formatting for display ionia discounts. --- lib/src/screens/ionia/cards/ionia_manage_cards_page.dart | 2 +- lib/src/widgets/discount_badge.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/screens/ionia/cards/ionia_manage_cards_page.dart b/lib/src/screens/ionia/cards/ionia_manage_cards_page.dart index 656b8676b..23597877b 100644 --- a/lib/src/screens/ionia/cards/ionia_manage_cards_page.dart +++ b/lib/src/screens/ionia/cards/ionia_manage_cards_page.dart @@ -240,7 +240,7 @@ class _IoniaManageCardsPageBodyState extends State { backgroundColor: Theme.of(context).textTheme.title.backgroundColor, titleColor: Theme.of(context).accentTextTheme.display3.backgroundColor, subtitleColor: Theme.of(context).accentTextTheme.display2.backgroundColor, - discount: merchant.discount, + discount: merchant.discount.toStringAsFixed(2), ); }, ), diff --git a/lib/src/widgets/discount_badge.dart b/lib/src/widgets/discount_badge.dart index 855822c60..1cbbf3e89 100644 --- a/lib/src/widgets/discount_badge.dart +++ b/lib/src/widgets/discount_badge.dart @@ -16,7 +16,7 @@ class DiscountBadge extends StatelessWidget { return Container( padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4), child: Text( - S.of(context).discount(percentage.toString()), + S.of(context).discount(percentage.toStringAsFixed(2)), style: TextStyle( color: Colors.white, fontSize: 12,