Update Branch to null safety

Add deep linking to iOS
This commit is contained in:
OmarHatem
2022-11-08 16:56:27 +02:00
parent 7c7de65cdf
commit f078457c7b
8 changed files with 74 additions and 36 deletions
+4 -5
View File
@@ -1,4 +1,3 @@
import 'dart:ui';
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
import 'package:cake_wallet/utils/payment_request.dart';
import 'package:cw_core/transaction_priority.dart';
@@ -44,7 +43,7 @@ class SendCardState extends State<SendCard>
required this.output,
required this.sendViewModel,
this.initialPaymentRequest})
: addressController = TextEditingController(text: initialPaymentRequest?.address?.toLowerCase()),
: addressController = TextEditingController(text: initialPaymentRequest?.address.toLowerCase()),
cryptoAmountController = TextEditingController(text: initialPaymentRequest?.amount),
fiatAmountController = TextEditingController(),
noteController = TextEditingController(),
@@ -77,8 +76,8 @@ class SendCardState extends State<SendCard>
/// if the current wallet doesn't match the one in the qr code
if (initialPaymentRequest != null &&
sendViewModel.walletCurrencyName != initialPaymentRequest.scheme?.toLowerCase()) {
WidgetsBinding.instance?.addPostFrameCallback((timeStamp) {
sendViewModel.walletCurrencyName != initialPaymentRequest!.scheme.toLowerCase()) {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
showPopUp<void>(
context: context,
builder: (BuildContext context) {
@@ -544,7 +543,7 @@ class SendCardState extends State<SendCard>
addressController.text = output.address;
}
if (output.cryptoAmount.isNotEmpty ||
sendViewModel.walletCurrencyName != initialPaymentRequest?.scheme?.toLowerCase()) {
sendViewModel.walletCurrencyName != initialPaymentRequest?.scheme.toLowerCase()) {
cryptoAmountController.text = output.cryptoAmount;
}
fiatAmountController.text = output.fiatAmount;