mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 17:27:37 +00:00
CAKE-344 | added MoonPay contact to support page; applied icon color change according to theme
This commit is contained in:
parent
a423f4b776
commit
dbf4897ac8
5 changed files with 24 additions and 3 deletions
BIN
assets/images/moonpay.png
Normal file
BIN
assets/images/moonpay.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
|
@ -7,6 +7,7 @@ class SettingsLinkProviderCell extends StandardListRow {
|
|||
SettingsLinkProviderCell(
|
||||
{@required String title,
|
||||
@required this.icon,
|
||||
this.iconColor,
|
||||
@required this.link,
|
||||
@required this.linkTitle})
|
||||
: super(title: title, isSelected: false, onTap: (BuildContext context) => _launchUrl(link) );
|
||||
|
@ -14,10 +15,11 @@ class SettingsLinkProviderCell extends StandardListRow {
|
|||
final String icon;
|
||||
final String link;
|
||||
final String linkTitle;
|
||||
final Color iconColor;
|
||||
|
||||
@override
|
||||
Widget buildLeading(BuildContext context) =>
|
||||
icon != null ? Image.asset(icon) : null;
|
||||
icon != null ? Image.asset(icon, color: iconColor) : null;
|
||||
|
||||
@override
|
||||
Widget buildTrailing(BuildContext context) => Text(linkTitle,
|
||||
|
|
|
@ -34,6 +34,7 @@ class SupportPage extends BasePage {
|
|||
return SettingsLinkProviderCell(
|
||||
title: item.title,
|
||||
icon: item.icon,
|
||||
iconColor: item.iconColor,
|
||||
link: item.link,
|
||||
linkTitle: item.linkTitle);
|
||||
}
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:cake_wallet/view_model/settings/settings_list_item.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LinkListItem extends SettingsListItem {
|
||||
LinkListItem(
|
||||
{@required String title,
|
||||
@required this.link,
|
||||
@required this.linkTitle,
|
||||
this.icon})
|
||||
this.icon,
|
||||
this.iconColor})
|
||||
: super(title);
|
||||
|
||||
final String icon;
|
||||
final String link;
|
||||
final String linkTitle;
|
||||
final Color iconColor;
|
||||
}
|
|
@ -6,6 +6,9 @@ import 'package:flutter/cupertino.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:cake_wallet/di.dart';
|
||||
import 'package:cake_wallet/store/settings_store.dart';
|
||||
import 'package:cake_wallet/themes/theme_base.dart';
|
||||
|
||||
part 'support_view_model.g.dart';
|
||||
|
||||
|
@ -13,6 +16,11 @@ class SupportViewModel = SupportViewModelBase with _$SupportViewModel;
|
|||
|
||||
abstract class SupportViewModelBase with Store {
|
||||
SupportViewModelBase() {
|
||||
final currentTheme = getIt.get<SettingsStore>().currentTheme;
|
||||
final iconColor = currentTheme.type == ThemeType.dark
|
||||
? Colors.white
|
||||
: Colors.black;
|
||||
|
||||
items = [
|
||||
RegularListItem(
|
||||
title: S.current.faq,
|
||||
|
@ -31,6 +39,7 @@ abstract class SupportViewModelBase with Store {
|
|||
LinkListItem(
|
||||
title: 'GitHub',
|
||||
icon: 'assets/images/github.png',
|
||||
iconColor: iconColor,
|
||||
linkTitle: S.current.apk_update,
|
||||
link: 'https://github.com/cake-tech/cake_wallet/releases'),
|
||||
LinkListItem(
|
||||
|
@ -52,7 +61,13 @@ abstract class SupportViewModelBase with Store {
|
|||
title: 'Wyre',
|
||||
icon: 'assets/images/wyre.png',
|
||||
linkTitle: S.current.submit_request,
|
||||
link: 'https://wyre-support.zendesk.com/hc/en-us/requests/new')
|
||||
link: 'https://wyre-support.zendesk.com/hc/en-us/requests/new'),
|
||||
LinkListItem(
|
||||
title: 'MoonPay',
|
||||
icon: 'assets/images/moonpay.png',
|
||||
iconColor: iconColor,
|
||||
linkTitle: S.current.submit_request,
|
||||
link: 'https://support.moonpay.com/hc/en-gb/requests/new')
|
||||
];
|
||||
}
|
||||
static const url = 'https://cakewallet.com/guide/';
|
||||
|
|
Loading…
Reference in a new issue