Flutter upgrade

This commit is contained in:
M
2022-10-12 13:09:57 -04:00
parent c921ad890a
commit 1beb18b045
505 changed files with 6657 additions and 5875 deletions
+42 -34
View File
@@ -28,7 +28,7 @@ import 'package:smooth_page_indicator/smooth_page_indicator.dart';
import 'package:cw_core/crypto_currency.dart';
class SendPage extends BasePage {
SendPage({@required this.sendViewModel,@required this.settingsViewModel }) : _formKey = GlobalKey<FormState>(),fiatFromSettings = settingsViewModel.fiatCurrency;
SendPage({required this.sendViewModel,required this.settingsViewModel }) : _formKey = GlobalKey<FormState>(),fiatFromSettings = settingsViewModel.fiatCurrency;
final SendViewModel sendViewModel;
final SettingsViewModel settingsViewModel;
@@ -60,15 +60,20 @@ class SendPage extends BasePage {
}
@override
Widget middle(BuildContext context) => Row(
Widget? middle(BuildContext context) {
final supMiddle = super.middle(context);
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.only(right:8.0),
child: Observer(builder: (_) => SyncIndicatorIcon(isSynced: sendViewModel.isReadyForSend),),
),super.middle(context),
),
if (supMiddle != null)
supMiddle
],
);
}
@override
Widget trailing(context) => Observer(builder: (_) {
@@ -76,7 +81,7 @@ class SendPage extends BasePage {
? TrailButton(
caption: S.of(context).remove,
onPressed: () {
var pageToJump = controller.page.round() - 1;
var pageToJump = (controller.page?.round() ?? 0) - 1;
pageToJump = pageToJump > 0 ? pageToJump : 0;
final output = _defineCurrentOutput();
sendViewModel.removeOutput(output);
@@ -86,7 +91,7 @@ class SendPage extends BasePage {
caption: S.of(context).clear,
onPressed: () {
final output = _defineCurrentOutput();
_formKey.currentState.reset();
_formKey.currentState?.reset();
output.reset();
});
});
@@ -139,13 +144,13 @@ class SendPage extends BasePage {
dotWidth: 6.0,
dotHeight: 6.0,
dotColor: Theme.of(context)
.primaryTextTheme
.display2
.backgroundColor,
.primaryTextTheme!
.headline3!
.backgroundColor!,
activeDotColor: Theme.of(context)
.primaryTextTheme
.display3
.backgroundColor),
.primaryTextTheme!
.headline2!
.backgroundColor!),
)
: Offstage();
},
@@ -175,9 +180,9 @@ class SendPage extends BasePage {
borderType: BorderType.RRect,
dashPattern: [6, 4],
color: Theme.of(context)
.primaryTextTheme
.headline2
.decorationColor,
.primaryTextTheme!
.headline2!
.decorationColor!,
strokeWidth: 2,
radius: Radius.circular(20),
child: Container(
@@ -193,9 +198,9 @@ class SendPage extends BasePage {
? Icon(
Icons.add,
color: Theme.of(context)
.primaryTextTheme
.display3
.color,
.primaryTextTheme!
.headline2!
.color!,
)
: Text(
S.of(context).new_template,
@@ -203,9 +208,9 @@ class SendPage extends BasePage {
fontSize: 14,
fontWeight: FontWeight.w600,
color: Theme.of(context)
.primaryTextTheme
.display3
.color,
.primaryTextTheme!
.headline2!
.color!,
),
),
),
@@ -284,9 +289,9 @@ class SendPage extends BasePage {
text: 'Change your asset (${sendViewModel.selectedCryptoCurrency})',
color: Colors.transparent,
textColor: Theme.of(context)
.accentTextTheme
.display2
.decorationColor,
.accentTextTheme!
.headline3!
.decorationColor!,
)
)
),
@@ -303,20 +308,20 @@ class SendPage extends BasePage {
text: S.of(context).add_receiver,
color: Colors.transparent,
textColor: Theme.of(context)
.accentTextTheme
.display2
.decorationColor,
.accentTextTheme!
.headline3!
.decorationColor!,
isDottedBorder: true,
borderColor: Theme.of(context)
.primaryTextTheme
.display2
.decorationColor,
.primaryTextTheme!
.headline3!
.decorationColor!,
)),
Observer(
builder: (_) {
return LoadingPrimaryButton(
onPressed: () async {
if (!_formKey.currentState.validate()) {
if (_formKey.currentState != null && !_formKey.currentState!.validate()) {
if (sendViewModel.outputs.length > 1) {
showErrorValidationAlert(context);
}
@@ -338,7 +343,7 @@ class SendPage extends BasePage {
},
text: S.of(context).send,
color: Theme.of(context).accentTextTheme.body2.color,
color: Theme.of(context).accentTextTheme!.bodyText1!.color!,
textColor: Colors.white,
isLoading: sendViewModel.state is IsExecutingState ||
sendViewModel.state is TransactionCommitting,
@@ -380,13 +385,13 @@ class SendPage extends BasePage {
alertTitle: S.of(context).confirm_sending,
amount: S.of(context).send_amount,
amountValue:
sendViewModel.pendingTransaction.amountFormatted,
sendViewModel.pendingTransaction!.amountFormatted,
fiatAmountValue:
sendViewModel.pendingTransactionFiatAmount +
' ' +
sendViewModel.fiat.title,
fee: S.of(context).send_fee,
feeValue: sendViewModel.pendingTransaction.feeFormatted,
feeValue: sendViewModel.pendingTransaction!.feeFormatted,
feeFiatAmount:
sendViewModel.pendingTransactionFeeFiatAmount +
' ' +
@@ -437,7 +442,10 @@ class SendPage extends BasePage {
}
Output _defineCurrentOutput() {
final itemCount = controller.page.round();
if (controller.page == null) {
throw Exception('Controller page is null');
}
final itemCount = controller.page!.round();
return sendViewModel.outputs[itemCount];
}
+32 -32
View File
@@ -16,7 +16,7 @@ import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/src/screens/send/widgets/prefix_currency_icon_widget.dart';
class SendTemplatePage extends BasePage {
SendTemplatePage({@required this.sendTemplateViewModel}) {
SendTemplatePage({required this.sendTemplateViewModel}) {
sendTemplateViewModel.output.reset();
}
@@ -51,7 +51,7 @@ class SendTemplatePage extends BasePage {
config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor:
Theme.of(context).accentTextTheme.body2.backgroundColor,
Theme.of(context).accentTextTheme!.bodyText1!.backgroundColor!,
nextFocus: false,
actions: [
KeyboardActionsItem(
@@ -75,8 +75,8 @@ class SendTemplatePage extends BasePage {
bottomRight: Radius.circular(24),
),
gradient: LinearGradient(colors: [
Theme.of(context).primaryTextTheme.subhead.color,
Theme.of(context).primaryTextTheme.subhead.decorationColor,
Theme.of(context).primaryTextTheme!.subtitle1!.color!,
Theme.of(context).primaryTextTheme!.subtitle1!.decorationColor!,
], begin: Alignment.topLeft, end: Alignment.bottomRight),
),
child: Form(
@@ -91,18 +91,18 @@ class SendTemplatePage extends BasePage {
controller: _nameController,
hintText: S.of(context).send_name,
borderColor: Theme.of(context)
.primaryTextTheme
.headline
.color,
.primaryTextTheme!
.headline5!
.color!,
textStyle: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Colors.white),
placeholderTextStyle: TextStyle(
color: Theme.of(context)
.primaryTextTheme
.headline
.decorationColor,
.primaryTextTheme!
.headline5!
.decorationColor!,
fontWeight: FontWeight.w500,
fontSize: 14),
validator: sendTemplateViewModel.templateValidator,
@@ -122,13 +122,13 @@ class SendTemplatePage extends BasePage {
AddressTextFieldOption.addressBook
],
buttonColor: Theme.of(context)
.primaryTextTheme
.display1
.color,
.primaryTextTheme!
.headline4!
.color!,
borderColor: Theme.of(context)
.primaryTextTheme
.headline
.color,
.primaryTextTheme!
.headline5!
.color!,
textStyle: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
@@ -137,9 +137,9 @@ class SendTemplatePage extends BasePage {
fontSize: 14,
fontWeight: FontWeight.w500,
color: Theme.of(context)
.primaryTextTheme
.headline
.decorationColor),
.primaryTextTheme!
.headline5!
.decorationColor!),
),
),
Padding(
@@ -169,18 +169,18 @@ class SendTemplatePage extends BasePage {
)),
hintText: '0.0000',
borderColor: Theme.of(context)
.primaryTextTheme
.headline
.color,
.primaryTextTheme!
.headline5!
.color!,
textStyle: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Colors.white),
placeholderTextStyle: TextStyle(
color: Theme.of(context)
.primaryTextTheme
.headline
.decorationColor,
.primaryTextTheme!
.headline5!
.decorationColor!,
fontWeight: FontWeight.w500,
fontSize: 14),
validator:
@@ -211,18 +211,18 @@ class SendTemplatePage extends BasePage {
)),
hintText: '0.00',
borderColor: Theme.of(context)
.primaryTextTheme
.headline
.color,
.primaryTextTheme!
.headline5!
.color!,
textStyle: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Colors.white),
placeholderTextStyle: TextStyle(
color: Theme.of(context)
.primaryTextTheme
.headline
.decorationColor,
.primaryTextTheme!
.headline5!
.decorationColor!,
fontWeight: FontWeight.w500,
fontSize: 14),
))),
@@ -237,7 +237,7 @@ class SendTemplatePage extends BasePage {
EdgeInsets.only(left: 24, right: 24, bottom: 24),
bottomSection: PrimaryButton(
onPressed: () {
if (_formKey.currentState.validate()) {
if (_formKey.currentState != null && _formKey.currentState!.validate()) {
sendTemplateViewModel.addTemplate(
isCurrencySelected: sendTemplateViewModel.isCurrencySelected,
name: _nameController.text,
@@ -4,9 +4,9 @@ import 'package:cake_wallet/src/widgets/base_alert_dialog.dart';
class ChooseYatAddressAlert extends BaseAlertDialog {
ChooseYatAddressAlert({
@required this.alertTitle,
@required this.alertContent,
@required this.addresses,
required this.alertTitle,
required this.alertContent,
required this.addresses,
});
final String alertTitle;
@@ -65,7 +65,7 @@ class ChooseYatAddressButtonsState extends State<ChooseYatAddressButtons> {
Container(
width: 300,
height: 158,
color: Theme.of(context).accentTextTheme.body1.backgroundColor,
color: Theme.of(context).accentTextTheme!.bodyText2!.backgroundColor!,
child: ListView.separated(
controller: controller,
padding: EdgeInsets.all(0),
@@ -97,7 +97,7 @@ class ChooseYatAddressButtonsState extends State<ChooseYatAddressButtons> {
fontSize: 15,
fontWeight: FontWeight.w600,
fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme.title.color,
color: Theme.of(context).primaryTextTheme!.headline6!.color!,
decoration: TextDecoration.none,
),
)
@@ -7,18 +7,18 @@ import 'package:cake_wallet/src/widgets/cake_scrollbar.dart';
class ConfirmSendingAlert extends BaseAlertDialog {
ConfirmSendingAlert({
@required this.alertTitle,
@required this.amount,
@required this.amountValue,
@required this.fiatAmountValue,
@required this.fee,
@required this.feeValue,
@required this.feeFiatAmount,
@required this.outputs,
@required this.leftButtonText,
@required this.rightButtonText,
@required this.actionLeftButton,
@required this.actionRightButton,
required this.alertTitle,
required this.amount,
required this.amountValue,
required this.fiatAmountValue,
required this.fee,
required this.feeValue,
required this.feeFiatAmount,
required this.outputs,
required this.leftButtonText,
required this.rightButtonText,
required this.actionLeftButton,
required this.actionRightButton,
this.alertBarrierDismissible = true});
final String alertTitle;
@@ -70,13 +70,13 @@ class ConfirmSendingAlert extends BaseAlertDialog {
class ConfirmSendingAlertContent extends StatefulWidget {
ConfirmSendingAlertContent({
@required this.amount,
@required this.amountValue,
@required this.fiatAmountValue,
@required this.fee,
@required this.feeValue,
@required this.feeFiatAmount,
@required this.outputs});
required this.amount,
required this.amountValue,
required this.fiatAmountValue,
required this.fee,
required this.feeValue,
required this.feeFiatAmount,
required this.outputs});
final String amount;
final String amountValue;
@@ -100,14 +100,15 @@ class ConfirmSendingAlertContent extends StatefulWidget {
class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent> {
ConfirmSendingAlertContentState({
@required this.amount,
@required this.amountValue,
@required this.fiatAmountValue,
@required this.fee,
@required this.feeValue,
@required this.feeFiatAmount,
@required this.outputs}) {
required this.amount,
required this.amountValue,
required this.fiatAmountValue,
required this.fee,
required this.feeValue,
required this.feeFiatAmount,
required this.outputs})
: itemCount = 0,
recipientTitle = '' {
itemCount = outputs.length;
recipientTitle = itemCount > 1
? S.current.transaction_details_recipient_address
@@ -161,9 +162,9 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
fontWeight: FontWeight.normal,
fontFamily: 'Lato',
color: Theme.of(context)
.primaryTextTheme
.title
.color,
.primaryTextTheme!
.headline6!
.color!,
decoration: TextDecoration.none,
),
),
@@ -177,8 +178,8 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
fontWeight: FontWeight.w600,
fontFamily: 'Lato',
color: Theme.of(context)
.primaryTextTheme
.title
.primaryTextTheme!
.headline6!
.color,
decoration: TextDecoration.none,
),
@@ -210,10 +211,7 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
fontSize: 16,
fontWeight: FontWeight.normal,
fontFamily: 'Lato',
color: Theme.of(context)
.primaryTextTheme
.title
.color,
color: Theme.of(context).primaryTextTheme!.headline6!.color!,
decoration: TextDecoration.none,
),
),
@@ -226,10 +224,7 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
fontSize: 18,
fontWeight: FontWeight.w600,
fontFamily: 'Lato',
color: Theme.of(context)
.primaryTextTheme
.title
.color,
color: Theme.of(context).primaryTextTheme!.headline6!.color!,
decoration: TextDecoration.none,
),
),
@@ -259,9 +254,9 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
fontWeight: FontWeight.normal,
fontFamily: 'Lato',
color: Theme.of(context)
.primaryTextTheme
.title
.color,
.primaryTextTheme!
.headline6!
.color!,
decoration: TextDecoration.none,
),
),
@@ -46,7 +46,7 @@ Future<String> extractAddressFromParsed(
content += S.of(context).choose_address;
address = await showPopUp<String>(
address = await showPopUp<String?>(
context: context,
builder: (BuildContext context) {
@@ -56,9 +56,9 @@ Future<String> extractAddressFromParsed(
alertContent: content,
addresses: parsedAddress.addresses),
onWillPop: () async => false);
});
}) ?? '';
if (address?.isEmpty ?? true) {
if (address.isEmpty) {
return parsedAddress.name;
}
@@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
class PrefixCurrencyIcon extends StatelessWidget {
PrefixCurrencyIcon({
@required this.isSelected,
@required this.title,
required this.isSelected,
required this.title,
});
final bool isSelected;
+64 -64
View File
@@ -6,7 +6,6 @@ import 'package:cake_wallet/src/widgets/keyboard_done_button.dart';
import 'package:cake_wallet/src/widgets/picker.dart';
import 'package:cake_wallet/view_model/send/output.dart';
import 'package:cake_wallet/view_model/settings/settings_view_model.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
@@ -19,7 +18,10 @@ import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
class SendCard extends StatefulWidget {
SendCard({Key key, @required this.output, @required this.sendViewModel}) : super(key: key);
SendCard({
Key? key,
required this.output,
required this.sendViewModel}) : super(key: key);
final Output output;
final SendViewModel sendViewModel;
@@ -33,7 +35,7 @@ class SendCard extends StatefulWidget {
class SendCardState extends State<SendCard>
with AutomaticKeepAliveClientMixin<SendCard> {
SendCardState({@required this.output, @required this.sendViewModel})
SendCardState({required this.output, required this.sendViewModel})
: addressController = TextEditingController(),
cryptoAmountController = TextEditingController(),
fiatAmountController = TextEditingController(),
@@ -70,8 +72,8 @@ class SendCardState extends State<SendCard>
KeyboardActions(
config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context).accentTextTheme.body2
.backgroundColor,
keyboardBarColor: Theme.of(context).accentTextTheme!.bodyText1!
.backgroundColor!,
nextFocus: false,
actions: [
KeyboardActionsItem(
@@ -93,11 +95,11 @@ class SendCardState extends State<SendCard>
bottomLeft: Radius.circular(24),
bottomRight: Radius.circular(24)),
gradient: LinearGradient(colors: [
Theme.of(context).primaryTextTheme.subhead.color,
Theme.of(context).primaryTextTheme!.subtitle1!.color!,
Theme.of(context)
.primaryTextTheme
.subhead
.decorationColor,
.primaryTextTheme!
.subtitle1!
.decorationColor!,
], begin: Alignment.topLeft, end: Alignment.bottomRight),
),
child: Padding(
@@ -126,13 +128,13 @@ class SendCardState extends State<SendCard>
AddressTextFieldOption.addressBook
],
buttonColor: Theme.of(context)
.primaryTextTheme
.display1
.color,
.primaryTextTheme!
.headline4!
.color!,
borderColor: Theme.of(context)
.primaryTextTheme
.headline
.color,
.primaryTextTheme!
.headline5!
.color!,
textStyle: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
@@ -141,9 +143,9 @@ class SendCardState extends State<SendCard>
fontSize: 14,
fontWeight: FontWeight.w500,
color: Theme.of(context)
.primaryTextTheme
.headline
.decorationColor),
.primaryTextTheme!
.headline5!
.decorationColor!),
onPushPasteButton: (context) async {
output.resetParsedAddress();
await output.fetchParsedAddress(context);
@@ -161,9 +163,9 @@ class SendCardState extends State<SendCard>
controller: extractedAddressController,
readOnly: true,
borderColor: Theme.of(context)
.primaryTextTheme
.headline
.color,
.primaryTextTheme!
.headline5!
.color!,
textStyle: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
@@ -193,22 +195,22 @@ class SendCardState extends State<SendCard>
height: 32,
decoration: BoxDecoration(
color: Theme.of(context)
.primaryTextTheme
.display1
.color,
.primaryTextTheme!
.headline4!
.color!,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Center(
child: Padding(
padding: const EdgeInsets.all(6.0),
child: Text( sendViewModel.selectedCryptoCurrency.tag,
child: Text( sendViewModel.selectedCryptoCurrency.tag!,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Theme.of(context)
.primaryTextTheme
.display1
.decorationColor)),
.primaryTextTheme!
.headline4!
.decorationColor!)),
),
),
),
@@ -247,9 +249,9 @@ class SendCardState extends State<SendCard>
color: Colors.white),
placeholderTextStyle: TextStyle(
color: Theme.of(context)
.primaryTextTheme
.headline
.decorationColor,
.primaryTextTheme!
.headline5!
.decorationColor!,
fontWeight: FontWeight.w500,
fontSize: 14),
validator: output.sendAll
@@ -268,9 +270,9 @@ class SendCardState extends State<SendCard>
child: Container(
decoration: BoxDecoration(
color: Theme.of(context)
.primaryTextTheme
.display1
.color,
.primaryTextTheme!
.headline4!
.color!,
borderRadius:
BorderRadius.all(
Radius.circular(6))),
@@ -285,18 +287,18 @@ class SendCardState extends State<SendCard>
FontWeight.bold,
color:
Theme.of(context)
.primaryTextTheme
.display1
.decorationColor))),
.primaryTextTheme!
.headline4!
.decorationColor!))),
))))]),
),
],
)
)),
Divider(height: 1,color: Theme.of(context)
.primaryTextTheme
.headline
.decorationColor),
.primaryTextTheme!
.headline5!
.decorationColor!),
Observer(
builder: (_) => Padding(
padding: EdgeInsets.only(top: 10),
@@ -313,9 +315,9 @@ class SendCardState extends State<SendCard>
fontSize: 12,
fontWeight: FontWeight.w600,
color: Theme.of(context)
.primaryTextTheme
.headline
.decorationColor),
.primaryTextTheme!
.headline5!
.decorationColor!),
)),
Text(
sendViewModel.balance,
@@ -323,9 +325,9 @@ class SendCardState extends State<SendCard>
fontSize: 12,
fontWeight: FontWeight.w600,
color: Theme.of(context)
.primaryTextTheme
.headline
.decorationColor),
.primaryTextTheme!
.headline5!
.decorationColor!),
)
],
),
@@ -353,18 +355,16 @@ class SendCardState extends State<SendCard>
),
hintText: '0.00',
borderColor: Theme.of(context)
.primaryTextTheme
.headline
.color,
.primaryTextTheme!
.headline5!
.color!,
textStyle: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Colors.white),
placeholderTextStyle: TextStyle(
color: Theme.of(context)
.primaryTextTheme
.headline
.decorationColor,
.primaryTextTheme!.headline5!.decorationColor!,
fontWeight: FontWeight.w500,
fontSize: 14),
)),
@@ -375,9 +375,9 @@ class SendCardState extends State<SendCard>
keyboardType: TextInputType.multiline,
maxLines: null,
borderColor: Theme.of(context)
.primaryTextTheme
.headline
.color,
.primaryTextTheme!
.headline5!
.color!,
textStyle: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
@@ -387,9 +387,9 @@ class SendCardState extends State<SendCard>
fontSize: 14,
fontWeight: FontWeight.w500,
color: Theme.of(context)
.primaryTextTheme
.headline
.decorationColor),
.primaryTextTheme!
.headline5!
.decorationColor!),
),
),
Observer(
@@ -411,7 +411,7 @@ class SendCardState extends State<SendCard>
fontSize: 12,
fontWeight:
FontWeight.w500,
//color: Theme.of(context).primaryTextTheme.display2.color,
//color: Theme.of(context).primaryTextTheme!.headline3!.color!,
color: Colors.white)),
Container(
child: Row(
@@ -432,7 +432,7 @@ class SendCardState extends State<SendCard>
fontSize: 12,
fontWeight:
FontWeight.w600,
//color: Theme.of(context).primaryTextTheme.display2.color,
//color: Theme.of(context).primaryTextTheme!.headline3!.color!,
color:
Colors.white)),
Padding(
@@ -450,9 +450,9 @@ class SendCardState extends State<SendCard>
FontWeight.w600,
color: Theme
.of(context)
.primaryTextTheme
.headline
.decorationColor))
.primaryTextTheme!
.headline5!
.decorationColor!))
),
],
),
@@ -552,7 +552,7 @@ class SendCardState extends State<SendCard>
reaction((_) => output.sendAll, (bool all) {
if (all) {
cryptoAmountController.text = S.current.all;
fiatAmountController.text = null;
fiatAmountController.text = '';
}
});