2021-04-13 18:40:44 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:cake_wallet/buy/buy_provider_description.dart';
|
|
|
|
|
2021-06-02 13:52:58 +00:00
|
|
|
Image getBuyProviderIcon(BuyProviderDescription providerDescription,
|
2021-07-06 15:13:29 +00:00
|
|
|
{Color iconColor = Colors.black}) {
|
2021-06-02 13:52:58 +00:00
|
|
|
|
2021-04-13 18:40:44 +00:00
|
|
|
final _wyreIcon =
|
|
|
|
Image.asset('assets/images/wyre-icon.png', width: 36, height: 36);
|
2021-07-06 15:13:29 +00:00
|
|
|
final _moonPayIcon =
|
|
|
|
Image.asset('assets/images/moonpay-icon.png', color: iconColor,
|
2021-06-02 13:52:58 +00:00
|
|
|
width: 36, height: 34);
|
2021-04-13 18:40:44 +00:00
|
|
|
|
|
|
|
if (providerDescription != null) {
|
|
|
|
switch (providerDescription) {
|
|
|
|
case BuyProviderDescription.wyre:
|
|
|
|
return _wyreIcon;
|
|
|
|
case BuyProviderDescription.moonPay:
|
2021-07-06 15:13:29 +00:00
|
|
|
return _moonPayIcon;
|
2021-04-13 18:40:44 +00:00
|
|
|
default:
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|