added background for qr image for bright theme.

This commit is contained in:
M 2021-06-04 20:48:33 +03:00
parent 7dcbfb8d54
commit 8b0dcceb7b
5 changed files with 16 additions and 11 deletions

View file

@ -366,7 +366,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 41;
CURRENT_PROJECT_VERSION = 42;
DEVELOPMENT_TEAM = 32J6BB6VUS;
ENABLE_BITCODE = NO;
EXCLUDED_SOURCE_FILE_NAMES = "\"$(SRCROOT)/Runner/GoogleService-Info.plist\"";
@ -384,7 +384,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.2.1;
MARKETING_VERSION = 4.2.2;
PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -510,7 +510,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 41;
CURRENT_PROJECT_VERSION = 42;
DEVELOPMENT_TEAM = 32J6BB6VUS;
ENABLE_BITCODE = NO;
EXCLUDED_SOURCE_FILE_NAMES = "\"$(SRCROOT)/Runner/GoogleService-Info.plist\"";
@ -528,7 +528,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.2.1;
MARKETING_VERSION = 4.2.2;
PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -546,7 +546,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 41;
CURRENT_PROJECT_VERSION = 42;
DEVELOPMENT_TEAM = 32J6BB6VUS;
ENABLE_BITCODE = NO;
EXCLUDED_SOURCE_FILE_NAMES = "\"$(SRCROOT)/Runner/GoogleService-Info.plist\"";
@ -564,7 +564,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.2.1;
MARKETING_VERSION = 4.2.2;
PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

View file

@ -3,6 +3,7 @@ import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
import 'package:cake_wallet/src/widgets/keyboard_done_button.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
import 'package:flutter/material.dart';
@ -73,7 +74,8 @@ class AddressPage extends StatelessWidget {
child: Observer(builder: (_) => QRWidget(
addressListViewModel: addressListViewModel,
amountTextFieldFocusNode: _cryptoAmountFocus,
isAmountFieldShow: !addressListViewModel.hasAccounts))
isAmountFieldShow: !addressListViewModel.hasAccounts,
isBright: walletViewModel.settingsStore.currentTheme.type == ThemeType.bright))
),
Observer(builder: (_) {
return addressListViewModel.hasAddressList

View file

@ -125,7 +125,8 @@ class ReceivePage extends BasePage {
child: QRWidget(
addressListViewModel: addressListViewModel,
isAmountFieldShow: true,
amountTextFieldFocusNode: _cryptoAmountFocus),
amountTextFieldFocusNode: _cryptoAmountFocus,
isBright: currentTheme.type == ThemeType.bright),
),
Observer(
builder: (_) => ListView.separated(

View file

@ -13,7 +13,8 @@ class QRWidget extends StatelessWidget {
QRWidget(
{@required this.addressListViewModel,
this.isAmountFieldShow = false,
this.amountTextFieldFocusNode})
this.amountTextFieldFocusNode,
this.isBright})
: amountController = TextEditingController(),
_formKey = GlobalKey<FormState>() {
amountController.addListener(() => addressListViewModel.amount =
@ -25,6 +26,7 @@ class QRWidget extends StatelessWidget {
final TextEditingController amountController;
final FocusNode amountTextFieldFocusNode;
final GlobalKey<FormState> _formKey;
final bool isBright;
@override
Widget build(BuildContext context) {
@ -55,7 +57,7 @@ class QRWidget extends StatelessWidget {
),
child: QrImage(
data: addressListViewModel.uri.toString(),
backgroundColor: Colors.transparent,
backgroundColor: isBright ? Colors.black : Colors.white,
foregroundColor: Theme.of(context).accentTextTheme.
display3.backgroundColor,
),

View file

@ -11,7 +11,7 @@ description: Cake Wallet.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 4.2.1+50
version: 4.2.2+51
environment:
sdk: ">=2.7.0 <3.0.0"