CAKE-344 | fixed MoonPay icon color on support and dashboard pages

This commit is contained in:
OleksandrSobol
2021-07-06 18:13:29 +03:00
parent dbf4897ac8
commit 5f02a7ddf5
9 changed files with 23 additions and 28 deletions
@@ -27,9 +27,10 @@ class BuyListItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
final isSelected = selectedProvider?.description == provider.description;
final iconColor = isSelected ? Colors.white : Colors.black;
final providerIcon = getBuyProviderIcon(provider.description,
isWhiteIconColor: isSelected);
iconColor: iconColor);
final backgroundColor = isSelected
? Palette.greyBlueCraiola
@@ -1,9 +1,6 @@
import 'package:cake_wallet/buy/buy_provider_description.dart';
import 'package:cake_wallet/buy/get_buy_provider_icon.dart';
import 'package:cake_wallet/themes/theme_base.dart';
import 'package:flutter/material.dart';
import 'package:cake_wallet/di.dart';
import 'package:cake_wallet/store/settings_store.dart';
class OrderRow extends StatelessWidget {
OrderRow({
@@ -22,11 +19,10 @@ class OrderRow extends StatelessWidget {
@override
Widget build(BuildContext context) {
final currentTheme = getIt.get<SettingsStore>().currentTheme;
final isWhiteIconColor = currentTheme.type != ThemeType.light;
final iconColor =
Theme.of(context).primaryTextTheme.display4.backgroundColor;
final providerIcon = getBuyProviderIcon(provider,
isWhiteIconColor: isWhiteIconColor);
final providerIcon = getBuyProviderIcon(provider, iconColor: iconColor);
return InkWell(
onTap: onTap,
+4 -1
View File
@@ -19,6 +19,9 @@ class SupportPage extends BasePage {
@override
Widget body(BuildContext context) {
final iconColor =
Theme.of(context).accentTextTheme.display4.backgroundColor;
return SectionStandardList(
sectionCount: 1,
itemCounter: (int _) => supportViewModel.items.length,
@@ -34,7 +37,7 @@ class SupportPage extends BasePage {
return SettingsLinkProviderCell(
title: item.title,
icon: item.icon,
iconColor: item.iconColor,
iconColor: item.hasIconColor ? iconColor : null,
link: item.link,
linkTitle: item.linkTitle);
}