mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-29 12:59:52 +00:00
CAKE-306 | fixed MoonPay icon for buy_list_item.dart and order_row.dart
This commit is contained in:
parent
087579410e
commit
90d53c9f6e
7 changed files with 47 additions and 25 deletions
|
@ -1,18 +1,24 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:cake_wallet/buy/buy_provider_description.dart';
|
||||
|
||||
Image getBuyProviderIcon(BuyProviderDescription providerDescription) {
|
||||
Image getBuyProviderIcon(BuyProviderDescription providerDescription,
|
||||
{bool isWhiteIconColor = false}) {
|
||||
|
||||
final _wyreIcon =
|
||||
Image.asset('assets/images/wyre-icon.png', width: 36, height: 36);
|
||||
final _moonPayIcon =
|
||||
Image.asset('assets/images/moonpay-icon.png', width: 36, height: 34);
|
||||
final _moonPayWhiteIcon =
|
||||
Image.asset('assets/images/moonpay-icon.png', color: Colors.white,
|
||||
width: 36, height: 34);
|
||||
final _moonPayBlackIcon =
|
||||
Image.asset('assets/images/moonpay-icon.png', color: Colors.black,
|
||||
width: 36, height: 34);
|
||||
|
||||
if (providerDescription != null) {
|
||||
switch (providerDescription) {
|
||||
case BuyProviderDescription.wyre:
|
||||
return _wyreIcon;
|
||||
case BuyProviderDescription.moonPay:
|
||||
return _moonPayIcon;
|
||||
return isWhiteIconColor ? _moonPayWhiteIcon : _moonPayBlackIcon;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue