From 044c957152871620eeeb22e01f952e6f1d593c39 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 5 Jun 2023 07:40:56 -0600 Subject: [PATCH] refactor dropdown2 and qr image --- .../restore_options_view.dart | 48 ++++---- .../new_contact_address_entry_form.dart | 50 ++++----- .../exchange_step_views/step_4_view.dart | 2 +- .../exchange_view/trade_details_view.dart | 2 +- .../paynym/dialogs/paynym_details_popup.dart | 2 +- lib/pages/paynym/dialogs/paynym_qr_popup.dart | 2 +- .../subwidgets/desktop_paynym_details.dart | 2 +- .../addresses/address_details_view.dart | 4 +- .../addresses/address_qr_popup.dart | 2 +- .../generate_receiving_uri_qr_code_view.dart | 4 +- lib/pages/receive_view/receive_view.dart | 2 +- .../edit_coin_units_view.dart | 48 ++++---- .../edit_auto_backup_view.dart | 47 ++++---- .../global_settings_view/xpub_view.dart | 2 +- .../wallet_backup_view.dart | 2 +- .../exchange_steps/step_scaffold.dart | 2 +- .../sub_widgets/desktop_fee_dropdown.dart | 104 ++++++++---------- .../sub_widgets/desktop_receive.dart | 2 +- .../wallet_view/sub_widgets/desktop_send.dart | 46 ++++---- .../qr_code_desktop_popup_content.dart | 6 +- .../create_auto_backup.dart | 50 ++++----- 21 files changed, 202 insertions(+), 227 deletions(-) diff --git a/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart b/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart index 05aaeffa4..a177eae3c 100644 --- a/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart +++ b/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart @@ -420,32 +420,32 @@ class _RestoreOptionsViewState extends ConsumerState { } }, isExpanded: true, - icon: SvgPicture.asset( - Assets.svg.chevronDown, - width: 12, - height: 6, - color: Theme.of(context) - .extension()! - .textFieldActiveSearchIconRight, - ), - buttonPadding: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 8, - ), - buttonDecoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, + iconStyleData: IconStyleData( + icon: SvgPicture.asset( + Assets.svg.chevronDown, + width: 12, + height: 6, + color: Theme.of(context) + .extension()! + .textFieldActiveSearchIconRight, ), ), - dropdownDecoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, + dropdownStyleData: DropdownStyleData( + offset: const Offset(0, -10), + elevation: 0, + decoration: BoxDecoration( + color: Theme.of(context) + .extension()! + .textFieldDefaultBG, + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + ), + ), + menuItemStyleData: const MenuItemStyleData( + padding: EdgeInsets.symmetric( + horizontal: 16, + vertical: 8, ), ), ), diff --git a/lib/pages/address_book_views/subviews/new_contact_address_entry_form.dart b/lib/pages/address_book_views/subviews/new_contact_address_entry_form.dart index cf315130c..e17f997fe 100644 --- a/lib/pages/address_book_views/subviews/new_contact_address_entry_form.dart +++ b/lib/pages/address_book_views/subviews/new_contact_address_entry_form.dart @@ -99,9 +99,25 @@ class _NewContactAddressEntryFormState "Select cryptocurrency", style: STextStyles.fieldLabel(context), ), - offset: const Offset(0, -10), + dropdownStyleData: DropdownStyleData( + offset: const Offset(0, -10), + elevation: 0, + decoration: BoxDecoration( + color: Theme.of(context) + .extension()! + .textFieldDefaultBG, + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + ), + ), + menuItemStyleData: const MenuItemStyleData( + padding: EdgeInsets.symmetric( + horizontal: 16, + vertical: 4, + ), + ), isExpanded: true, - dropdownElevation: 0, value: ref.watch(addressEntryDataProvider(widget.id) .select((value) => value.coin)), onChanged: (value) { @@ -109,30 +125,12 @@ class _NewContactAddressEntryFormState ref.read(addressEntryDataProvider(widget.id)).coin = value; } }, - icon: SvgPicture.asset( - Assets.svg.chevronDown, - width: 10, - height: 5, - color: Theme.of(context).extension()!.textDark3, - ), - buttonPadding: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 4, - ), - buttonDecoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, - ), - ), - dropdownDecoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, + iconStyleData: IconStyleData( + icon: SvgPicture.asset( + Assets.svg.chevronDown, + width: 10, + height: 5, + color: Theme.of(context).extension()!.textDark3, ), ), items: [ diff --git a/lib/pages/exchange_view/exchange_step_views/step_4_view.dart b/lib/pages/exchange_view/exchange_step_views/step_4_view.dart index 240d34402..c6caf435a 100644 --- a/lib/pages/exchange_view/exchange_step_views/step_4_view.dart +++ b/lib/pages/exchange_view/exchange_step_views/step_4_view.dart @@ -654,7 +654,7 @@ class _Step4ViewState extends ConsumerState { height: 24, ), Center( - child: QrImage( + child: QrImageView( // TODO: grab coin uri scheme from somewhere // data: "${coin.uriScheme}:$receivingAddress", data: model.trade!.payInAddress, diff --git a/lib/pages/exchange_view/trade_details_view.dart b/lib/pages/exchange_view/trade_details_view.dart index 71c2117ee..f53ddd42e 100644 --- a/lib/pages/exchange_view/trade_details_view.dart +++ b/lib/pages/exchange_view/trade_details_view.dart @@ -768,7 +768,7 @@ class _TradeDetailsViewState extends ConsumerState { child: SizedBox( width: width + 20, height: width + 20, - child: QrImage( + child: QrImageView( data: trade.payInAddress, size: width, backgroundColor: Theme.of(context) diff --git a/lib/pages/paynym/dialogs/paynym_details_popup.dart b/lib/pages/paynym/dialogs/paynym_details_popup.dart index 653ef415b..5f8a70425 100644 --- a/lib/pages/paynym/dialogs/paynym_details_popup.dart +++ b/lib/pages/paynym/dialogs/paynym_details_popup.dart @@ -369,7 +369,7 @@ class _PaynymDetailsPopupState extends ConsumerState { const SizedBox( width: 20, ), - QrImage( + QrImageView( padding: const EdgeInsets.all(0), size: 100, data: widget.accountLite.code, diff --git a/lib/pages/paynym/dialogs/paynym_qr_popup.dart b/lib/pages/paynym/dialogs/paynym_qr_popup.dart index 7b6326d23..9b2121a14 100644 --- a/lib/pages/paynym/dialogs/paynym_qr_popup.dart +++ b/lib/pages/paynym/dialogs/paynym_qr_popup.dart @@ -147,7 +147,7 @@ class PaynymQrPopup extends StatelessWidget { const SizedBox( width: 20, ), - QrImage( + QrImageView( padding: const EdgeInsets.all(0), size: 130, data: paynymAccount.nonSegwitPaymentCode.code, diff --git a/lib/pages/paynym/subwidgets/desktop_paynym_details.dart b/lib/pages/paynym/subwidgets/desktop_paynym_details.dart index ee70223f9..4a8b5fe7d 100644 --- a/lib/pages/paynym/subwidgets/desktop_paynym_details.dart +++ b/lib/pages/paynym/subwidgets/desktop_paynym_details.dart @@ -356,7 +356,7 @@ class _PaynymDetailsPopupState extends ConsumerState { const SizedBox( width: 20, ), - QrImage( + QrImageView( padding: const EdgeInsets.all(0), size: 100, data: widget.accountLite.code, diff --git a/lib/pages/receive_view/addresses/address_details_view.dart b/lib/pages/receive_view/addresses/address_details_view.dart index 1a98c989d..98f50a24c 100644 --- a/lib/pages/receive_view/addresses/address_details_view.dart +++ b/lib/pages/receive_view/addresses/address_details_view.dart @@ -77,7 +77,7 @@ class _AddressDetailsViewState extends ConsumerState { Center( child: RepaintBoundary( key: _qrKey, - child: QrImage( + child: QrImageView( data: AddressUtils.buildUriString( ref.watch(walletsChangeNotifierProvider.select( (value) => @@ -266,7 +266,7 @@ class _AddressDetailsViewState extends ConsumerState { Center( child: RepaintBoundary( key: _qrKey, - child: QrImage( + child: QrImageView( data: AddressUtils.buildUriString( ref.watch(walletsChangeNotifierProvider.select( (value) => diff --git a/lib/pages/receive_view/addresses/address_qr_popup.dart b/lib/pages/receive_view/addresses/address_qr_popup.dart index 65f0e7977..674670f3b 100644 --- a/lib/pages/receive_view/addresses/address_qr_popup.dart +++ b/lib/pages/receive_view/addresses/address_qr_popup.dart @@ -126,7 +126,7 @@ class _AddressQrPopupState extends State { Center( child: RepaintBoundary( key: _qrKey, - child: QrImage( + child: QrImageView( data: AddressUtils.buildUriString( widget.coin, widget.addressString, diff --git a/lib/pages/receive_view/generate_receiving_uri_qr_code_view.dart b/lib/pages/receive_view/generate_receiving_uri_qr_code_view.dart index 46867c7e1..6893e9717 100644 --- a/lib/pages/receive_view/generate_receiving_uri_qr_code_view.dart +++ b/lib/pages/receive_view/generate_receiving_uri_qr_code_view.dart @@ -201,7 +201,7 @@ class _GenerateUriQrCodeViewState extends State { child: SizedBox( width: width + 20, height: width + 20, - child: QrImage( + child: QrImageView( data: uriString, size: width, backgroundColor: @@ -543,7 +543,7 @@ class _GenerateUriQrCodeViewState extends State { child: SizedBox( width: 234, height: 234, - child: QrImage( + child: QrImageView( data: _uriString, size: 220, backgroundColor: Theme.of(context) diff --git a/lib/pages/receive_view/receive_view.dart b/lib/pages/receive_view/receive_view.dart index bd2f6b70e..086b55777 100644 --- a/lib/pages/receive_view/receive_view.dart +++ b/lib/pages/receive_view/receive_view.dart @@ -320,7 +320,7 @@ class _ReceiveViewState extends ConsumerState { child: Center( child: Column( children: [ - QrImage( + QrImageView( data: "${coin.uriScheme}:$receivingAddress", size: MediaQuery.of(context).size.width / 2, foregroundColor: Theme.of(context) diff --git a/lib/pages/settings_views/global_settings_view/advanced_views/manage_coin_units/edit_coin_units_view.dart b/lib/pages/settings_views/global_settings_view/advanced_views/manage_coin_units/edit_coin_units_view.dart index 750f6e78f..bf06ebd2c 100644 --- a/lib/pages/settings_views/global_settings_view/advanced_views/manage_coin_units/edit_coin_units_view.dart +++ b/lib/pages/settings_views/global_settings_view/advanced_views/manage_coin_units/edit_coin_units_view.dart @@ -183,32 +183,32 @@ class _EditCoinUnitsViewState extends ConsumerState { } }, isExpanded: true, - icon: SvgPicture.asset( - Assets.svg.chevronDown, - width: 12, - height: 6, - color: Theme.of(context) - .extension()! - .textFieldActiveSearchIconRight, - ), - buttonPadding: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 8, - ), - buttonDecoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, + iconStyleData: IconStyleData( + icon: SvgPicture.asset( + Assets.svg.chevronDown, + width: 12, + height: 6, + color: Theme.of(context) + .extension()! + .textFieldActiveSearchIconRight, ), ), - dropdownDecoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, + dropdownStyleData: DropdownStyleData( + offset: const Offset(0, -10), + elevation: 0, + decoration: BoxDecoration( + color: Theme.of(context) + .extension()! + .textFieldDefaultBG, + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + ), + ), + menuItemStyleData: const MenuItemStyleData( + padding: EdgeInsets.symmetric( + horizontal: 16, + vertical: 8, ), ), ), diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/edit_auto_backup_view.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/edit_auto_backup_view.dart index 04e96667c..bb6807c02 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/edit_auto_backup_view.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/edit_auto_backup_view.dart @@ -616,9 +616,7 @@ class _EditAutoBackupViewState extends ConsumerState { if (isDesktop) DropdownButtonHideUnderline( child: DropdownButton2( - offset: const Offset(0, -10), isExpanded: true, - dropdownElevation: 0, value: _currentDropDownValue, items: [ ..._dropDownItems.map( @@ -662,30 +660,31 @@ class _EditAutoBackupViewState extends ConsumerState { }); } }, - icon: SvgPicture.asset( - Assets.svg.chevronDown, - width: 10, - height: 5, - color: Theme.of(context).extension()!.textDark3, - ), - buttonPadding: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 8, - ), - buttonDecoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, + iconStyleData: IconStyleData( + icon: SvgPicture.asset( + Assets.svg.chevronDown, + width: 10, + height: 5, + color: + Theme.of(context).extension()!.textDark3, ), ), - dropdownDecoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, + dropdownStyleData: DropdownStyleData( + offset: const Offset(0, -10), + elevation: 0, + decoration: BoxDecoration( + color: Theme.of(context) + .extension()! + .textFieldDefaultBG, + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + ), + ), + menuItemStyleData: const MenuItemStyleData( + padding: EdgeInsets.symmetric( + horizontal: 16, + vertical: 8, ), ), ), diff --git a/lib/pages/settings_views/global_settings_view/xpub_view.dart b/lib/pages/settings_views/global_settings_view/xpub_view.dart index e23131ec8..e4d380ce5 100644 --- a/lib/pages/settings_views/global_settings_view/xpub_view.dart +++ b/lib/pages/settings_views/global_settings_view/xpub_view.dart @@ -243,7 +243,7 @@ class _XPub extends StatelessWidget { builder: (child) => RoundedWhiteContainer( child: child, ), - child: QrImage( + child: QrImageView( data: xpub, size: isDesktop ? 280 : MediaQuery.of(context).size.width / 1.5, foregroundColor: diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart index 82c2e4807..865e233d9 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart @@ -168,7 +168,7 @@ class WalletBackupView extends ConsumerWidget { child: SizedBox( width: width + 20, height: width + 20, - child: QrImage( + child: QrImageView( data: data, size: width, backgroundColor: Theme.of(context) diff --git a/lib/pages_desktop_specific/desktop_exchange/exchange_steps/step_scaffold.dart b/lib/pages_desktop_specific/desktop_exchange/exchange_steps/step_scaffold.dart index 0412541e9..698864b4c 100644 --- a/lib/pages_desktop_specific/desktop_exchange/exchange_steps/step_scaffold.dart +++ b/lib/pages_desktop_specific/desktop_exchange/exchange_steps/step_scaffold.dart @@ -374,7 +374,7 @@ class _StepScaffoldState extends ConsumerState { height: 48, ), Center( - child: QrImage( + child: QrImageView( // TODO: grab coin uri scheme from somewhere // data: "${coin.uriScheme}:$receivingAddress", data: ref.watch(desktopExchangeModelProvider diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_fee_dropdown.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_fee_dropdown.dart index 5155bfd46..5a351b27d 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_fee_dropdown.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_fee_dropdown.dart @@ -190,73 +190,47 @@ class _DesktopFeeDropDownState extends ConsumerState { .select((value) => value.getManager(walletId))); return FutureBuilder( - future: manager.fees, - builder: (context, AsyncSnapshot snapshot) { - if (snapshot.connectionState == ConnectionState.done && - snapshot.hasData) { - feeObject = snapshot.data!; - } - return DropdownButtonHideUnderline( - child: DropdownButton2( - offset: const Offset(0, -10), - isExpanded: true, - dropdownElevation: 0, - value: ref.watch(feeRateTypeStateProvider.state).state, - // selectedItemBuilder: (s) { - // return [ - // ...FeeRateType.values.map( - // (e) => DropdownMenuItem( - // value: e, - // child: FeeDropDownChild( - // feeObject: feeObject, - // feeRateType: e, - // walletId: walletId, - // amount: amount, - // feeFor: feeFor, - // isSelected: true, - // ), - // ), - // ), - // ]; - // }, - items: [ - ...FeeRateType.values.map( - (e) => DropdownMenuItem( - value: e, - child: FeeDropDownChild( - feeObject: feeObject, - feeRateType: e, - walletId: walletId, - feeFor: feeFor, - isSelected: false, - ), + future: manager.fees, + builder: (context, AsyncSnapshot snapshot) { + if (snapshot.connectionState == ConnectionState.done && + snapshot.hasData) { + feeObject = snapshot.data!; + } + return DropdownButtonHideUnderline( + child: DropdownButton2( + isExpanded: true, + value: ref.watch(feeRateTypeStateProvider.state).state, + items: [ + ...FeeRateType.values.map( + (e) => DropdownMenuItem( + value: e, + child: FeeDropDownChild( + feeObject: feeObject, + feeRateType: e, + walletId: walletId, + feeFor: feeFor, + isSelected: false, ), ), - ], - onChanged: (newRateType) { - if (newRateType is FeeRateType) { - ref.read(feeRateTypeStateProvider.state).state = newRateType; - } - }, + ), + ], + onChanged: (newRateType) { + if (newRateType is FeeRateType) { + ref.read(feeRateTypeStateProvider.state).state = newRateType; + } + }, + iconStyleData: IconStyleData( icon: SvgPicture.asset( Assets.svg.chevronDown, width: 12, height: 6, color: Theme.of(context).extension()!.textDark3, ), - buttonPadding: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 8, - ), - buttonDecoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, - ), - ), - dropdownDecoration: BoxDecoration( + ), + dropdownStyleData: DropdownStyleData( + offset: const Offset(0, -10), + elevation: 0, + decoration: BoxDecoration( color: Theme.of(context) .extension()! .textFieldDefaultBG, @@ -265,8 +239,16 @@ class _DesktopFeeDropDownState extends ConsumerState { ), ), ), - ); - }); + menuItemStyleData: const MenuItemStyleData( + padding: EdgeInsets.symmetric( + horizontal: 16, + vertical: 8, + ), + ), + ), + ); + }, + ); } } diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_receive.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_receive.dart index 11e74ce5a..cd6b4b0cb 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_receive.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_receive.dart @@ -219,7 +219,7 @@ class _DesktopReceiveState extends ConsumerState { height: 32, ), Center( - child: QrImage( + child: QrImageView( data: "${coin.uriScheme}:$receivingAddress", size: 200, foregroundColor: diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart index eb6d9b3ec..6d072e959 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart @@ -869,9 +869,7 @@ class _DesktopSendState extends ConsumerState { if (coin == Coin.firo) DropdownButtonHideUnderline( child: DropdownButton2( - offset: const Offset(0, -10), isExpanded: true, - dropdownElevation: 0, value: ref.watch(publicPrivateBalanceStateProvider.state).state, items: [ DropdownMenuItem( @@ -929,30 +927,30 @@ class _DesktopSendState extends ConsumerState { }); } }, - icon: SvgPicture.asset( - Assets.svg.chevronDown, - width: 12, - height: 6, - color: Theme.of(context).extension()!.textDark3, - ), - buttonPadding: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 8, - ), - buttonDecoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, + iconStyleData: IconStyleData( + icon: SvgPicture.asset( + Assets.svg.chevronDown, + width: 12, + height: 6, + color: Theme.of(context).extension()!.textDark3, ), ), - dropdownDecoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, + dropdownStyleData: DropdownStyleData( + offset: const Offset(0, -10), + elevation: 0, + decoration: BoxDecoration( + color: Theme.of(context) + .extension()! + .textFieldDefaultBG, + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + ), + ), + menuItemStyleData: const MenuItemStyleData( + padding: EdgeInsets.symmetric( + horizontal: 16, + vertical: 8, ), ), ), diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/qr_code_desktop_popup_content.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/qr_code_desktop_popup_content.dart index 3e5d23ab1..7e10ce391 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/qr_code_desktop_popup_content.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/qr_code_desktop_popup_content.dart @@ -20,16 +20,16 @@ class QRCodeDesktopPopupContent extends StatelessWidget { maxWidth: 614, child: Column( children: [ - Row( + const Row( mainAxisAlignment: MainAxisAlignment.end, - children: const [ + children: [ DesktopDialogCloseButton(), ], ), const SizedBox( height: 14, ), - QrImage( + QrImageView( data: value, size: 300, foregroundColor: diff --git a/lib/pages_desktop_specific/settings/settings_menu/backup_and_restore/create_auto_backup.dart b/lib/pages_desktop_specific/settings/settings_menu/backup_and_restore/create_auto_backup.dart index 14e35d78c..d9b7c864f 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/backup_and_restore/create_auto_backup.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/backup_and_restore/create_auto_backup.dart @@ -468,9 +468,7 @@ class _CreateAutoBackup extends ConsumerState { child: isDesktop ? DropdownButtonHideUnderline( child: DropdownButton2( - offset: const Offset(0, -10), isExpanded: true, - dropdownElevation: 0, value: _currentDropDownValue, items: [ ..._dropDownItems.map( @@ -515,32 +513,32 @@ class _CreateAutoBackup extends ConsumerState { }); } }, - icon: SvgPicture.asset( - Assets.svg.chevronDown, - width: 10, - height: 5, - color: Theme.of(context) - .extension()! - .textDark3, - ), - buttonPadding: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 8, - ), - buttonDecoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, + iconStyleData: IconStyleData( + icon: SvgPicture.asset( + Assets.svg.chevronDown, + width: 10, + height: 5, + color: Theme.of(context) + .extension()! + .textDark3, ), ), - dropdownDecoration: BoxDecoration( - color: Theme.of(context) - .extension()! - .textFieldDefaultBG, - borderRadius: BorderRadius.circular( - Constants.size.circularBorderRadius, + dropdownStyleData: DropdownStyleData( + offset: const Offset(0, -10), + elevation: 0, + decoration: BoxDecoration( + color: Theme.of(context) + .extension()! + .textFieldDefaultBG, + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + ), + ), + menuItemStyleData: const MenuItemStyleData( + padding: EdgeInsets.symmetric( + horizontal: 16, + vertical: 8, ), ), ),