From f849e96f914cbb93b682bce4c91b2cec3c68c106 Mon Sep 17 00:00:00 2001 From: M Date: Wed, 20 Jul 2022 17:57:46 +0100 Subject: [PATCH] Changed tips for ionia. --- .../cards/ionia_buy_card_detail_page.dart | 31 ++++++++++--------- .../ionia_purchase_merch_view_model.dart | 3 +- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart b/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart index 793b24446..01a912568 100644 --- a/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart +++ b/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart @@ -539,21 +539,22 @@ class TipButtonGroup extends StatelessWidget { @override Widget build(BuildContext context) { - return Row( - children: [ - ...[ - for (var i = 0; i < tipsList.length; i++) ...[ - TipButton( - isSelected: _isSelected(tipsList[i].percentage), - onTap: () => onSelect(tipsList[i]), - caption: '${tipsList[i].percentage}%', - subTitle: '\$${tipsList[i].additionalAmount}', - ), - SizedBox(width: 4), - ] - ], - ], - ); + return Container( + height: 50, + child: ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: tipsList.length, + itemBuilder: (BuildContext context, int index) { + final tip = tipsList[index]; + return Padding( + padding: EdgeInsets.only(right: 5), + child: TipButton( + isSelected: _isSelected(tip.percentage), + onTap: () => onSelect(tip), + caption: '${tip.percentage}%', + subTitle: '\$${tip.additionalAmount}', + )); + })); } } diff --git a/lib/view_model/ionia/ionia_purchase_merch_view_model.dart b/lib/view_model/ionia/ionia_purchase_merch_view_model.dart index 10e7c1f5e..7fc66bc37 100644 --- a/lib/view_model/ionia/ionia_purchase_merch_view_model.dart +++ b/lib/view_model/ionia/ionia_purchase_merch_view_model.dart @@ -22,7 +22,8 @@ abstract class IoniaMerchPurchaseViewModelBase with Store { percentage = 0.0; tips = [ IoniaTip(percentage: 0, originalAmount: amount), - IoniaTip(percentage: 10, originalAmount: amount), + IoniaTip(percentage: 15, originalAmount: amount), + IoniaTip(percentage: 18, originalAmount: amount), IoniaTip(percentage: 20, originalAmount: amount), ]; selectedTip = tips.first;