mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-08 11:59:23 +00:00
Changed tips for ionia.
This commit is contained in:
parent
100bb0f256
commit
f849e96f91
2 changed files with 18 additions and 16 deletions
|
@ -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}',
|
||||
));
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@ abstract class IoniaMerchPurchaseViewModelBase with Store {
|
|||
percentage = 0.0;
|
||||
tips = <IoniaTip>[
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue