From 539dec13f5214b391227ba6f159e663b04326174 Mon Sep 17 00:00:00 2001 From: julian Date: Sat, 13 May 2023 21:24:42 -0600 Subject: [PATCH 1/8] clean up and fixed bugs found while porting themes to duo --- lib/main.dart | 3 -- lib/notifications/notification_card.dart | 40 +++++++++++--- .../subviews/coin_select_sheet.dart | 10 ++-- .../subviews/contact_details_view.dart | 10 ++-- .../subviews/contact_popup.dart | 24 +++++---- .../new_contact_address_entry_form.dart | 30 ++++++----- lib/pages/receive_view/receive_view.dart | 2 +- .../global_settings_view.dart | 3 +- .../sub_widgets/restoring_wallet_card.dart | 18 ++++--- .../startup_preferences_view.dart | 34 ++++++------ .../startup_wallet_selection_view.dart | 12 +++-- .../wallet_syncing_options_view.dart | 12 +++-- .../wallet_settings_view.dart | 8 +-- .../wallet_view/sub_widgets/tx_icon.dart | 13 ----- .../subwidgets/desktop_contact_details.dart | 15 +++--- .../desktop_coin_control_use_dialog.dart | 10 ++-- .../desktop_coin_control_view.dart | 10 ++-- .../desktop_all_trades_view.dart | 13 +++-- .../desktop_menu_item.dart | 52 +++++++++++-------- .../my_stack_view/my_stack_view.dart | 12 +++-- .../paynym/desktop_paynym_send_dialog.dart | 10 ++-- .../my_stack_view/wallet_summary_table.dart | 10 ++-- .../delete_password_warning_view.dart | 10 ++-- .../password/desktop_login_view.dart | 11 ++-- .../forgot_password_desktop_view.dart | 12 +++-- .../settings_menu/nodes_settings.dart | 8 +-- .../coins/bitcoin/bitcoin_wallet.dart | 4 +- lib/widgets/address_book_card.dart | 15 +++--- lib/widgets/desktop/living_stack_icon.dart | 12 +++-- pubspec.yaml | 5 -- 30 files changed, 265 insertions(+), 163 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index d9d7d4851..94a624eb9 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -178,9 +178,6 @@ void main() async { } } - //Add Themes directory - TODO - // await StackFileSystem.applicationThemesDirectory(); - monero.onStartup(); wownero.onStartup(); diff --git a/lib/notifications/notification_card.dart b/lib/notifications/notification_card.dart index 4470fd63b..c8f09ec7e 100644 --- a/lib/notifications/notification_card.dart +++ b/lib/notifications/notification_card.dart @@ -1,7 +1,14 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; +import 'package:stackwallet/models/isar/stack_theme.dart'; import 'package:stackwallet/models/notification_model.dart'; +import 'package:stackwallet/themes/coin_icon_provider.dart'; import 'package:stackwallet/themes/stack_colors.dart'; +import 'package:stackwallet/themes/theme_providers.dart'; +import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/format.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/util.dart'; @@ -9,7 +16,7 @@ import 'package:stackwallet/widgets/conditional_parent.dart'; import 'package:stackwallet/widgets/rounded_container.dart'; import 'package:stackwallet/widgets/rounded_white_container.dart'; -class NotificationCard extends StatelessWidget { +class NotificationCard extends ConsumerWidget { const NotificationCard({ Key? key, required this.notification, @@ -25,8 +32,17 @@ class NotificationCard extends StatelessWidget { static const double mobileIconSize = 24; static const double desktopIconSize = 30; + String coinIconPath(ThemeAssets assets, WidgetRef ref) { + try { + final coin = coinFromPrettyName(notification.coinName); + return ref.read(coinIconProvider(coin)); + } catch (_) { + return notification.iconAssetName; + } + } + @override - Widget build(BuildContext context) { + Widget build(BuildContext context, WidgetRef ref) { final isDesktop = Util.isDesktop; return Stack( @@ -41,8 +57,14 @@ class NotificationCard extends StatelessWidget { child: Row( children: [ notification.changeNowId == null - ? SvgPicture.asset( - notification.iconAssetName, + ? SvgPicture.file( + File( + coinIconPath( + ref.watch( + themeProvider.select((value) => value.assets), + ), + ref), + ), width: isDesktop ? desktopIconSize : mobileIconSize, height: isDesktop ? desktopIconSize : mobileIconSize, ) @@ -53,8 +75,14 @@ class NotificationCard extends StatelessWidget { color: Colors.transparent, borderRadius: BorderRadius.circular(24), ), - child: SvgPicture.asset( - notification.iconAssetName, + child: SvgPicture.file( + File( + coinIconPath( + ref.watch( + themeProvider.select((value) => value.assets), + ), + ref), + ), color: Theme.of(context) .extension()! .accentColorDark, diff --git a/lib/pages/address_book_views/subviews/coin_select_sheet.dart b/lib/pages/address_book_views/subviews/coin_select_sheet.dart index a6bf470f8..d343dbdbb 100644 --- a/lib/pages/address_book_views/subviews/coin_select_sheet.dart +++ b/lib/pages/address_book_views/subviews/coin_select_sheet.dart @@ -1,9 +1,11 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; import 'package:stackwallet/providers/global/prefs_provider.dart'; -import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/coin_image_provider.dart'; +import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/text_styles.dart'; @@ -87,8 +89,10 @@ class CoinSelectSheet extends StatelessWidget { padding: const EdgeInsets.all(12), child: Row( children: [ - SvgPicture.asset( - ref.watch(coinImageProvider(coin)), + SvgPicture.file( + File( + ref.watch(coinImageProvider(coin)), + ), height: 20, width: 20, ), diff --git a/lib/pages/address_book_views/subviews/contact_details_view.dart b/lib/pages/address_book_views/subviews/contact_details_view.dart index bd5efd1c5..2128f6e4c 100644 --- a/lib/pages/address_book_views/subviews/contact_details_view.dart +++ b/lib/pages/address_book_views/subviews/contact_details_view.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -13,8 +15,8 @@ import 'package:stackwallet/providers/global/address_book_service_provider.dart' import 'package:stackwallet/providers/providers.dart'; import 'package:stackwallet/providers/ui/address_book_providers/address_entry_data_provider.dart'; import 'package:stackwallet/services/coins/manager.dart'; -import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/coin_icon_provider.dart'; +import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/clipboard_interface.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -334,8 +336,10 @@ class _ContactDetailsViewState extends ConsumerState { padding: const EdgeInsets.all(12), child: Row( children: [ - SvgPicture.asset( - ref.watch(coinIconProvider(e.coin)), + SvgPicture.file( + File( + ref.watch(coinIconProvider(e.coin)), + ), height: 24, ), const SizedBox( diff --git a/lib/pages/address_book_views/subviews/contact_popup.dart b/lib/pages/address_book_views/subviews/contact_popup.dart index b09aba6ef..88cad7f33 100644 --- a/lib/pages/address_book_views/subviews/contact_popup.dart +++ b/lib/pages/address_book_views/subviews/contact_popup.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -9,8 +11,8 @@ import 'package:stackwallet/pages/exchange_view/exchange_step_views/step_2_view. import 'package:stackwallet/pages/send_view/send_view.dart'; import 'package:stackwallet/providers/global/address_book_service_provider.dart'; import 'package:stackwallet/providers/providers.dart'; -import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/coin_icon_provider.dart'; +import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/theme_providers.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/clipboard_interface.dart'; @@ -110,11 +112,13 @@ class ContactPopUp extends ConsumerWidget { ), child: contact.id == "default" ? Center( - child: SvgPicture.asset( - ref.watch( - themeProvider.select( - (value) => - value.assets.stackIcon, + child: SvgPicture.file( + File( + ref.watch( + themeProvider.select( + (value) => value + .assets.stackIcon, + ), ), ), width: 20, @@ -211,9 +215,11 @@ class ContactPopUp extends ConsumerWidget { const SizedBox( height: 2, ), - SvgPicture.asset( - ref.watch( - coinIconProvider(e.coin), + SvgPicture.file( + File( + ref.watch( + coinIconProvider(e.coin), + ), ), height: 24, ), 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 c23a362df..cf315130c 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 @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -7,8 +9,8 @@ import 'package:stackwallet/pages/address_book_views/subviews/coin_select_sheet. import 'package:stackwallet/providers/providers.dart'; // import 'package:stackwallet/providers/global/should_show_lockscreen_on_resume_state_provider.dart'; import 'package:stackwallet/providers/ui/address_book_providers/address_entry_data_provider.dart'; -import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/coin_icon_provider.dart'; +import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/address_utils.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/barcode_scanner_interface.dart'; @@ -141,8 +143,10 @@ class _NewContactAddressEntryFormState padding: const EdgeInsets.symmetric(vertical: 4), child: Row( children: [ - SvgPicture.asset( - ref.watch(coinIconProvider(coin)), + SvgPicture.file( + File( + ref.watch(coinIconProvider(coin)), + ), height: 24, width: 24, ), @@ -211,15 +215,17 @@ class _NewContactAddressEntryFormState ) : Row( children: [ - SvgPicture.asset( - ref.watch( - coinIconProvider( - ref.watch( - addressEntryDataProvider(widget.id) - .select( - (value) => value.coin, - ), - )!, + SvgPicture.file( + File( + ref.watch( + coinIconProvider( + ref.watch( + addressEntryDataProvider(widget.id) + .select( + (value) => value.coin, + ), + )!, + ), ), ), height: 20, diff --git a/lib/pages/receive_view/receive_view.dart b/lib/pages/receive_view/receive_view.dart index 154acead7..bd2f6b70e 100644 --- a/lib/pages/receive_view/receive_view.dart +++ b/lib/pages/receive_view/receive_view.dart @@ -144,7 +144,7 @@ class _ReceiveViewState extends ConsumerState { aspectRatio: 1, child: AppBarIconButton( semanticsLabel: - "Address List Pop-up Button. Opens A Pop-up For Adress List Button.", + "Address List Pop-up Button. Opens A Pop-up For Address List Button.", key: const Key("walletNetworkSettingsAddNewNodeViewButton"), size: 36, shadows: const [], diff --git a/lib/pages/settings_views/global_settings_view/global_settings_view.dart b/lib/pages/settings_views/global_settings_view/global_settings_view.dart index 28e410c99..582ccfde5 100644 --- a/lib/pages/settings_views/global_settings_view/global_settings_view.dart +++ b/lib/pages/settings_views/global_settings_view/global_settings_view.dart @@ -191,7 +191,8 @@ class GlobalSettingsView extends StatelessWidget { title: "Appearance", onPressed: () { Navigator.of(context).pushNamed( - AppearanceSettingsView.routeName); + AppearanceSettingsView.routeName, + ); }, ), if (Platform.isIOS) diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/sub_widgets/restoring_wallet_card.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/sub_widgets/restoring_wallet_card.dart index fbd0e82a6..2db94aff7 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/sub_widgets/restoring_wallet_card.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/sub_widgets/restoring_wallet_card.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; @@ -6,8 +8,8 @@ import 'package:stackwallet/pages/settings_views/global_settings_view/stack_back import 'package:stackwallet/pages/settings_views/global_settings_view/stack_backup_views/sub_widgets/restoring_item_card.dart'; import 'package:stackwallet/providers/stack_restore/stack_restoring_ui_state_provider.dart'; import 'package:stackwallet/route_generator.dart'; -import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/coin_icon_provider.dart'; +import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/enums/stack_restoring_status.dart'; @@ -81,8 +83,10 @@ class _RestoringWalletCardState extends ConsumerState { .extension()! .colorForCoin(coin), child: Center( - child: SvgPicture.asset( - ref.watch(coinIconProvider(coin)), + child: SvgPicture.file( + File( + ref.watch(coinIconProvider(coin)), + ), height: 20, width: 20, ), @@ -222,9 +226,11 @@ class _RestoringWalletCardState extends ConsumerState { .extension()! .colorForCoin(coin), child: Center( - child: SvgPicture.asset( - ref.watch( - coinIconProvider(coin), + child: SvgPicture.file( + File( + ref.watch( + coinIconProvider(coin), + ), ), height: 20, width: 20, diff --git a/lib/pages/settings_views/global_settings_view/startup_preferences/startup_preferences_view.dart b/lib/pages/settings_views/global_settings_view/startup_preferences/startup_preferences_view.dart index f61fd7420..b76b63f46 100644 --- a/lib/pages/settings_views/global_settings_view/startup_preferences/startup_preferences_view.dart +++ b/lib/pages/settings_views/global_settings_view/startup_preferences/startup_preferences_view.dart @@ -1,10 +1,12 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:stackwallet/pages/settings_views/global_settings_view/startup_preferences/startup_wallet_selection_view.dart'; import 'package:stackwallet/providers/providers.dart'; -import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/coin_icon_provider.dart'; +import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/widgets/background.dart'; @@ -236,22 +238,24 @@ class _StartupPreferencesViewState .only(top: 12), child: Row( children: [ - SvgPicture.asset( - ref.watch( - coinIconProvider( - ref - .watch( - walletsChangeNotifierProvider - .select( - (value) => - value.getManager( - ref.watch( - prefsChangeNotifierProvider.select((value) => value.startupWalletId!), + SvgPicture.file( + File( + ref.watch( + coinIconProvider( + ref + .watch( + walletsChangeNotifierProvider + .select( + (value) => + value.getManager( + ref.watch( + prefsChangeNotifierProvider.select((value) => value.startupWalletId!), + ), ), ), - ), - ) - .coin, + ) + .coin, + ), ), ), ), diff --git a/lib/pages/settings_views/global_settings_view/startup_preferences/startup_wallet_selection_view.dart b/lib/pages/settings_views/global_settings_view/startup_preferences/startup_wallet_selection_view.dart index 047627c38..9b8a95909 100644 --- a/lib/pages/settings_views/global_settings_view/startup_preferences/startup_wallet_selection_view.dart +++ b/lib/pages/settings_views/global_settings_view/startup_preferences/startup_wallet_selection_view.dart @@ -1,9 +1,11 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; import 'package:stackwallet/providers/providers.dart'; -import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/coin_icon_provider.dart'; +import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/widgets/background.dart'; @@ -102,9 +104,11 @@ class _StartupWalletSelectionViewState ), child: Padding( padding: const EdgeInsets.all(4), - child: SvgPicture.asset( - ref.watch( - coinIconProvider(manager.coin), + child: SvgPicture.file( + File( + ref.watch( + coinIconProvider(manager.coin), + ), ), width: 20, height: 20, diff --git a/lib/pages/settings_views/global_settings_view/syncing_preferences_views/wallet_syncing_options_view.dart b/lib/pages/settings_views/global_settings_view/syncing_preferences_views/wallet_syncing_options_view.dart index ffa386877..ad0042dc8 100644 --- a/lib/pages/settings_views/global_settings_view/syncing_preferences_views/wallet_syncing_options_view.dart +++ b/lib/pages/settings_views/global_settings_view/syncing_preferences_views/wallet_syncing_options_view.dart @@ -1,9 +1,11 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; import 'package:stackwallet/providers/providers.dart'; -import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/coin_icon_provider.dart'; +import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/enums/sync_type_enum.dart'; @@ -116,9 +118,11 @@ class WalletSyncingOptionsView extends ConsumerWidget { ), child: Padding( padding: const EdgeInsets.all(4), - child: SvgPicture.asset( - ref.watch( - coinIconProvider(manager.coin), + child: SvgPicture.file( + File( + ref.watch( + coinIconProvider(manager.coin), + ), ), width: 20, height: 20, diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_settings_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_settings_view.dart index 8bef9d88b..26c94e4be 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_settings_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_settings_view.dart @@ -33,7 +33,7 @@ import 'package:stackwallet/widgets/rounded_white_container.dart'; import 'package:tuple/tuple.dart'; /// [eventBus] should only be set during testing -class WalletSettingsView extends StatefulWidget { +class WalletSettingsView extends ConsumerStatefulWidget { const WalletSettingsView({ Key? key, required this.walletId, @@ -52,10 +52,10 @@ class WalletSettingsView extends StatefulWidget { final EventBus? eventBus; @override - State createState() => _WalletSettingsViewState(); + ConsumerState createState() => _WalletSettingsViewState(); } -class _WalletSettingsViewState extends State { +class _WalletSettingsViewState extends ConsumerState { late final String walletId; late final Coin coin; late String xpub; @@ -74,7 +74,7 @@ class _WalletSettingsViewState extends State { walletId = widget.walletId; coin = widget.coin; xPubEnabled = - coin != Coin.monero && coin != Coin.wownero && coin != Coin.epicCash; + ref.read(walletsChangeNotifierProvider).getManager(walletId).hasXPub; xpub = ""; _currentSyncStatus = widget.initialSyncStatus; diff --git a/lib/pages/wallet_view/sub_widgets/tx_icon.dart b/lib/pages/wallet_view/sub_widgets/tx_icon.dart index 74c179b47..5b85861c0 100644 --- a/lib/pages/wallet_view/sub_widgets/tx_icon.dart +++ b/lib/pages/wallet_view/sub_widgets/tx_icon.dart @@ -23,19 +23,6 @@ class TxIcon extends ConsumerWidget { static const Size size = Size(32, 32); - // String _getBundleAssetName( - // bool isCancelled, bool isReceived, bool isPending, BuildContext context) { - // if (!isReceived && transaction.subType == TransactionSubType.mint) { - // if (isCancelled) { - // return Assets.svg.anonymizeFailed; - // } - // if (isPending) { - // return Assets.svg.anonymizePending; - // } - // return Assets.svg.anonymize; - // } - // } - String _getAssetName( bool isCancelled, bool isReceived, bool isPending, ThemeAssets assets) { if (!isReceived && transaction.subType == TransactionSubType.mint) { diff --git a/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_contact_details.dart b/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_contact_details.dart index 8b56a9cf5..99fd380bc 100644 --- a/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_contact_details.dart +++ b/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_contact_details.dart @@ -1,7 +1,10 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:isar/isar.dart'; +import 'package:stackwallet/db/isar/main_db.dart'; import 'package:stackwallet/models/contact.dart'; import 'package:stackwallet/models/isar/models/isar_models.dart'; import 'package:stackwallet/pages/address_book_views/subviews/add_new_contact_address_view.dart'; @@ -24,8 +27,6 @@ import 'package:stackwallet/widgets/rounded_white_container.dart'; import 'package:stackwallet/widgets/transaction_card.dart'; import 'package:tuple/tuple.dart'; -import '../../../db/isar/main_db.dart'; - class DesktopContactDetails extends ConsumerStatefulWidget { const DesktopContactDetails({ Key? key, @@ -119,10 +120,12 @@ class _DesktopContactDetailsState extends ConsumerState { ), child: contact.id == "default" ? Center( - child: SvgPicture.asset( - ref.watch( - themeProvider.select( - (value) => value.assets.stackIcon, + child: SvgPicture.file( + File( + ref.watch( + themeProvider.select( + (value) => value.assets.stackIcon, + ), ), ), width: 32, diff --git a/lib/pages_desktop_specific/coin_control/desktop_coin_control_use_dialog.dart b/lib/pages_desktop_specific/coin_control/desktop_coin_control_use_dialog.dart index 7fce59bdb..e14d8bb19 100644 --- a/lib/pages_desktop_specific/coin_control/desktop_coin_control_use_dialog.dart +++ b/lib/pages_desktop_specific/coin_control/desktop_coin_control_use_dialog.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; @@ -6,8 +8,8 @@ import 'package:stackwallet/db/isar/main_db.dart'; import 'package:stackwallet/models/isar/models/blockchain_data/utxo.dart'; import 'package:stackwallet/pages_desktop_specific/coin_control/utxo_row.dart'; import 'package:stackwallet/providers/global/wallets_provider.dart'; -import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/coin_icon_provider.dart'; +import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/constants.dart'; @@ -359,8 +361,10 @@ class _DesktopCoinControlUseDialogState color: Colors.transparent, child: Row( children: [ - SvgPicture.asset( - ref.watch(coinIconProvider(coin)), + SvgPicture.file( + File( + ref.watch(coinIconProvider(coin)), + ), width: 24, height: 24, ), diff --git a/lib/pages_desktop_specific/coin_control/desktop_coin_control_view.dart b/lib/pages_desktop_specific/coin_control/desktop_coin_control_view.dart index af41ad1a8..0685204e4 100644 --- a/lib/pages_desktop_specific/coin_control/desktop_coin_control_view.dart +++ b/lib/pages_desktop_specific/coin_control/desktop_coin_control_view.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; @@ -7,8 +9,8 @@ import 'package:stackwallet/models/isar/models/blockchain_data/utxo.dart'; import 'package:stackwallet/pages_desktop_specific/coin_control/freeze_button.dart'; import 'package:stackwallet/pages_desktop_specific/coin_control/utxo_row.dart'; import 'package:stackwallet/providers/global/wallets_provider.dart'; -import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/coin_icon_provider.dart'; +import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -343,8 +345,10 @@ class _DesktopCoinControlViewState color: Colors.transparent, child: Row( children: [ - SvgPicture.asset( - ref.watch(coinIconProvider(coin)), + SvgPicture.file( + File( + ref.watch(coinIconProvider(coin)), + ), width: 24, height: 24, ), diff --git a/lib/pages_desktop_specific/desktop_exchange/desktop_all_trades_view.dart b/lib/pages_desktop_specific/desktop_exchange/desktop_all_trades_view.dart index 209c3c28c..4fcbb5a82 100644 --- a/lib/pages_desktop_specific/desktop_exchange/desktop_all_trades_view.dart +++ b/lib/pages_desktop_specific/desktop_exchange/desktop_all_trades_view.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:io'; import 'package:decimal/decimal.dart'; import 'package:flutter/material.dart'; @@ -522,10 +523,14 @@ class _DesktopTradeRowCardState extends ConsumerState { borderRadius: BorderRadius.circular(32), ), child: Center( - child: SvgPicture.asset( - _fetchIconAssetForStatus( - trade.status, - ref.watch(themeProvider.select((value) => value.assets)), + child: SvgPicture.file( + File( + _fetchIconAssetForStatus( + trade.status, + ref.watch( + themeProvider.select((value) => value.assets), + ), + ), ), width: 32, height: 32, diff --git a/lib/pages_desktop_specific/desktop_menu_item.dart b/lib/pages_desktop_specific/desktop_menu_item.dart index 4f27a1af0..10c2ad25d 100644 --- a/lib/pages_desktop_specific/desktop_menu_item.dart +++ b/lib/pages_desktop_specific/desktop_menu_item.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; @@ -81,28 +83,36 @@ class DesktopNotificationsIcon extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - return SvgPicture.asset( - ref.watch(notificationsProvider - .select((value) => value.hasUnreadNotifications)) - ? ref.watch( - themeProvider.select( - (value) => value.assets.bellNew, + return ref.watch(notificationsProvider + .select((value) => value.hasUnreadNotifications)) + ? SvgPicture.file( + File( + ref.watch( + themeProvider.select( + (value) => value.assets.bellNew, + ), ), - ) - : Assets.svg.bell, - width: 20, - height: 20, - color: ref.watch(notificationsProvider - .select((value) => value.hasUnreadNotifications)) - ? null - : DesktopMenuItemId.notifications == - ref.watch(currentDesktopMenuItemProvider.state).state - ? Theme.of(context).extension()!.accentColorDark - : Theme.of(context) - .extension()! - .accentColorDark - .withOpacity(0.8), - ); + ), + width: 20, + height: 20, + ) + : SvgPicture.asset( + Assets.svg.bell, + width: 20, + height: 20, + color: ref.watch(notificationsProvider + .select((value) => value.hasUnreadNotifications)) + ? null + : DesktopMenuItemId.notifications == + ref.watch(currentDesktopMenuItemProvider.state).state + ? Theme.of(context) + .extension()! + .accentColorDark + : Theme.of(context) + .extension()! + .accentColorDark + .withOpacity(0.8), + ); } } diff --git a/lib/pages_desktop_specific/my_stack_view/my_stack_view.dart b/lib/pages_desktop_specific/my_stack_view/my_stack_view.dart index 1b327ccea..cf231a30c 100644 --- a/lib/pages_desktop_specific/my_stack_view/my_stack_view.dart +++ b/lib/pages_desktop_specific/my_stack_view/my_stack_view.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -53,10 +55,12 @@ class DesktopMyStackTitle extends ConsumerWidget { SizedBox( width: 32, height: 32, - child: SvgPicture.asset( - ref.watch( - themeProvider.select( - (value) => value.assets.stackIcon, + child: SvgPicture.file( + File( + ref.watch( + themeProvider.select( + (value) => value.assets.stackIcon, + ), ), ), ), diff --git a/lib/pages_desktop_specific/my_stack_view/paynym/desktop_paynym_send_dialog.dart b/lib/pages_desktop_specific/my_stack_view/paynym/desktop_paynym_send_dialog.dart index 8b8712740..8776a3394 100644 --- a/lib/pages_desktop_specific/my_stack_view/paynym/desktop_paynym_send_dialog.dart +++ b/lib/pages_desktop_specific/my_stack_view/paynym/desktop_paynym_send_dialog.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; @@ -10,8 +12,8 @@ import 'package:stackwallet/providers/global/price_provider.dart'; import 'package:stackwallet/providers/global/wallets_provider.dart'; import 'package:stackwallet/providers/wallet/public_private_balance_state_provider.dart'; import 'package:stackwallet/services/coins/firo/firo_wallet.dart'; -import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/coin_icon_provider.dart'; +import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/barcode_scanner_interface.dart'; import 'package:stackwallet/utilities/clipboard_interface.dart'; @@ -81,8 +83,10 @@ class _DesktopPaynymSendDialogState // Theme.of(context).extension()!.textSubtitle4, child: Row( children: [ - SvgPicture.asset( - ref.watch(coinIconProvider(coin)), + SvgPicture.file( + File( + ref.watch(coinIconProvider(coin)), + ), width: 36, height: 36, ), diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_summary_table.dart b/lib/pages_desktop_specific/my_stack_view/wallet_summary_table.dart index b34709680..4a14cb5a5 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_summary_table.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_summary_table.dart @@ -1,10 +1,12 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; import 'package:stackwallet/pages/wallets_view/wallets_overview.dart'; import 'package:stackwallet/providers/providers.dart'; -import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/coin_icon_provider.dart'; +import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/text_styles.dart'; @@ -141,8 +143,10 @@ class _DesktopWalletSummaryRowState flex: 4, child: Row( children: [ - SvgPicture.asset( - ref.watch(coinIconProvider(widget.coin)), + SvgPicture.file( + File( + ref.watch(coinIconProvider(widget.coin)), + ), width: 28, height: 28, ), diff --git a/lib/pages_desktop_specific/password/delete_password_warning_view.dart b/lib/pages_desktop_specific/password/delete_password_warning_view.dart index 3187eebc0..be2b29ab7 100644 --- a/lib/pages_desktop_specific/password/delete_password_warning_view.dart +++ b/lib/pages_desktop_specific/password/delete_password_warning_view.dart @@ -94,10 +94,12 @@ class _ForgotPasswordDesktopViewState child: Column( mainAxisSize: MainAxisSize.min, children: [ - SvgPicture.asset( - ref.watch( - themeProvider.select( - (value) => value.assets.stackIcon, + SvgPicture.file( + File( + ref.watch( + themeProvider.select( + (value) => value.assets.stackIcon, + ), ), ), width: 100, diff --git a/lib/pages_desktop_specific/password/desktop_login_view.dart b/lib/pages_desktop_specific/password/desktop_login_view.dart index fbaec5f29..40bd3919c 100644 --- a/lib/pages_desktop_specific/password/desktop_login_view.dart +++ b/lib/pages_desktop_specific/password/desktop_login_view.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -166,10 +167,12 @@ class _DesktopLoginViewState extends ConsumerState { child: Column( mainAxisSize: MainAxisSize.min, children: [ - SvgPicture.asset( - ref.watch( - themeProvider.select( - (value) => value.assets.stackIcon, + SvgPicture.file( + File( + ref.watch( + themeProvider.select( + (value) => value.assets.stackIcon, + ), ), ), width: 100, diff --git a/lib/pages_desktop_specific/password/forgot_password_desktop_view.dart b/lib/pages_desktop_specific/password/forgot_password_desktop_view.dart index 75b52d09b..381247639 100644 --- a/lib/pages_desktop_specific/password/forgot_password_desktop_view.dart +++ b/lib/pages_desktop_specific/password/forgot_password_desktop_view.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; @@ -47,10 +49,12 @@ class _ForgotPasswordDesktopViewState child: Column( mainAxisSize: MainAxisSize.min, children: [ - SvgPicture.asset( - ref.watch( - themeProvider.select( - (value) => value.assets.stackIcon, + SvgPicture.file( + File( + ref.watch( + themeProvider.select( + (value) => value.assets.stackIcon, + ), ), ), width: 100, diff --git a/lib/pages_desktop_specific/settings/settings_menu/nodes_settings.dart b/lib/pages_desktop_specific/settings/settings_menu/nodes_settings.dart index f2cc6f17b..7c39b6c91 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/nodes_settings.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/nodes_settings.dart @@ -6,8 +6,8 @@ import 'package:flutter_svg/svg.dart'; import 'package:stackwallet/pages/settings_views/global_settings_view/manage_nodes_views/coin_nodes_view.dart'; import 'package:stackwallet/providers/providers.dart'; import 'package:stackwallet/route_generator.dart'; -import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/coin_icon_provider.dart'; +import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -250,8 +250,10 @@ class _NodesSettings extends ConsumerState { children: [ Row( children: [ - SvgPicture.asset( - ref.watch(coinIconProvider(coin)), + SvgPicture.file( + File( + ref.watch(coinIconProvider(coin)), + ), width: 24, height: 24, ), diff --git a/lib/services/coins/bitcoin/bitcoin_wallet.dart b/lib/services/coins/bitcoin/bitcoin_wallet.dart index 5dee0e430..cfa3b73cf 100644 --- a/lib/services/coins/bitcoin/bitcoin_wallet.dart +++ b/lib/services/coins/bitcoin/bitcoin_wallet.dart @@ -53,11 +53,11 @@ import 'package:uuid/uuid.dart'; const int MINIMUM_CONFIRMATIONS = 1; final Amount DUST_LIMIT = Amount( rawValue: BigInt.from(294), - fractionDigits: Coin.particl.decimals, + fractionDigits: Coin.bitcoin.decimals, ); final Amount DUST_LIMIT_P2PKH = Amount( rawValue: BigInt.from(546), - fractionDigits: Coin.particl.decimals, + fractionDigits: Coin.bitcoin.decimals, ); const String GENESIS_HASH_MAINNET = diff --git a/lib/widgets/address_book_card.dart b/lib/widgets/address_book_card.dart index 4fca40e01..de0871ae8 100644 --- a/lib/widgets/address_book_card.dart +++ b/lib/widgets/address_book_card.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; @@ -5,6 +7,7 @@ import 'package:stackwallet/models/contact.dart'; import 'package:stackwallet/pages/address_book_views/subviews/contact_popup.dart'; import 'package:stackwallet/providers/global/address_book_service_provider.dart'; import 'package:stackwallet/themes/stack_colors.dart'; +import 'package:stackwallet/themes/theme_providers.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -14,8 +17,6 @@ import 'package:stackwallet/widgets/conditional_parent.dart'; import 'package:stackwallet/widgets/expandable.dart'; import 'package:stackwallet/widgets/rounded_white_container.dart'; -import '../themes/theme_providers.dart'; - class AddressBookCard extends ConsumerStatefulWidget { const AddressBookCard({ Key? key, @@ -92,10 +93,12 @@ class _AddressBookCardState extends ConsumerState { ), child: contact.id == "default" ? Center( - child: SvgPicture.asset( - ref.watch( - themeProvider.select( - (value) => value.assets.stackIcon, + child: SvgPicture.file( + File( + ref.watch( + themeProvider.select( + (value) => value.assets.stackIcon, + ), ), ), width: 20, diff --git a/lib/widgets/desktop/living_stack_icon.dart b/lib/widgets/desktop/living_stack_icon.dart index a5c17108a..166f30f9c 100644 --- a/lib/widgets/desktop/living_stack_icon.dart +++ b/lib/widgets/desktop/living_stack_icon.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -47,10 +49,12 @@ class _LivingStackIconState extends ConsumerState { child: AnimatedScale( duration: const Duration(milliseconds: 200), scale: _hovering ? 1.2 : 1, - child: SvgPicture.asset( - ref.watch( - themeProvider.select( - (value) => value.assets.stackIcon, + child: SvgPicture.file( + File( + ref.watch( + themeProvider.select( + (value) => value.assets.stackIcon, + ), ), ), ), diff --git a/pubspec.yaml b/pubspec.yaml index 2b8d498b8..08d4bb762 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -343,14 +343,9 @@ flutter: # exchange icons - assets/svg/exchange_icons/ - # theme selectors -# - assets/svg/dark-theme.svg -# - assets/svg/light-mode.svg - # buy - assets/svg/buy/ - # lottie animations # basic - assets/lottie/test2.json From 3e516246316a7e268c61db7f2c223c05b6a417dd Mon Sep 17 00:00:00 2001 From: julian Date: Sat, 13 May 2023 21:32:49 -0600 Subject: [PATCH 2/8] update test --- .../notifications/notification_card_test.dart | 44 +++++-- .../notification_card_test.mocks.dart | 122 ++++++++++++++++++ 2 files changed, 154 insertions(+), 12 deletions(-) create mode 100644 test/notifications/notification_card_test.mocks.dart diff --git a/test/notifications/notification_card_test.dart b/test/notifications/notification_card_test.dart index b362a9650..24c23b35a 100644 --- a/test/notifications/notification_card_test.dart +++ b/test/notifications/notification_card_test.dart @@ -1,17 +1,35 @@ import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; import 'package:stackwallet/models/isar/stack_theme.dart'; import 'package:stackwallet/models/notification_model.dart'; import 'package:stackwallet/notifications/notification_card.dart'; import 'package:stackwallet/themes/stack_colors.dart'; +import 'package:stackwallet/themes/theme_service.dart'; import 'package:stackwallet/utilities/assets.dart'; import '../sample_data/theme_json.dart'; +import 'notification_card_test.mocks.dart'; +@GenerateMocks([ + ThemeService, +]) void main() { testWidgets("test notification card", (widgetTester) async { final key = UniqueKey(); + final mockThemeService = MockThemeService(); + final theme = StackTheme.fromJson( + json: lightThemeJsonMap, + applicationThemesDirectoryPath: "test", + ); + + when(mockThemeService.getTheme(themeId: "light")).thenAnswer( + (_) => theme, + ); + final notificationCard = NotificationCard( key: key, notification: NotificationModel( @@ -27,19 +45,21 @@ void main() { ); await widgetTester.pumpWidget( - MaterialApp( - theme: ThemeData( - extensions: [ - StackColors.fromStackColorTheme( - StackTheme.fromJson( - json: lightThemeJsonMap, - applicationThemesDirectoryPath: "test", + ProviderScope( + overrides: [ + pThemeService.overrideWithValue(mockThemeService), + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + theme, ), - ), - ], - ), - home: Material( - child: notificationCard, + ], + ), + home: Material( + child: notificationCard, + ), ), ), ); diff --git a/test/notifications/notification_card_test.mocks.dart b/test/notifications/notification_card_test.mocks.dart new file mode 100644 index 000000000..7f60b97c9 --- /dev/null +++ b/test/notifications/notification_card_test.mocks.dart @@ -0,0 +1,122 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in stackwallet/test/notifications/notification_card_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i5; +import 'dart:typed_data' as _i6; + +import 'package:mockito/mockito.dart' as _i1; +import 'package:stackwallet/db/isar/main_db.dart' as _i2; +import 'package:stackwallet/models/isar/stack_theme.dart' as _i4; +import 'package:stackwallet/themes/theme_service.dart' as _i3; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB { + _FakeMainDB_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [ThemeService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockThemeService extends _i1.Mock implements _i3.ThemeService { + MockThemeService() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.MainDB get db => (super.noSuchMethod( + Invocation.getter(#db), + returnValue: _FakeMainDB_0( + this, + Invocation.getter(#db), + ), + ) as _i2.MainDB); + @override + List<_i4.StackTheme> get installedThemes => (super.noSuchMethod( + Invocation.getter(#installedThemes), + returnValue: <_i4.StackTheme>[], + ) as List<_i4.StackTheme>); + @override + void init(_i2.MainDB? db) => super.noSuchMethod( + Invocation.method( + #init, + [db], + ), + returnValueForMissingStub: null, + ); + @override + _i5.Future install({required _i6.Uint8List? themeArchiveData}) => + (super.noSuchMethod( + Invocation.method( + #install, + [], + {#themeArchiveData: themeArchiveData}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + _i5.Future remove({required String? themeId}) => (super.noSuchMethod( + Invocation.method( + #remove, + [], + {#themeId: themeId}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + _i5.Future verifyInstalled({required String? themeId}) => + (super.noSuchMethod( + Invocation.method( + #verifyInstalled, + [], + {#themeId: themeId}, + ), + returnValue: _i5.Future.value(false), + ) as _i5.Future); + @override + _i5.Future> fetchThemes() => (super.noSuchMethod( + Invocation.method( + #fetchThemes, + [], + ), + returnValue: _i5.Future>.value( + <_i3.StackThemeMetaData>[]), + ) as _i5.Future>); + @override + _i5.Future<_i6.Uint8List> fetchTheme( + {required _i3.StackThemeMetaData? themeMetaData}) => + (super.noSuchMethod( + Invocation.method( + #fetchTheme, + [], + {#themeMetaData: themeMetaData}, + ), + returnValue: _i5.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), + ) as _i5.Future<_i6.Uint8List>); + @override + _i4.StackTheme? getTheme({required String? themeId}) => + (super.noSuchMethod(Invocation.method( + #getTheme, + [], + {#themeId: themeId}, + )) as _i4.StackTheme?); +} From 127564f2ac8c240f0449f15f3c1411562fbe7e6f Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 15 May 2023 07:48:50 -0600 Subject: [PATCH 3/8] fix: bch remove bad address type --- .../coins/bitcoincash/bitcoincash_wallet.dart | 59 +------------------ lib/utilities/constants.dart | 2 +- lib/utilities/db_version_migration.dart | 31 ++++++++++ 3 files changed, 33 insertions(+), 59 deletions(-) diff --git a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart index 5820dcc59..e5117d08b 100644 --- a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart +++ b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart @@ -71,7 +71,6 @@ String constructDerivePath({ case 0x80: // bch mainnet wif switch (derivePathType) { case DerivePathType.bip44: - case DerivePathType.bip49: coinType = 145; // bch mainnet break; case DerivePathType.bch44: // bitcoin.com wallet specific @@ -95,9 +94,6 @@ String constructDerivePath({ case DerivePathType.bch44: purpose = 44; break; - case DerivePathType.bip49: - purpose = 49; - break; default: throw Exception("DerivePathType $derivePathType not supported"); } @@ -283,10 +279,6 @@ class BitcoinCashWallet extends CoinServiceAPI return DerivePathType.bip44; } - if (decodeBase58[0] == _network.scriptHash) { - // P2SH - return DerivePathType.bip49; - } throw ArgumentError('Invalid version or Network mismatch'); } else { try { @@ -419,15 +411,6 @@ class BitcoinCashWallet extends CoinServiceAPI addrType = isar_models.AddressType.p2pkh; addressString = bitbox.Address.toCashAddress(addressString); break; - case DerivePathType.bip49: - addressString = P2SH( - data: PaymentData( - redeem: P2WPKH(data: data, network: _network).data), - network: _network) - .data - .address!; - addrType = isar_models.AddressType.p2sh; - break; default: throw Exception("DerivePathType $type not supported"); } @@ -518,7 +501,6 @@ class BitcoinCashWallet extends CoinServiceAPI final deriveTypes = [ DerivePathType.bip44, - DerivePathType.bip49, ]; if (coin != Coin.bitcoincashTestnet) { @@ -1397,10 +1379,6 @@ class BitcoinCashWallet extends CoinServiceAPI // P2PKH _generateAddressForChain(0, 0, DerivePathType.bip44), _generateAddressForChain(1, 0, DerivePathType.bip44), - - // P2SH - _generateAddressForChain(0, 0, DerivePathType.bip49), - _generateAddressForChain(1, 0, DerivePathType.bip49), ]); await db.putAddresses(initialAddresses); @@ -1408,7 +1386,7 @@ class BitcoinCashWallet extends CoinServiceAPI Logging.instance.log("_generateNewWalletFinished", level: LogLevel.Info); } - /// Generates a new internal or external chain address for the wallet using a BIP44 or BIP49 derivation path. + /// Generates a new internal or external chain address for the wallet using a BIP44 derivation path. /// [chain] - Use 0 for receiving (external), 1 for change (internal). Should not be any other value! /// [index] - This can be any integer >= 0 Future _generateAddressForChain( @@ -1449,17 +1427,6 @@ class BitcoinCashWallet extends CoinServiceAPI addrType = isar_models.AddressType.p2pkh; address = bitbox.Address.toCashAddress(address); break; - case DerivePathType.bip49: - address = P2SH( - data: PaymentData( - redeem: P2WPKH(data: data, network: _network).data), - network: _network) - .data - .address!; - addrType = isar_models.AddressType.p2sh; - break; - case DerivePathType.bip84: - throw UnsupportedError("bip84 not supported by BCH"); default: throw Exception("DerivePathType $derivePathType not supported"); } @@ -1502,13 +1469,6 @@ class BitcoinCashWallet extends CoinServiceAPI coinType = coin == Coin.bitcoincash ? "0" : "1"; purpose = "44"; break; - case DerivePathType.bip49: - type = isar_models.AddressType.p2sh; - coinType = coin == Coin.bitcoincash ? "145" : "1"; - purpose = "49"; - break; - case DerivePathType.bip84: - throw UnsupportedError("bip84 not supported by BCH"); default: throw Exception("DerivePathType $derivePathType not supported"); } @@ -1537,9 +1497,6 @@ class BitcoinCashWallet extends CoinServiceAPI case DerivePathType.bch44: key = "${walletId}_${chainId}DerivationsBch44P2PKH"; break; - case DerivePathType.bip49: - key = "${walletId}_${chainId}DerivationsP2SH"; - break; default: throw UnsupportedError( "${derivePathType.name} not supported by ${coin.prettyName}"); @@ -2721,20 +2678,6 @@ class BitcoinCashWallet extends CoinServiceAPI redeemScript = null; break; - case DerivePathType.bip49: - final p2wpkh = P2WPKH( - data: PaymentData( - pubkey: Format.stringToUint8List(pubKey), - ), - network: _network, - ).data; - redeemScript = p2wpkh.output; - data = P2SH( - data: PaymentData(redeem: p2wpkh), - network: _network, - ).data; - break; - default: throw Exception("DerivePathType unsupported"); } diff --git a/lib/utilities/constants.dart b/lib/utilities/constants.dart index 92e99849d..7b9178936 100644 --- a/lib/utilities/constants.dart +++ b/lib/utilities/constants.dart @@ -42,7 +42,7 @@ abstract class Constants { // Enable Logger.print statements static const bool disableLogger = false; - static const int currentHiveDbVersion = 8; + static const int currentHiveDbVersion = 9; static const int rescanV1 = 1; diff --git a/lib/utilities/db_version_migration.dart b/lib/utilities/db_version_migration.dart index 24e8b8582..fe8ff3745 100644 --- a/lib/utilities/db_version_migration.dart +++ b/lib/utilities/db_version_migration.dart @@ -290,6 +290,37 @@ class DbVersionMigrator with WalletDB { // try to continue migrating return await migrate(8, secureStore: secureStore); + case 8: + // migrate + await Hive.openBox(DB.boxNameAllWalletsData); + final walletsService = + WalletsService(secureStorageInterface: secureStore); + final walletInfoList = await walletsService.walletNames; + await MainDB.instance.initMainDB(); + for (final walletId in walletInfoList.keys) { + final info = walletInfoList[walletId]!; + if (info.coin == Coin.bitcoincash || + info.coin == Coin.bitcoincashTestnet) { + final ids = await MainDB.instance + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2sh) + .idProperty() + .findAll(); + + await MainDB.instance.isar.writeTxn(() async { + await MainDB.instance.isar.addresses.deleteAll(ids); + }); + } + } + + // update version + await DB.instance.put( + boxName: DB.boxNameDBInfo, key: "hive_data_version", value: 9); + + // try to continue migrating + return await migrate(9, secureStore: secureStore); + default: // finally return return; From 100b3085eb2463498b40c23ebe1ca8385fa3f52c Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 15 May 2023 08:34:30 -0600 Subject: [PATCH 4/8] fix: wallet nav bar swap icon --- .../components/icons/exchange_nav_icon.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/wallet_navigation_bar/components/icons/exchange_nav_icon.dart b/lib/widgets/wallet_navigation_bar/components/icons/exchange_nav_icon.dart index bf635fc90..223703334 100644 --- a/lib/widgets/wallet_navigation_bar/components/icons/exchange_nav_icon.dart +++ b/lib/widgets/wallet_navigation_bar/components/icons/exchange_nav_icon.dart @@ -14,7 +14,7 @@ class ExchangeNavIcon extends ConsumerWidget { File( ref.watch( themeProvider.select( - (value) => value.assets.buy, + (value) => value.assets.exchange, ), ), ), From 7aeab971518ddd25d71a1c9367cbcdff42fc0f78 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 15 May 2023 09:32:40 -0600 Subject: [PATCH 5/8] fix: text color of more options --- .../components/wallet_navigation_bar_item.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/widgets/wallet_navigation_bar/components/wallet_navigation_bar_item.dart b/lib/widgets/wallet_navigation_bar/components/wallet_navigation_bar_item.dart index b4b6914f7..8fed3c4e4 100644 --- a/lib/widgets/wallet_navigation_bar/components/wallet_navigation_bar_item.dart +++ b/lib/widgets/wallet_navigation_bar/components/wallet_navigation_bar_item.dart @@ -68,9 +68,10 @@ class WalletNavigationBarItem extends ConsumerWidget { Text( data.label ?? "", style: STextStyles.buttonSmall(context).copyWith( - color: Theme.of(context) - .extension()! - .bottomNavText), + color: Theme.of(context) + .extension()! + .bottomNavText, + ), ), ], ), @@ -112,7 +113,11 @@ class WalletNavigationBarMoreItem extends ConsumerWidget { child: Text( data.label ?? "", textAlign: TextAlign.center, - style: STextStyles.buttonSmall(context), + style: STextStyles.buttonSmall(context).copyWith( + color: Theme.of(context) + .extension()! + .bottomNavText, + ), ), ), const SizedBox( From 9764ad0d144d334b06cd77672651c4ec3fed39c1 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 15 May 2023 09:40:55 -0600 Subject: [PATCH 6/8] fix: added new color to fix orange theme issue --- lib/models/isar/stack_theme.dart | 12 + lib/models/isar/stack_theme.g.dart | 1017 +++++++++-------- lib/themes/stack_colors.dart | 11 + .../wallet_navigation_bar.dart | 12 +- 4 files changed, 591 insertions(+), 461 deletions(-) diff --git a/lib/models/isar/stack_theme.dart b/lib/models/isar/stack_theme.dart index d91e61cd3..1e46c841b 100644 --- a/lib/models/isar/stack_theme.dart +++ b/lib/models/isar/stack_theme.dart @@ -794,6 +794,15 @@ class StackTheme { Color? _bottomNavIconIcon; final int bottomNavIconIconInt; + // ==== bottomNavIconIcon highlighted ===================================================== + + @ignore + Color get bottomNavIconIconHighlighted => + _bottomNavIconIconHighlighted ??= Color(bottomNavIconIconHighlightedInt); + @ignore + Color? _bottomNavIconIconHighlighted; + final int bottomNavIconIconHighlightedInt; + // ==== topNavIconPrimary ===================================================== @ignore @@ -1556,6 +1565,7 @@ class StackTheme { required this.snackBarTextInfoInt, required this.bottomNavIconBackInt, required this.bottomNavIconIconInt, + required this.bottomNavIconIconHighlightedInt, required this.topNavIconPrimaryInt, required this.topNavIconGreenInt, required this.topNavIconYellowInt, @@ -1795,6 +1805,8 @@ class StackTheme { parseColor(json["colors"]["bottom_nav_icon_back"] as String), bottomNavIconIconInt: parseColor(json["colors"]["bottom_nav_icon_icon"] as String), + bottomNavIconIconHighlightedInt: parseColor( + json["colors"]["bottom_nav_icon_icon_highlighted"] as String), topNavIconPrimaryInt: parseColor(json["colors"]["top_nav_icon_primary"] as String), topNavIconGreenInt: diff --git a/lib/models/isar/stack_theme.g.dart b/lib/models/isar/stack_theme.g.dart index 33646c12e..64d8c3f6c 100644 --- a/lib/models/isar/stack_theme.g.dart +++ b/lib/models/isar/stack_theme.g.dart @@ -73,738 +73,743 @@ const StackThemeSchema = CollectionSchema( name: r'bottomNavIconBackInt', type: IsarType.long, ), - r'bottomNavIconIconInt': PropertySchema( + r'bottomNavIconIconHighlightedInt': PropertySchema( id: 11, + name: r'bottomNavIconIconHighlightedInt', + type: IsarType.long, + ), + r'bottomNavIconIconInt': PropertySchema( + id: 12, name: r'bottomNavIconIconInt', type: IsarType.long, ), r'bottomNavShadowInt': PropertySchema( - id: 12, + id: 13, name: r'bottomNavShadowInt', type: IsarType.long, ), r'bottomNavTextInt': PropertySchema( - id: 13, + id: 14, name: r'bottomNavTextInt', type: IsarType.long, ), r'brightnessString': PropertySchema( - id: 14, + id: 15, name: r'brightnessString', type: IsarType.string, ), r'buttonBackBorderDisabledInt': PropertySchema( - id: 15, + id: 16, name: r'buttonBackBorderDisabledInt', type: IsarType.long, ), r'buttonBackBorderInt': PropertySchema( - id: 16, + id: 17, name: r'buttonBackBorderInt', type: IsarType.long, ), r'buttonBackBorderSecondaryDisabledInt': PropertySchema( - id: 17, + id: 18, name: r'buttonBackBorderSecondaryDisabledInt', type: IsarType.long, ), r'buttonBackBorderSecondaryInt': PropertySchema( - id: 18, + id: 19, name: r'buttonBackBorderSecondaryInt', type: IsarType.long, ), r'buttonBackPrimaryDisabledInt': PropertySchema( - id: 19, + id: 20, name: r'buttonBackPrimaryDisabledInt', type: IsarType.long, ), r'buttonBackPrimaryInt': PropertySchema( - id: 20, + id: 21, name: r'buttonBackPrimaryInt', type: IsarType.long, ), r'buttonBackSecondaryDisabledInt': PropertySchema( - id: 21, + id: 22, name: r'buttonBackSecondaryDisabledInt', type: IsarType.long, ), r'buttonBackSecondaryInt': PropertySchema( - id: 22, + id: 23, name: r'buttonBackSecondaryInt', type: IsarType.long, ), r'buttonTextBorderInt': PropertySchema( - id: 23, + id: 24, name: r'buttonTextBorderInt', type: IsarType.long, ), r'buttonTextBorderlessDisabledInt': PropertySchema( - id: 24, + id: 25, name: r'buttonTextBorderlessDisabledInt', type: IsarType.long, ), r'buttonTextBorderlessInt': PropertySchema( - id: 25, + id: 26, name: r'buttonTextBorderlessInt', type: IsarType.long, ), r'buttonTextDisabledInt': PropertySchema( - id: 26, + id: 27, name: r'buttonTextDisabledInt', type: IsarType.long, ), r'buttonTextPrimaryDisabledInt': PropertySchema( - id: 27, + id: 28, name: r'buttonTextPrimaryDisabledInt', type: IsarType.long, ), r'buttonTextPrimaryInt': PropertySchema( - id: 28, + id: 29, name: r'buttonTextPrimaryInt', type: IsarType.long, ), r'buttonTextSecondaryDisabledInt': PropertySchema( - id: 29, + id: 30, name: r'buttonTextSecondaryDisabledInt', type: IsarType.long, ), r'buttonTextSecondaryInt': PropertySchema( - id: 30, + id: 31, name: r'buttonTextSecondaryInt', type: IsarType.long, ), r'checkboxBGCheckedInt': PropertySchema( - id: 31, + id: 32, name: r'checkboxBGCheckedInt', type: IsarType.long, ), r'checkboxBGDisabledInt': PropertySchema( - id: 32, + id: 33, name: r'checkboxBGDisabledInt', type: IsarType.long, ), r'checkboxBorderEmptyInt': PropertySchema( - id: 33, + id: 34, name: r'checkboxBorderEmptyInt', type: IsarType.long, ), r'checkboxIconCheckedInt': PropertySchema( - id: 34, + id: 35, name: r'checkboxIconCheckedInt', type: IsarType.long, ), r'checkboxIconDisabledInt': PropertySchema( - id: 35, + id: 36, name: r'checkboxIconDisabledInt', type: IsarType.long, ), r'checkboxTextLabelInt': PropertySchema( - id: 36, + id: 37, name: r'checkboxTextLabelInt', type: IsarType.long, ), r'coinColorsJsonString': PropertySchema( - id: 37, + id: 38, name: r'coinColorsJsonString', type: IsarType.string, ), r'currencyListItemBGInt': PropertySchema( - id: 38, + id: 39, name: r'currencyListItemBGInt', type: IsarType.long, ), r'customTextButtonDisabledTextInt': PropertySchema( - id: 39, + id: 40, name: r'customTextButtonDisabledTextInt', type: IsarType.long, ), r'customTextButtonEnabledTextInt': PropertySchema( - id: 40, + id: 41, name: r'customTextButtonEnabledTextInt', type: IsarType.long, ), r'ethTagBGInt': PropertySchema( - id: 41, + id: 42, name: r'ethTagBGInt', type: IsarType.long, ), r'ethTagTextInt': PropertySchema( - id: 42, + id: 43, name: r'ethTagTextInt', type: IsarType.long, ), r'ethWalletTagBGInt': PropertySchema( - id: 43, + id: 44, name: r'ethWalletTagBGInt', type: IsarType.long, ), r'ethWalletTagTextInt': PropertySchema( - id: 44, + id: 45, name: r'ethWalletTagTextInt', type: IsarType.long, ), r'favoriteStarActiveInt': PropertySchema( - id: 45, + id: 46, name: r'favoriteStarActiveInt', type: IsarType.long, ), r'favoriteStarInactiveInt': PropertySchema( - id: 46, + id: 47, name: r'favoriteStarInactiveInt', type: IsarType.long, ), r'gradientBackgroundString': PropertySchema( - id: 47, + id: 48, name: r'gradientBackgroundString', type: IsarType.string, ), r'highlightInt': PropertySchema( - id: 48, + id: 49, name: r'highlightInt', type: IsarType.long, ), r'homeViewButtonBarBoxShadowString': PropertySchema( - id: 49, + id: 50, name: r'homeViewButtonBarBoxShadowString', type: IsarType.string, ), r'infoItemBGInt': PropertySchema( - id: 50, + id: 51, name: r'infoItemBGInt', type: IsarType.long, ), r'infoItemIconsInt': PropertySchema( - id: 51, + id: 52, name: r'infoItemIconsInt', type: IsarType.long, ), r'infoItemLabelInt': PropertySchema( - id: 52, + id: 53, name: r'infoItemLabelInt', type: IsarType.long, ), r'infoItemTextInt': PropertySchema( - id: 53, + id: 54, name: r'infoItemTextInt', type: IsarType.long, ), r'loadingOverlayTextColorInt': PropertySchema( - id: 54, + id: 55, name: r'loadingOverlayTextColorInt', type: IsarType.long, ), r'myStackContactIconBGInt': PropertySchema( - id: 55, + id: 56, name: r'myStackContactIconBGInt', type: IsarType.long, ), r'name': PropertySchema( - id: 56, + id: 57, name: r'name', type: IsarType.string, ), r'numberBackDefaultInt': PropertySchema( - id: 57, + id: 58, name: r'numberBackDefaultInt', type: IsarType.long, ), r'numberTextDefaultInt': PropertySchema( - id: 58, + id: 59, name: r'numberTextDefaultInt', type: IsarType.long, ), r'numpadBackDefaultInt': PropertySchema( - id: 59, + id: 60, name: r'numpadBackDefaultInt', type: IsarType.long, ), r'numpadTextDefaultInt': PropertySchema( - id: 60, + id: 61, name: r'numpadTextDefaultInt', type: IsarType.long, ), r'overlayInt': PropertySchema( - id: 61, + id: 62, name: r'overlayInt', type: IsarType.long, ), r'popupBGInt': PropertySchema( - id: 62, + id: 63, name: r'popupBGInt', type: IsarType.long, ), r'radioButtonBorderDisabledInt': PropertySchema( - id: 63, + id: 64, name: r'radioButtonBorderDisabledInt', type: IsarType.long, ), r'radioButtonBorderEnabledInt': PropertySchema( - id: 64, + id: 65, name: r'radioButtonBorderEnabledInt', type: IsarType.long, ), r'radioButtonIconBorderDisabledInt': PropertySchema( - id: 65, + id: 66, name: r'radioButtonIconBorderDisabledInt', type: IsarType.long, ), r'radioButtonIconBorderInt': PropertySchema( - id: 66, + id: 67, name: r'radioButtonIconBorderInt', type: IsarType.long, ), r'radioButtonIconCircleInt': PropertySchema( - id: 67, + id: 68, name: r'radioButtonIconCircleInt', type: IsarType.long, ), r'radioButtonIconEnabledInt': PropertySchema( - id: 68, + id: 69, name: r'radioButtonIconEnabledInt', type: IsarType.long, ), r'radioButtonLabelDisabledInt': PropertySchema( - id: 69, + id: 70, name: r'radioButtonLabelDisabledInt', type: IsarType.long, ), r'radioButtonLabelEnabledInt': PropertySchema( - id: 70, + id: 71, name: r'radioButtonLabelEnabledInt', type: IsarType.long, ), r'radioButtonTextDisabledInt': PropertySchema( - id: 71, + id: 72, name: r'radioButtonTextDisabledInt', type: IsarType.long, ), r'radioButtonTextEnabledInt': PropertySchema( - id: 72, + id: 73, name: r'radioButtonTextEnabledInt', type: IsarType.long, ), r'rateTypeToggleColorOffInt': PropertySchema( - id: 73, + id: 74, name: r'rateTypeToggleColorOffInt', type: IsarType.long, ), r'rateTypeToggleColorOnInt': PropertySchema( - id: 74, + id: 75, name: r'rateTypeToggleColorOnInt', type: IsarType.long, ), r'rateTypeToggleDesktopColorOffInt': PropertySchema( - id: 75, + id: 76, name: r'rateTypeToggleDesktopColorOffInt', type: IsarType.long, ), r'rateTypeToggleDesktopColorOnInt': PropertySchema( - id: 76, + id: 77, name: r'rateTypeToggleDesktopColorOnInt', type: IsarType.long, ), r'settingsIconBack2Int': PropertySchema( - id: 77, + id: 78, name: r'settingsIconBack2Int', type: IsarType.long, ), r'settingsIconBackInt': PropertySchema( - id: 78, + id: 79, name: r'settingsIconBackInt', type: IsarType.long, ), r'settingsIconElementInt': PropertySchema( - id: 79, + id: 80, name: r'settingsIconElementInt', type: IsarType.long, ), r'settingsIconIconInt': PropertySchema( - id: 80, + id: 81, name: r'settingsIconIconInt', type: IsarType.long, ), r'settingsItem2ActiveBGInt': PropertySchema( - id: 81, + id: 82, name: r'settingsItem2ActiveBGInt', type: IsarType.long, ), r'settingsItem2ActiveSubInt': PropertySchema( - id: 82, + id: 83, name: r'settingsItem2ActiveSubInt', type: IsarType.long, ), r'settingsItem2ActiveTextInt': PropertySchema( - id: 83, + id: 84, name: r'settingsItem2ActiveTextInt', type: IsarType.long, ), r'shadowInt': PropertySchema( - id: 84, + id: 85, name: r'shadowInt', type: IsarType.long, ), r'snackBarBackErrorInt': PropertySchema( - id: 85, + id: 86, name: r'snackBarBackErrorInt', type: IsarType.long, ), r'snackBarBackInfoInt': PropertySchema( - id: 86, + id: 87, name: r'snackBarBackInfoInt', type: IsarType.long, ), r'snackBarBackSuccessInt': PropertySchema( - id: 87, + id: 88, name: r'snackBarBackSuccessInt', type: IsarType.long, ), r'snackBarTextErrorInt': PropertySchema( - id: 88, + id: 89, name: r'snackBarTextErrorInt', type: IsarType.long, ), r'snackBarTextInfoInt': PropertySchema( - id: 89, + id: 90, name: r'snackBarTextInfoInt', type: IsarType.long, ), r'snackBarTextSuccessInt': PropertySchema( - id: 90, + id: 91, name: r'snackBarTextSuccessInt', type: IsarType.long, ), r'splashInt': PropertySchema( - id: 91, + id: 92, name: r'splashInt', type: IsarType.long, ), r'stackWalletBGInt': PropertySchema( - id: 92, + id: 93, name: r'stackWalletBGInt', type: IsarType.long, ), r'stackWalletBottomInt': PropertySchema( - id: 93, + id: 94, name: r'stackWalletBottomInt', type: IsarType.long, ), r'stackWalletMidInt': PropertySchema( - id: 94, + id: 95, name: r'stackWalletMidInt', type: IsarType.long, ), r'standardBoxShadowString': PropertySchema( - id: 95, + id: 96, name: r'standardBoxShadowString', type: IsarType.string, ), r'stepIndicatorBGCheckInt': PropertySchema( - id: 96, + id: 97, name: r'stepIndicatorBGCheckInt', type: IsarType.long, ), r'stepIndicatorBGInactiveInt': PropertySchema( - id: 97, + id: 98, name: r'stepIndicatorBGInactiveInt', type: IsarType.long, ), r'stepIndicatorBGLinesInactiveInt': PropertySchema( - id: 98, + id: 99, name: r'stepIndicatorBGLinesInactiveInt', type: IsarType.long, ), r'stepIndicatorBGLinesInt': PropertySchema( - id: 99, + id: 100, name: r'stepIndicatorBGLinesInt', type: IsarType.long, ), r'stepIndicatorBGNumberInt': PropertySchema( - id: 100, + id: 101, name: r'stepIndicatorBGNumberInt', type: IsarType.long, ), r'stepIndicatorIconInactiveInt': PropertySchema( - id: 101, + id: 102, name: r'stepIndicatorIconInactiveInt', type: IsarType.long, ), r'stepIndicatorIconNumberInt': PropertySchema( - id: 102, + id: 103, name: r'stepIndicatorIconNumberInt', type: IsarType.long, ), r'stepIndicatorIconTextInt': PropertySchema( - id: 103, + id: 104, name: r'stepIndicatorIconTextInt', type: IsarType.long, ), r'switchBGDisabledInt': PropertySchema( - id: 104, + id: 105, name: r'switchBGDisabledInt', type: IsarType.long, ), r'switchBGOffInt': PropertySchema( - id: 105, + id: 106, name: r'switchBGOffInt', type: IsarType.long, ), r'switchBGOnInt': PropertySchema( - id: 106, + id: 107, name: r'switchBGOnInt', type: IsarType.long, ), r'switchCircleDisabledInt': PropertySchema( - id: 107, + id: 108, name: r'switchCircleDisabledInt', type: IsarType.long, ), r'switchCircleOffInt': PropertySchema( - id: 108, + id: 109, name: r'switchCircleOffInt', type: IsarType.long, ), r'switchCircleOnInt': PropertySchema( - id: 109, + id: 110, name: r'switchCircleOnInt', type: IsarType.long, ), r'textConfirmTotalAmountInt': PropertySchema( - id: 110, + id: 111, name: r'textConfirmTotalAmountInt', type: IsarType.long, ), r'textDark2Int': PropertySchema( - id: 111, + id: 112, name: r'textDark2Int', type: IsarType.long, ), r'textDark3Int': PropertySchema( - id: 112, + id: 113, name: r'textDark3Int', type: IsarType.long, ), r'textDarkInt': PropertySchema( - id: 113, + id: 114, name: r'textDarkInt', type: IsarType.long, ), r'textErrorInt': PropertySchema( - id: 114, + id: 115, name: r'textErrorInt', type: IsarType.long, ), r'textFavoriteCardInt': PropertySchema( - id: 115, + id: 116, name: r'textFavoriteCardInt', type: IsarType.long, ), r'textFieldActiveBGInt': PropertySchema( - id: 116, + id: 117, name: r'textFieldActiveBGInt', type: IsarType.long, ), r'textFieldActiveLabelInt': PropertySchema( - id: 117, + id: 118, name: r'textFieldActiveLabelInt', type: IsarType.long, ), r'textFieldActiveSearchIconLeftInt': PropertySchema( - id: 118, + id: 119, name: r'textFieldActiveSearchIconLeftInt', type: IsarType.long, ), r'textFieldActiveSearchIconRightInt': PropertySchema( - id: 119, + id: 120, name: r'textFieldActiveSearchIconRightInt', type: IsarType.long, ), r'textFieldActiveTextInt': PropertySchema( - id: 120, + id: 121, name: r'textFieldActiveTextInt', type: IsarType.long, ), r'textFieldDefaultBGInt': PropertySchema( - id: 121, + id: 122, name: r'textFieldDefaultBGInt', type: IsarType.long, ), r'textFieldDefaultSearchIconLeftInt': PropertySchema( - id: 122, + id: 123, name: r'textFieldDefaultSearchIconLeftInt', type: IsarType.long, ), r'textFieldDefaultSearchIconRightInt': PropertySchema( - id: 123, + id: 124, name: r'textFieldDefaultSearchIconRightInt', type: IsarType.long, ), r'textFieldDefaultTextInt': PropertySchema( - id: 124, + id: 125, name: r'textFieldDefaultTextInt', type: IsarType.long, ), r'textFieldErrorBGInt': PropertySchema( - id: 125, + id: 126, name: r'textFieldErrorBGInt', type: IsarType.long, ), r'textFieldErrorBorderInt': PropertySchema( - id: 126, + id: 127, name: r'textFieldErrorBorderInt', type: IsarType.long, ), r'textFieldErrorLabelInt': PropertySchema( - id: 127, + id: 128, name: r'textFieldErrorLabelInt', type: IsarType.long, ), r'textFieldErrorSearchIconLeftInt': PropertySchema( - id: 128, + id: 129, name: r'textFieldErrorSearchIconLeftInt', type: IsarType.long, ), r'textFieldErrorSearchIconRightInt': PropertySchema( - id: 129, + id: 130, name: r'textFieldErrorSearchIconRightInt', type: IsarType.long, ), r'textFieldErrorTextInt': PropertySchema( - id: 130, + id: 131, name: r'textFieldErrorTextInt', type: IsarType.long, ), r'textFieldSuccessBGInt': PropertySchema( - id: 131, + id: 132, name: r'textFieldSuccessBGInt', type: IsarType.long, ), r'textFieldSuccessBorderInt': PropertySchema( - id: 132, + id: 133, name: r'textFieldSuccessBorderInt', type: IsarType.long, ), r'textFieldSuccessLabelInt': PropertySchema( - id: 133, + id: 134, name: r'textFieldSuccessLabelInt', type: IsarType.long, ), r'textFieldSuccessSearchIconLeftInt': PropertySchema( - id: 134, + id: 135, name: r'textFieldSuccessSearchIconLeftInt', type: IsarType.long, ), r'textFieldSuccessSearchIconRightInt': PropertySchema( - id: 135, + id: 136, name: r'textFieldSuccessSearchIconRightInt', type: IsarType.long, ), r'textFieldSuccessTextInt': PropertySchema( - id: 136, + id: 137, name: r'textFieldSuccessTextInt', type: IsarType.long, ), r'textRestoreInt': PropertySchema( - id: 137, + id: 138, name: r'textRestoreInt', type: IsarType.long, ), r'textSelectedWordTableItemInt': PropertySchema( - id: 138, + id: 139, name: r'textSelectedWordTableItemInt', type: IsarType.long, ), r'textSubtitle1Int': PropertySchema( - id: 139, + id: 140, name: r'textSubtitle1Int', type: IsarType.long, ), r'textSubtitle2Int': PropertySchema( - id: 140, + id: 141, name: r'textSubtitle2Int', type: IsarType.long, ), r'textSubtitle3Int': PropertySchema( - id: 141, + id: 142, name: r'textSubtitle3Int', type: IsarType.long, ), r'textSubtitle4Int': PropertySchema( - id: 142, + id: 143, name: r'textSubtitle4Int', type: IsarType.long, ), r'textSubtitle5Int': PropertySchema( - id: 143, + id: 144, name: r'textSubtitle5Int', type: IsarType.long, ), r'textSubtitle6Int': PropertySchema( - id: 144, + id: 145, name: r'textSubtitle6Int', type: IsarType.long, ), r'textWhiteInt': PropertySchema( - id: 145, + id: 146, name: r'textWhiteInt', type: IsarType.long, ), r'themeId': PropertySchema( - id: 146, + id: 147, name: r'themeId', type: IsarType.string, ), r'tokenSummaryBGInt': PropertySchema( - id: 147, + id: 148, name: r'tokenSummaryBGInt', type: IsarType.long, ), r'tokenSummaryButtonBGInt': PropertySchema( - id: 148, + id: 149, name: r'tokenSummaryButtonBGInt', type: IsarType.long, ), r'tokenSummaryIconInt': PropertySchema( - id: 149, + id: 150, name: r'tokenSummaryIconInt', type: IsarType.long, ), r'tokenSummaryTextPrimaryInt': PropertySchema( - id: 150, + id: 151, name: r'tokenSummaryTextPrimaryInt', type: IsarType.long, ), r'tokenSummaryTextSecondaryInt': PropertySchema( - id: 151, + id: 152, name: r'tokenSummaryTextSecondaryInt', type: IsarType.long, ), r'topNavIconGreenInt': PropertySchema( - id: 152, + id: 153, name: r'topNavIconGreenInt', type: IsarType.long, ), r'topNavIconPrimaryInt': PropertySchema( - id: 153, + id: 154, name: r'topNavIconPrimaryInt', type: IsarType.long, ), r'topNavIconRedInt': PropertySchema( - id: 154, + id: 155, name: r'topNavIconRedInt', type: IsarType.long, ), r'topNavIconYellowInt': PropertySchema( - id: 155, + id: 156, name: r'topNavIconYellowInt', type: IsarType.long, ), r'warningBackgroundInt': PropertySchema( - id: 156, + id: 157, name: r'warningBackgroundInt', type: IsarType.long, ), r'warningForegroundInt': PropertySchema( - id: 157, + id: 158, name: r'warningForegroundInt', type: IsarType.long, ) @@ -888,153 +893,154 @@ void _stackThemeSerialize( writer.writeLong(offsets[8], object.backgroundInt); writer.writeLong(offsets[9], object.bottomNavBackInt); writer.writeLong(offsets[10], object.bottomNavIconBackInt); - writer.writeLong(offsets[11], object.bottomNavIconIconInt); - writer.writeLong(offsets[12], object.bottomNavShadowInt); - writer.writeLong(offsets[13], object.bottomNavTextInt); - writer.writeString(offsets[14], object.brightnessString); - writer.writeLong(offsets[15], object.buttonBackBorderDisabledInt); - writer.writeLong(offsets[16], object.buttonBackBorderInt); - writer.writeLong(offsets[17], object.buttonBackBorderSecondaryDisabledInt); - writer.writeLong(offsets[18], object.buttonBackBorderSecondaryInt); - writer.writeLong(offsets[19], object.buttonBackPrimaryDisabledInt); - writer.writeLong(offsets[20], object.buttonBackPrimaryInt); - writer.writeLong(offsets[21], object.buttonBackSecondaryDisabledInt); - writer.writeLong(offsets[22], object.buttonBackSecondaryInt); - writer.writeLong(offsets[23], object.buttonTextBorderInt); - writer.writeLong(offsets[24], object.buttonTextBorderlessDisabledInt); - writer.writeLong(offsets[25], object.buttonTextBorderlessInt); - writer.writeLong(offsets[26], object.buttonTextDisabledInt); - writer.writeLong(offsets[27], object.buttonTextPrimaryDisabledInt); - writer.writeLong(offsets[28], object.buttonTextPrimaryInt); - writer.writeLong(offsets[29], object.buttonTextSecondaryDisabledInt); - writer.writeLong(offsets[30], object.buttonTextSecondaryInt); - writer.writeLong(offsets[31], object.checkboxBGCheckedInt); - writer.writeLong(offsets[32], object.checkboxBGDisabledInt); - writer.writeLong(offsets[33], object.checkboxBorderEmptyInt); - writer.writeLong(offsets[34], object.checkboxIconCheckedInt); - writer.writeLong(offsets[35], object.checkboxIconDisabledInt); - writer.writeLong(offsets[36], object.checkboxTextLabelInt); - writer.writeString(offsets[37], object.coinColorsJsonString); - writer.writeLong(offsets[38], object.currencyListItemBGInt); - writer.writeLong(offsets[39], object.customTextButtonDisabledTextInt); - writer.writeLong(offsets[40], object.customTextButtonEnabledTextInt); - writer.writeLong(offsets[41], object.ethTagBGInt); - writer.writeLong(offsets[42], object.ethTagTextInt); - writer.writeLong(offsets[43], object.ethWalletTagBGInt); - writer.writeLong(offsets[44], object.ethWalletTagTextInt); - writer.writeLong(offsets[45], object.favoriteStarActiveInt); - writer.writeLong(offsets[46], object.favoriteStarInactiveInt); - writer.writeString(offsets[47], object.gradientBackgroundString); - writer.writeLong(offsets[48], object.highlightInt); - writer.writeString(offsets[49], object.homeViewButtonBarBoxShadowString); - writer.writeLong(offsets[50], object.infoItemBGInt); - writer.writeLong(offsets[51], object.infoItemIconsInt); - writer.writeLong(offsets[52], object.infoItemLabelInt); - writer.writeLong(offsets[53], object.infoItemTextInt); - writer.writeLong(offsets[54], object.loadingOverlayTextColorInt); - writer.writeLong(offsets[55], object.myStackContactIconBGInt); - writer.writeString(offsets[56], object.name); - writer.writeLong(offsets[57], object.numberBackDefaultInt); - writer.writeLong(offsets[58], object.numberTextDefaultInt); - writer.writeLong(offsets[59], object.numpadBackDefaultInt); - writer.writeLong(offsets[60], object.numpadTextDefaultInt); - writer.writeLong(offsets[61], object.overlayInt); - writer.writeLong(offsets[62], object.popupBGInt); - writer.writeLong(offsets[63], object.radioButtonBorderDisabledInt); - writer.writeLong(offsets[64], object.radioButtonBorderEnabledInt); - writer.writeLong(offsets[65], object.radioButtonIconBorderDisabledInt); - writer.writeLong(offsets[66], object.radioButtonIconBorderInt); - writer.writeLong(offsets[67], object.radioButtonIconCircleInt); - writer.writeLong(offsets[68], object.radioButtonIconEnabledInt); - writer.writeLong(offsets[69], object.radioButtonLabelDisabledInt); - writer.writeLong(offsets[70], object.radioButtonLabelEnabledInt); - writer.writeLong(offsets[71], object.radioButtonTextDisabledInt); - writer.writeLong(offsets[72], object.radioButtonTextEnabledInt); - writer.writeLong(offsets[73], object.rateTypeToggleColorOffInt); - writer.writeLong(offsets[74], object.rateTypeToggleColorOnInt); - writer.writeLong(offsets[75], object.rateTypeToggleDesktopColorOffInt); - writer.writeLong(offsets[76], object.rateTypeToggleDesktopColorOnInt); - writer.writeLong(offsets[77], object.settingsIconBack2Int); - writer.writeLong(offsets[78], object.settingsIconBackInt); - writer.writeLong(offsets[79], object.settingsIconElementInt); - writer.writeLong(offsets[80], object.settingsIconIconInt); - writer.writeLong(offsets[81], object.settingsItem2ActiveBGInt); - writer.writeLong(offsets[82], object.settingsItem2ActiveSubInt); - writer.writeLong(offsets[83], object.settingsItem2ActiveTextInt); - writer.writeLong(offsets[84], object.shadowInt); - writer.writeLong(offsets[85], object.snackBarBackErrorInt); - writer.writeLong(offsets[86], object.snackBarBackInfoInt); - writer.writeLong(offsets[87], object.snackBarBackSuccessInt); - writer.writeLong(offsets[88], object.snackBarTextErrorInt); - writer.writeLong(offsets[89], object.snackBarTextInfoInt); - writer.writeLong(offsets[90], object.snackBarTextSuccessInt); - writer.writeLong(offsets[91], object.splashInt); - writer.writeLong(offsets[92], object.stackWalletBGInt); - writer.writeLong(offsets[93], object.stackWalletBottomInt); - writer.writeLong(offsets[94], object.stackWalletMidInt); - writer.writeString(offsets[95], object.standardBoxShadowString); - writer.writeLong(offsets[96], object.stepIndicatorBGCheckInt); - writer.writeLong(offsets[97], object.stepIndicatorBGInactiveInt); - writer.writeLong(offsets[98], object.stepIndicatorBGLinesInactiveInt); - writer.writeLong(offsets[99], object.stepIndicatorBGLinesInt); - writer.writeLong(offsets[100], object.stepIndicatorBGNumberInt); - writer.writeLong(offsets[101], object.stepIndicatorIconInactiveInt); - writer.writeLong(offsets[102], object.stepIndicatorIconNumberInt); - writer.writeLong(offsets[103], object.stepIndicatorIconTextInt); - writer.writeLong(offsets[104], object.switchBGDisabledInt); - writer.writeLong(offsets[105], object.switchBGOffInt); - writer.writeLong(offsets[106], object.switchBGOnInt); - writer.writeLong(offsets[107], object.switchCircleDisabledInt); - writer.writeLong(offsets[108], object.switchCircleOffInt); - writer.writeLong(offsets[109], object.switchCircleOnInt); - writer.writeLong(offsets[110], object.textConfirmTotalAmountInt); - writer.writeLong(offsets[111], object.textDark2Int); - writer.writeLong(offsets[112], object.textDark3Int); - writer.writeLong(offsets[113], object.textDarkInt); - writer.writeLong(offsets[114], object.textErrorInt); - writer.writeLong(offsets[115], object.textFavoriteCardInt); - writer.writeLong(offsets[116], object.textFieldActiveBGInt); - writer.writeLong(offsets[117], object.textFieldActiveLabelInt); - writer.writeLong(offsets[118], object.textFieldActiveSearchIconLeftInt); - writer.writeLong(offsets[119], object.textFieldActiveSearchIconRightInt); - writer.writeLong(offsets[120], object.textFieldActiveTextInt); - writer.writeLong(offsets[121], object.textFieldDefaultBGInt); - writer.writeLong(offsets[122], object.textFieldDefaultSearchIconLeftInt); - writer.writeLong(offsets[123], object.textFieldDefaultSearchIconRightInt); - writer.writeLong(offsets[124], object.textFieldDefaultTextInt); - writer.writeLong(offsets[125], object.textFieldErrorBGInt); - writer.writeLong(offsets[126], object.textFieldErrorBorderInt); - writer.writeLong(offsets[127], object.textFieldErrorLabelInt); - writer.writeLong(offsets[128], object.textFieldErrorSearchIconLeftInt); - writer.writeLong(offsets[129], object.textFieldErrorSearchIconRightInt); - writer.writeLong(offsets[130], object.textFieldErrorTextInt); - writer.writeLong(offsets[131], object.textFieldSuccessBGInt); - writer.writeLong(offsets[132], object.textFieldSuccessBorderInt); - writer.writeLong(offsets[133], object.textFieldSuccessLabelInt); - writer.writeLong(offsets[134], object.textFieldSuccessSearchIconLeftInt); - writer.writeLong(offsets[135], object.textFieldSuccessSearchIconRightInt); - writer.writeLong(offsets[136], object.textFieldSuccessTextInt); - writer.writeLong(offsets[137], object.textRestoreInt); - writer.writeLong(offsets[138], object.textSelectedWordTableItemInt); - writer.writeLong(offsets[139], object.textSubtitle1Int); - writer.writeLong(offsets[140], object.textSubtitle2Int); - writer.writeLong(offsets[141], object.textSubtitle3Int); - writer.writeLong(offsets[142], object.textSubtitle4Int); - writer.writeLong(offsets[143], object.textSubtitle5Int); - writer.writeLong(offsets[144], object.textSubtitle6Int); - writer.writeLong(offsets[145], object.textWhiteInt); - writer.writeString(offsets[146], object.themeId); - writer.writeLong(offsets[147], object.tokenSummaryBGInt); - writer.writeLong(offsets[148], object.tokenSummaryButtonBGInt); - writer.writeLong(offsets[149], object.tokenSummaryIconInt); - writer.writeLong(offsets[150], object.tokenSummaryTextPrimaryInt); - writer.writeLong(offsets[151], object.tokenSummaryTextSecondaryInt); - writer.writeLong(offsets[152], object.topNavIconGreenInt); - writer.writeLong(offsets[153], object.topNavIconPrimaryInt); - writer.writeLong(offsets[154], object.topNavIconRedInt); - writer.writeLong(offsets[155], object.topNavIconYellowInt); - writer.writeLong(offsets[156], object.warningBackgroundInt); - writer.writeLong(offsets[157], object.warningForegroundInt); + writer.writeLong(offsets[11], object.bottomNavIconIconHighlightedInt); + writer.writeLong(offsets[12], object.bottomNavIconIconInt); + writer.writeLong(offsets[13], object.bottomNavShadowInt); + writer.writeLong(offsets[14], object.bottomNavTextInt); + writer.writeString(offsets[15], object.brightnessString); + writer.writeLong(offsets[16], object.buttonBackBorderDisabledInt); + writer.writeLong(offsets[17], object.buttonBackBorderInt); + writer.writeLong(offsets[18], object.buttonBackBorderSecondaryDisabledInt); + writer.writeLong(offsets[19], object.buttonBackBorderSecondaryInt); + writer.writeLong(offsets[20], object.buttonBackPrimaryDisabledInt); + writer.writeLong(offsets[21], object.buttonBackPrimaryInt); + writer.writeLong(offsets[22], object.buttonBackSecondaryDisabledInt); + writer.writeLong(offsets[23], object.buttonBackSecondaryInt); + writer.writeLong(offsets[24], object.buttonTextBorderInt); + writer.writeLong(offsets[25], object.buttonTextBorderlessDisabledInt); + writer.writeLong(offsets[26], object.buttonTextBorderlessInt); + writer.writeLong(offsets[27], object.buttonTextDisabledInt); + writer.writeLong(offsets[28], object.buttonTextPrimaryDisabledInt); + writer.writeLong(offsets[29], object.buttonTextPrimaryInt); + writer.writeLong(offsets[30], object.buttonTextSecondaryDisabledInt); + writer.writeLong(offsets[31], object.buttonTextSecondaryInt); + writer.writeLong(offsets[32], object.checkboxBGCheckedInt); + writer.writeLong(offsets[33], object.checkboxBGDisabledInt); + writer.writeLong(offsets[34], object.checkboxBorderEmptyInt); + writer.writeLong(offsets[35], object.checkboxIconCheckedInt); + writer.writeLong(offsets[36], object.checkboxIconDisabledInt); + writer.writeLong(offsets[37], object.checkboxTextLabelInt); + writer.writeString(offsets[38], object.coinColorsJsonString); + writer.writeLong(offsets[39], object.currencyListItemBGInt); + writer.writeLong(offsets[40], object.customTextButtonDisabledTextInt); + writer.writeLong(offsets[41], object.customTextButtonEnabledTextInt); + writer.writeLong(offsets[42], object.ethTagBGInt); + writer.writeLong(offsets[43], object.ethTagTextInt); + writer.writeLong(offsets[44], object.ethWalletTagBGInt); + writer.writeLong(offsets[45], object.ethWalletTagTextInt); + writer.writeLong(offsets[46], object.favoriteStarActiveInt); + writer.writeLong(offsets[47], object.favoriteStarInactiveInt); + writer.writeString(offsets[48], object.gradientBackgroundString); + writer.writeLong(offsets[49], object.highlightInt); + writer.writeString(offsets[50], object.homeViewButtonBarBoxShadowString); + writer.writeLong(offsets[51], object.infoItemBGInt); + writer.writeLong(offsets[52], object.infoItemIconsInt); + writer.writeLong(offsets[53], object.infoItemLabelInt); + writer.writeLong(offsets[54], object.infoItemTextInt); + writer.writeLong(offsets[55], object.loadingOverlayTextColorInt); + writer.writeLong(offsets[56], object.myStackContactIconBGInt); + writer.writeString(offsets[57], object.name); + writer.writeLong(offsets[58], object.numberBackDefaultInt); + writer.writeLong(offsets[59], object.numberTextDefaultInt); + writer.writeLong(offsets[60], object.numpadBackDefaultInt); + writer.writeLong(offsets[61], object.numpadTextDefaultInt); + writer.writeLong(offsets[62], object.overlayInt); + writer.writeLong(offsets[63], object.popupBGInt); + writer.writeLong(offsets[64], object.radioButtonBorderDisabledInt); + writer.writeLong(offsets[65], object.radioButtonBorderEnabledInt); + writer.writeLong(offsets[66], object.radioButtonIconBorderDisabledInt); + writer.writeLong(offsets[67], object.radioButtonIconBorderInt); + writer.writeLong(offsets[68], object.radioButtonIconCircleInt); + writer.writeLong(offsets[69], object.radioButtonIconEnabledInt); + writer.writeLong(offsets[70], object.radioButtonLabelDisabledInt); + writer.writeLong(offsets[71], object.radioButtonLabelEnabledInt); + writer.writeLong(offsets[72], object.radioButtonTextDisabledInt); + writer.writeLong(offsets[73], object.radioButtonTextEnabledInt); + writer.writeLong(offsets[74], object.rateTypeToggleColorOffInt); + writer.writeLong(offsets[75], object.rateTypeToggleColorOnInt); + writer.writeLong(offsets[76], object.rateTypeToggleDesktopColorOffInt); + writer.writeLong(offsets[77], object.rateTypeToggleDesktopColorOnInt); + writer.writeLong(offsets[78], object.settingsIconBack2Int); + writer.writeLong(offsets[79], object.settingsIconBackInt); + writer.writeLong(offsets[80], object.settingsIconElementInt); + writer.writeLong(offsets[81], object.settingsIconIconInt); + writer.writeLong(offsets[82], object.settingsItem2ActiveBGInt); + writer.writeLong(offsets[83], object.settingsItem2ActiveSubInt); + writer.writeLong(offsets[84], object.settingsItem2ActiveTextInt); + writer.writeLong(offsets[85], object.shadowInt); + writer.writeLong(offsets[86], object.snackBarBackErrorInt); + writer.writeLong(offsets[87], object.snackBarBackInfoInt); + writer.writeLong(offsets[88], object.snackBarBackSuccessInt); + writer.writeLong(offsets[89], object.snackBarTextErrorInt); + writer.writeLong(offsets[90], object.snackBarTextInfoInt); + writer.writeLong(offsets[91], object.snackBarTextSuccessInt); + writer.writeLong(offsets[92], object.splashInt); + writer.writeLong(offsets[93], object.stackWalletBGInt); + writer.writeLong(offsets[94], object.stackWalletBottomInt); + writer.writeLong(offsets[95], object.stackWalletMidInt); + writer.writeString(offsets[96], object.standardBoxShadowString); + writer.writeLong(offsets[97], object.stepIndicatorBGCheckInt); + writer.writeLong(offsets[98], object.stepIndicatorBGInactiveInt); + writer.writeLong(offsets[99], object.stepIndicatorBGLinesInactiveInt); + writer.writeLong(offsets[100], object.stepIndicatorBGLinesInt); + writer.writeLong(offsets[101], object.stepIndicatorBGNumberInt); + writer.writeLong(offsets[102], object.stepIndicatorIconInactiveInt); + writer.writeLong(offsets[103], object.stepIndicatorIconNumberInt); + writer.writeLong(offsets[104], object.stepIndicatorIconTextInt); + writer.writeLong(offsets[105], object.switchBGDisabledInt); + writer.writeLong(offsets[106], object.switchBGOffInt); + writer.writeLong(offsets[107], object.switchBGOnInt); + writer.writeLong(offsets[108], object.switchCircleDisabledInt); + writer.writeLong(offsets[109], object.switchCircleOffInt); + writer.writeLong(offsets[110], object.switchCircleOnInt); + writer.writeLong(offsets[111], object.textConfirmTotalAmountInt); + writer.writeLong(offsets[112], object.textDark2Int); + writer.writeLong(offsets[113], object.textDark3Int); + writer.writeLong(offsets[114], object.textDarkInt); + writer.writeLong(offsets[115], object.textErrorInt); + writer.writeLong(offsets[116], object.textFavoriteCardInt); + writer.writeLong(offsets[117], object.textFieldActiveBGInt); + writer.writeLong(offsets[118], object.textFieldActiveLabelInt); + writer.writeLong(offsets[119], object.textFieldActiveSearchIconLeftInt); + writer.writeLong(offsets[120], object.textFieldActiveSearchIconRightInt); + writer.writeLong(offsets[121], object.textFieldActiveTextInt); + writer.writeLong(offsets[122], object.textFieldDefaultBGInt); + writer.writeLong(offsets[123], object.textFieldDefaultSearchIconLeftInt); + writer.writeLong(offsets[124], object.textFieldDefaultSearchIconRightInt); + writer.writeLong(offsets[125], object.textFieldDefaultTextInt); + writer.writeLong(offsets[126], object.textFieldErrorBGInt); + writer.writeLong(offsets[127], object.textFieldErrorBorderInt); + writer.writeLong(offsets[128], object.textFieldErrorLabelInt); + writer.writeLong(offsets[129], object.textFieldErrorSearchIconLeftInt); + writer.writeLong(offsets[130], object.textFieldErrorSearchIconRightInt); + writer.writeLong(offsets[131], object.textFieldErrorTextInt); + writer.writeLong(offsets[132], object.textFieldSuccessBGInt); + writer.writeLong(offsets[133], object.textFieldSuccessBorderInt); + writer.writeLong(offsets[134], object.textFieldSuccessLabelInt); + writer.writeLong(offsets[135], object.textFieldSuccessSearchIconLeftInt); + writer.writeLong(offsets[136], object.textFieldSuccessSearchIconRightInt); + writer.writeLong(offsets[137], object.textFieldSuccessTextInt); + writer.writeLong(offsets[138], object.textRestoreInt); + writer.writeLong(offsets[139], object.textSelectedWordTableItemInt); + writer.writeLong(offsets[140], object.textSubtitle1Int); + writer.writeLong(offsets[141], object.textSubtitle2Int); + writer.writeLong(offsets[142], object.textSubtitle3Int); + writer.writeLong(offsets[143], object.textSubtitle4Int); + writer.writeLong(offsets[144], object.textSubtitle5Int); + writer.writeLong(offsets[145], object.textSubtitle6Int); + writer.writeLong(offsets[146], object.textWhiteInt); + writer.writeString(offsets[147], object.themeId); + writer.writeLong(offsets[148], object.tokenSummaryBGInt); + writer.writeLong(offsets[149], object.tokenSummaryButtonBGInt); + writer.writeLong(offsets[150], object.tokenSummaryIconInt); + writer.writeLong(offsets[151], object.tokenSummaryTextPrimaryInt); + writer.writeLong(offsets[152], object.tokenSummaryTextSecondaryInt); + writer.writeLong(offsets[153], object.topNavIconGreenInt); + writer.writeLong(offsets[154], object.topNavIconPrimaryInt); + writer.writeLong(offsets[155], object.topNavIconRedInt); + writer.writeLong(offsets[156], object.topNavIconYellowInt); + writer.writeLong(offsets[157], object.warningBackgroundInt); + writer.writeLong(offsets[158], object.warningForegroundInt); } StackTheme _stackThemeDeserialize( @@ -1060,153 +1066,154 @@ StackTheme _stackThemeDeserialize( backgroundInt: reader.readLong(offsets[8]), bottomNavBackInt: reader.readLong(offsets[9]), bottomNavIconBackInt: reader.readLong(offsets[10]), - bottomNavIconIconInt: reader.readLong(offsets[11]), - bottomNavShadowInt: reader.readLong(offsets[12]), - bottomNavTextInt: reader.readLong(offsets[13]), - brightnessString: reader.readString(offsets[14]), - buttonBackBorderDisabledInt: reader.readLong(offsets[15]), - buttonBackBorderInt: reader.readLong(offsets[16]), - buttonBackBorderSecondaryDisabledInt: reader.readLong(offsets[17]), - buttonBackBorderSecondaryInt: reader.readLong(offsets[18]), - buttonBackPrimaryDisabledInt: reader.readLong(offsets[19]), - buttonBackPrimaryInt: reader.readLong(offsets[20]), - buttonBackSecondaryDisabledInt: reader.readLong(offsets[21]), - buttonBackSecondaryInt: reader.readLong(offsets[22]), - buttonTextBorderInt: reader.readLong(offsets[23]), - buttonTextBorderlessDisabledInt: reader.readLong(offsets[24]), - buttonTextBorderlessInt: reader.readLong(offsets[25]), - buttonTextDisabledInt: reader.readLong(offsets[26]), - buttonTextPrimaryDisabledInt: reader.readLong(offsets[27]), - buttonTextPrimaryInt: reader.readLong(offsets[28]), - buttonTextSecondaryDisabledInt: reader.readLong(offsets[29]), - buttonTextSecondaryInt: reader.readLong(offsets[30]), - checkboxBGCheckedInt: reader.readLong(offsets[31]), - checkboxBGDisabledInt: reader.readLong(offsets[32]), - checkboxBorderEmptyInt: reader.readLong(offsets[33]), - checkboxIconCheckedInt: reader.readLong(offsets[34]), - checkboxIconDisabledInt: reader.readLong(offsets[35]), - checkboxTextLabelInt: reader.readLong(offsets[36]), - coinColorsJsonString: reader.readString(offsets[37]), - currencyListItemBGInt: reader.readLong(offsets[38]), - customTextButtonDisabledTextInt: reader.readLong(offsets[39]), - customTextButtonEnabledTextInt: reader.readLong(offsets[40]), - ethTagBGInt: reader.readLong(offsets[41]), - ethTagTextInt: reader.readLong(offsets[42]), - ethWalletTagBGInt: reader.readLong(offsets[43]), - ethWalletTagTextInt: reader.readLong(offsets[44]), - favoriteStarActiveInt: reader.readLong(offsets[45]), - favoriteStarInactiveInt: reader.readLong(offsets[46]), - gradientBackgroundString: reader.readStringOrNull(offsets[47]), - highlightInt: reader.readLong(offsets[48]), - homeViewButtonBarBoxShadowString: reader.readStringOrNull(offsets[49]), - infoItemBGInt: reader.readLong(offsets[50]), - infoItemIconsInt: reader.readLong(offsets[51]), - infoItemLabelInt: reader.readLong(offsets[52]), - infoItemTextInt: reader.readLong(offsets[53]), - loadingOverlayTextColorInt: reader.readLong(offsets[54]), - myStackContactIconBGInt: reader.readLong(offsets[55]), - name: reader.readString(offsets[56]), - numberBackDefaultInt: reader.readLong(offsets[57]), - numberTextDefaultInt: reader.readLong(offsets[58]), - numpadBackDefaultInt: reader.readLong(offsets[59]), - numpadTextDefaultInt: reader.readLong(offsets[60]), - overlayInt: reader.readLong(offsets[61]), - popupBGInt: reader.readLong(offsets[62]), - radioButtonBorderDisabledInt: reader.readLong(offsets[63]), - radioButtonBorderEnabledInt: reader.readLong(offsets[64]), - radioButtonIconBorderDisabledInt: reader.readLong(offsets[65]), - radioButtonIconBorderInt: reader.readLong(offsets[66]), - radioButtonIconCircleInt: reader.readLong(offsets[67]), - radioButtonIconEnabledInt: reader.readLong(offsets[68]), - radioButtonLabelDisabledInt: reader.readLong(offsets[69]), - radioButtonLabelEnabledInt: reader.readLong(offsets[70]), - radioButtonTextDisabledInt: reader.readLong(offsets[71]), - radioButtonTextEnabledInt: reader.readLong(offsets[72]), - rateTypeToggleColorOffInt: reader.readLong(offsets[73]), - rateTypeToggleColorOnInt: reader.readLong(offsets[74]), - rateTypeToggleDesktopColorOffInt: reader.readLong(offsets[75]), - rateTypeToggleDesktopColorOnInt: reader.readLong(offsets[76]), - settingsIconBack2Int: reader.readLong(offsets[77]), - settingsIconBackInt: reader.readLong(offsets[78]), - settingsIconElementInt: reader.readLong(offsets[79]), - settingsIconIconInt: reader.readLong(offsets[80]), - settingsItem2ActiveBGInt: reader.readLong(offsets[81]), - settingsItem2ActiveSubInt: reader.readLong(offsets[82]), - settingsItem2ActiveTextInt: reader.readLong(offsets[83]), - shadowInt: reader.readLong(offsets[84]), - snackBarBackErrorInt: reader.readLong(offsets[85]), - snackBarBackInfoInt: reader.readLong(offsets[86]), - snackBarBackSuccessInt: reader.readLong(offsets[87]), - snackBarTextErrorInt: reader.readLong(offsets[88]), - snackBarTextInfoInt: reader.readLong(offsets[89]), - snackBarTextSuccessInt: reader.readLong(offsets[90]), - splashInt: reader.readLong(offsets[91]), - stackWalletBGInt: reader.readLong(offsets[92]), - stackWalletBottomInt: reader.readLong(offsets[93]), - stackWalletMidInt: reader.readLong(offsets[94]), - standardBoxShadowString: reader.readString(offsets[95]), - stepIndicatorBGCheckInt: reader.readLong(offsets[96]), - stepIndicatorBGInactiveInt: reader.readLong(offsets[97]), - stepIndicatorBGLinesInactiveInt: reader.readLong(offsets[98]), - stepIndicatorBGLinesInt: reader.readLong(offsets[99]), - stepIndicatorBGNumberInt: reader.readLong(offsets[100]), - stepIndicatorIconInactiveInt: reader.readLong(offsets[101]), - stepIndicatorIconNumberInt: reader.readLong(offsets[102]), - stepIndicatorIconTextInt: reader.readLong(offsets[103]), - switchBGDisabledInt: reader.readLong(offsets[104]), - switchBGOffInt: reader.readLong(offsets[105]), - switchBGOnInt: reader.readLong(offsets[106]), - switchCircleDisabledInt: reader.readLong(offsets[107]), - switchCircleOffInt: reader.readLong(offsets[108]), - switchCircleOnInt: reader.readLong(offsets[109]), - textConfirmTotalAmountInt: reader.readLong(offsets[110]), - textDark2Int: reader.readLong(offsets[111]), - textDark3Int: reader.readLong(offsets[112]), - textDarkInt: reader.readLong(offsets[113]), - textErrorInt: reader.readLong(offsets[114]), - textFavoriteCardInt: reader.readLong(offsets[115]), - textFieldActiveBGInt: reader.readLong(offsets[116]), - textFieldActiveLabelInt: reader.readLong(offsets[117]), - textFieldActiveSearchIconLeftInt: reader.readLong(offsets[118]), - textFieldActiveSearchIconRightInt: reader.readLong(offsets[119]), - textFieldActiveTextInt: reader.readLong(offsets[120]), - textFieldDefaultBGInt: reader.readLong(offsets[121]), - textFieldDefaultSearchIconLeftInt: reader.readLong(offsets[122]), - textFieldDefaultSearchIconRightInt: reader.readLong(offsets[123]), - textFieldDefaultTextInt: reader.readLong(offsets[124]), - textFieldErrorBGInt: reader.readLong(offsets[125]), - textFieldErrorBorderInt: reader.readLong(offsets[126]), - textFieldErrorLabelInt: reader.readLong(offsets[127]), - textFieldErrorSearchIconLeftInt: reader.readLong(offsets[128]), - textFieldErrorSearchIconRightInt: reader.readLong(offsets[129]), - textFieldErrorTextInt: reader.readLong(offsets[130]), - textFieldSuccessBGInt: reader.readLong(offsets[131]), - textFieldSuccessBorderInt: reader.readLong(offsets[132]), - textFieldSuccessLabelInt: reader.readLong(offsets[133]), - textFieldSuccessSearchIconLeftInt: reader.readLong(offsets[134]), - textFieldSuccessSearchIconRightInt: reader.readLong(offsets[135]), - textFieldSuccessTextInt: reader.readLong(offsets[136]), - textRestoreInt: reader.readLong(offsets[137]), - textSelectedWordTableItemInt: reader.readLong(offsets[138]), - textSubtitle1Int: reader.readLong(offsets[139]), - textSubtitle2Int: reader.readLong(offsets[140]), - textSubtitle3Int: reader.readLong(offsets[141]), - textSubtitle4Int: reader.readLong(offsets[142]), - textSubtitle5Int: reader.readLong(offsets[143]), - textSubtitle6Int: reader.readLong(offsets[144]), - textWhiteInt: reader.readLong(offsets[145]), - themeId: reader.readString(offsets[146]), - tokenSummaryBGInt: reader.readLong(offsets[147]), - tokenSummaryButtonBGInt: reader.readLong(offsets[148]), - tokenSummaryIconInt: reader.readLong(offsets[149]), - tokenSummaryTextPrimaryInt: reader.readLong(offsets[150]), - tokenSummaryTextSecondaryInt: reader.readLong(offsets[151]), - topNavIconGreenInt: reader.readLong(offsets[152]), - topNavIconPrimaryInt: reader.readLong(offsets[153]), - topNavIconRedInt: reader.readLong(offsets[154]), - topNavIconYellowInt: reader.readLong(offsets[155]), - warningBackgroundInt: reader.readLong(offsets[156]), - warningForegroundInt: reader.readLong(offsets[157]), + bottomNavIconIconHighlightedInt: reader.readLong(offsets[11]), + bottomNavIconIconInt: reader.readLong(offsets[12]), + bottomNavShadowInt: reader.readLong(offsets[13]), + bottomNavTextInt: reader.readLong(offsets[14]), + brightnessString: reader.readString(offsets[15]), + buttonBackBorderDisabledInt: reader.readLong(offsets[16]), + buttonBackBorderInt: reader.readLong(offsets[17]), + buttonBackBorderSecondaryDisabledInt: reader.readLong(offsets[18]), + buttonBackBorderSecondaryInt: reader.readLong(offsets[19]), + buttonBackPrimaryDisabledInt: reader.readLong(offsets[20]), + buttonBackPrimaryInt: reader.readLong(offsets[21]), + buttonBackSecondaryDisabledInt: reader.readLong(offsets[22]), + buttonBackSecondaryInt: reader.readLong(offsets[23]), + buttonTextBorderInt: reader.readLong(offsets[24]), + buttonTextBorderlessDisabledInt: reader.readLong(offsets[25]), + buttonTextBorderlessInt: reader.readLong(offsets[26]), + buttonTextDisabledInt: reader.readLong(offsets[27]), + buttonTextPrimaryDisabledInt: reader.readLong(offsets[28]), + buttonTextPrimaryInt: reader.readLong(offsets[29]), + buttonTextSecondaryDisabledInt: reader.readLong(offsets[30]), + buttonTextSecondaryInt: reader.readLong(offsets[31]), + checkboxBGCheckedInt: reader.readLong(offsets[32]), + checkboxBGDisabledInt: reader.readLong(offsets[33]), + checkboxBorderEmptyInt: reader.readLong(offsets[34]), + checkboxIconCheckedInt: reader.readLong(offsets[35]), + checkboxIconDisabledInt: reader.readLong(offsets[36]), + checkboxTextLabelInt: reader.readLong(offsets[37]), + coinColorsJsonString: reader.readString(offsets[38]), + currencyListItemBGInt: reader.readLong(offsets[39]), + customTextButtonDisabledTextInt: reader.readLong(offsets[40]), + customTextButtonEnabledTextInt: reader.readLong(offsets[41]), + ethTagBGInt: reader.readLong(offsets[42]), + ethTagTextInt: reader.readLong(offsets[43]), + ethWalletTagBGInt: reader.readLong(offsets[44]), + ethWalletTagTextInt: reader.readLong(offsets[45]), + favoriteStarActiveInt: reader.readLong(offsets[46]), + favoriteStarInactiveInt: reader.readLong(offsets[47]), + gradientBackgroundString: reader.readStringOrNull(offsets[48]), + highlightInt: reader.readLong(offsets[49]), + homeViewButtonBarBoxShadowString: reader.readStringOrNull(offsets[50]), + infoItemBGInt: reader.readLong(offsets[51]), + infoItemIconsInt: reader.readLong(offsets[52]), + infoItemLabelInt: reader.readLong(offsets[53]), + infoItemTextInt: reader.readLong(offsets[54]), + loadingOverlayTextColorInt: reader.readLong(offsets[55]), + myStackContactIconBGInt: reader.readLong(offsets[56]), + name: reader.readString(offsets[57]), + numberBackDefaultInt: reader.readLong(offsets[58]), + numberTextDefaultInt: reader.readLong(offsets[59]), + numpadBackDefaultInt: reader.readLong(offsets[60]), + numpadTextDefaultInt: reader.readLong(offsets[61]), + overlayInt: reader.readLong(offsets[62]), + popupBGInt: reader.readLong(offsets[63]), + radioButtonBorderDisabledInt: reader.readLong(offsets[64]), + radioButtonBorderEnabledInt: reader.readLong(offsets[65]), + radioButtonIconBorderDisabledInt: reader.readLong(offsets[66]), + radioButtonIconBorderInt: reader.readLong(offsets[67]), + radioButtonIconCircleInt: reader.readLong(offsets[68]), + radioButtonIconEnabledInt: reader.readLong(offsets[69]), + radioButtonLabelDisabledInt: reader.readLong(offsets[70]), + radioButtonLabelEnabledInt: reader.readLong(offsets[71]), + radioButtonTextDisabledInt: reader.readLong(offsets[72]), + radioButtonTextEnabledInt: reader.readLong(offsets[73]), + rateTypeToggleColorOffInt: reader.readLong(offsets[74]), + rateTypeToggleColorOnInt: reader.readLong(offsets[75]), + rateTypeToggleDesktopColorOffInt: reader.readLong(offsets[76]), + rateTypeToggleDesktopColorOnInt: reader.readLong(offsets[77]), + settingsIconBack2Int: reader.readLong(offsets[78]), + settingsIconBackInt: reader.readLong(offsets[79]), + settingsIconElementInt: reader.readLong(offsets[80]), + settingsIconIconInt: reader.readLong(offsets[81]), + settingsItem2ActiveBGInt: reader.readLong(offsets[82]), + settingsItem2ActiveSubInt: reader.readLong(offsets[83]), + settingsItem2ActiveTextInt: reader.readLong(offsets[84]), + shadowInt: reader.readLong(offsets[85]), + snackBarBackErrorInt: reader.readLong(offsets[86]), + snackBarBackInfoInt: reader.readLong(offsets[87]), + snackBarBackSuccessInt: reader.readLong(offsets[88]), + snackBarTextErrorInt: reader.readLong(offsets[89]), + snackBarTextInfoInt: reader.readLong(offsets[90]), + snackBarTextSuccessInt: reader.readLong(offsets[91]), + splashInt: reader.readLong(offsets[92]), + stackWalletBGInt: reader.readLong(offsets[93]), + stackWalletBottomInt: reader.readLong(offsets[94]), + stackWalletMidInt: reader.readLong(offsets[95]), + standardBoxShadowString: reader.readString(offsets[96]), + stepIndicatorBGCheckInt: reader.readLong(offsets[97]), + stepIndicatorBGInactiveInt: reader.readLong(offsets[98]), + stepIndicatorBGLinesInactiveInt: reader.readLong(offsets[99]), + stepIndicatorBGLinesInt: reader.readLong(offsets[100]), + stepIndicatorBGNumberInt: reader.readLong(offsets[101]), + stepIndicatorIconInactiveInt: reader.readLong(offsets[102]), + stepIndicatorIconNumberInt: reader.readLong(offsets[103]), + stepIndicatorIconTextInt: reader.readLong(offsets[104]), + switchBGDisabledInt: reader.readLong(offsets[105]), + switchBGOffInt: reader.readLong(offsets[106]), + switchBGOnInt: reader.readLong(offsets[107]), + switchCircleDisabledInt: reader.readLong(offsets[108]), + switchCircleOffInt: reader.readLong(offsets[109]), + switchCircleOnInt: reader.readLong(offsets[110]), + textConfirmTotalAmountInt: reader.readLong(offsets[111]), + textDark2Int: reader.readLong(offsets[112]), + textDark3Int: reader.readLong(offsets[113]), + textDarkInt: reader.readLong(offsets[114]), + textErrorInt: reader.readLong(offsets[115]), + textFavoriteCardInt: reader.readLong(offsets[116]), + textFieldActiveBGInt: reader.readLong(offsets[117]), + textFieldActiveLabelInt: reader.readLong(offsets[118]), + textFieldActiveSearchIconLeftInt: reader.readLong(offsets[119]), + textFieldActiveSearchIconRightInt: reader.readLong(offsets[120]), + textFieldActiveTextInt: reader.readLong(offsets[121]), + textFieldDefaultBGInt: reader.readLong(offsets[122]), + textFieldDefaultSearchIconLeftInt: reader.readLong(offsets[123]), + textFieldDefaultSearchIconRightInt: reader.readLong(offsets[124]), + textFieldDefaultTextInt: reader.readLong(offsets[125]), + textFieldErrorBGInt: reader.readLong(offsets[126]), + textFieldErrorBorderInt: reader.readLong(offsets[127]), + textFieldErrorLabelInt: reader.readLong(offsets[128]), + textFieldErrorSearchIconLeftInt: reader.readLong(offsets[129]), + textFieldErrorSearchIconRightInt: reader.readLong(offsets[130]), + textFieldErrorTextInt: reader.readLong(offsets[131]), + textFieldSuccessBGInt: reader.readLong(offsets[132]), + textFieldSuccessBorderInt: reader.readLong(offsets[133]), + textFieldSuccessLabelInt: reader.readLong(offsets[134]), + textFieldSuccessSearchIconLeftInt: reader.readLong(offsets[135]), + textFieldSuccessSearchIconRightInt: reader.readLong(offsets[136]), + textFieldSuccessTextInt: reader.readLong(offsets[137]), + textRestoreInt: reader.readLong(offsets[138]), + textSelectedWordTableItemInt: reader.readLong(offsets[139]), + textSubtitle1Int: reader.readLong(offsets[140]), + textSubtitle2Int: reader.readLong(offsets[141]), + textSubtitle3Int: reader.readLong(offsets[142]), + textSubtitle4Int: reader.readLong(offsets[143]), + textSubtitle5Int: reader.readLong(offsets[144]), + textSubtitle6Int: reader.readLong(offsets[145]), + textWhiteInt: reader.readLong(offsets[146]), + themeId: reader.readString(offsets[147]), + tokenSummaryBGInt: reader.readLong(offsets[148]), + tokenSummaryButtonBGInt: reader.readLong(offsets[149]), + tokenSummaryIconInt: reader.readLong(offsets[150]), + tokenSummaryTextPrimaryInt: reader.readLong(offsets[151]), + tokenSummaryTextSecondaryInt: reader.readLong(offsets[152]), + topNavIconGreenInt: reader.readLong(offsets[153]), + topNavIconPrimaryInt: reader.readLong(offsets[154]), + topNavIconRedInt: reader.readLong(offsets[155]), + topNavIconYellowInt: reader.readLong(offsets[156]), + warningBackgroundInt: reader.readLong(offsets[157]), + warningForegroundInt: reader.readLong(offsets[158]), ); object.id = id; return object; @@ -1253,9 +1260,9 @@ P _stackThemeDeserializeProp

( case 13: return (reader.readLong(offset)) as P; case 14: - return (reader.readString(offset)) as P; - case 15: return (reader.readLong(offset)) as P; + case 15: + return (reader.readString(offset)) as P; case 16: return (reader.readLong(offset)) as P; case 17: @@ -1299,9 +1306,9 @@ P _stackThemeDeserializeProp

( case 36: return (reader.readLong(offset)) as P; case 37: - return (reader.readString(offset)) as P; - case 38: return (reader.readLong(offset)) as P; + case 38: + return (reader.readString(offset)) as P; case 39: return (reader.readLong(offset)) as P; case 40: @@ -1319,13 +1326,13 @@ P _stackThemeDeserializeProp

( case 46: return (reader.readLong(offset)) as P; case 47: - return (reader.readStringOrNull(offset)) as P; + return (reader.readLong(offset)) as P; case 48: - return (reader.readLong(offset)) as P; - case 49: return (reader.readStringOrNull(offset)) as P; - case 50: + case 49: return (reader.readLong(offset)) as P; + case 50: + return (reader.readStringOrNull(offset)) as P; case 51: return (reader.readLong(offset)) as P; case 52: @@ -1337,9 +1344,9 @@ P _stackThemeDeserializeProp

( case 55: return (reader.readLong(offset)) as P; case 56: - return (reader.readString(offset)) as P; - case 57: return (reader.readLong(offset)) as P; + case 57: + return (reader.readString(offset)) as P; case 58: return (reader.readLong(offset)) as P; case 59: @@ -1415,9 +1422,9 @@ P _stackThemeDeserializeProp

( case 94: return (reader.readLong(offset)) as P; case 95: - return (reader.readString(offset)) as P; - case 96: return (reader.readLong(offset)) as P; + case 96: + return (reader.readString(offset)) as P; case 97: return (reader.readLong(offset)) as P; case 98: @@ -1517,9 +1524,9 @@ P _stackThemeDeserializeProp

( case 145: return (reader.readLong(offset)) as P; case 146: - return (reader.readString(offset)) as P; - case 147: return (reader.readLong(offset)) as P; + case 147: + return (reader.readString(offset)) as P; case 148: return (reader.readLong(offset)) as P; case 149: @@ -1540,6 +1547,8 @@ P _stackThemeDeserializeProp

( return (reader.readLong(offset)) as P; case 157: return (reader.readLong(offset)) as P; + case 158: + return (reader.readLong(offset)) as P; default: throw IsarError('Unknown property with id $propertyId'); } @@ -2296,6 +2305,62 @@ extension StackThemeQueryFilter }); } + QueryBuilder + bottomNavIconIconHighlightedIntEqualTo(int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'bottomNavIconIconHighlightedInt', + value: value, + )); + }); + } + + QueryBuilder + bottomNavIconIconHighlightedIntGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'bottomNavIconIconHighlightedInt', + value: value, + )); + }); + } + + QueryBuilder + bottomNavIconIconHighlightedIntLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'bottomNavIconIconHighlightedInt', + value: value, + )); + }); + } + + QueryBuilder + bottomNavIconIconHighlightedIntBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'bottomNavIconIconHighlightedInt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + QueryBuilder bottomNavIconIconIntEqualTo(int value) { return QueryBuilder.apply(this, (query) { @@ -11319,6 +11384,20 @@ extension StackThemeQuerySortBy }); } + QueryBuilder + sortByBottomNavIconIconHighlightedInt() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'bottomNavIconIconHighlightedInt', Sort.asc); + }); + } + + QueryBuilder + sortByBottomNavIconIconHighlightedIntDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'bottomNavIconIconHighlightedInt', Sort.desc); + }); + } + QueryBuilder sortByBottomNavIconIconInt() { return QueryBuilder.apply(this, (query) { @@ -13466,6 +13545,20 @@ extension StackThemeQuerySortThenBy }); } + QueryBuilder + thenByBottomNavIconIconHighlightedInt() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'bottomNavIconIconHighlightedInt', Sort.asc); + }); + } + + QueryBuilder + thenByBottomNavIconIconHighlightedIntDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'bottomNavIconIconHighlightedInt', Sort.desc); + }); + } + QueryBuilder thenByBottomNavIconIconInt() { return QueryBuilder.apply(this, (query) { @@ -15557,6 +15650,13 @@ extension StackThemeQueryWhereDistinct }); } + QueryBuilder + distinctByBottomNavIconIconHighlightedInt() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'bottomNavIconIconHighlightedInt'); + }); + } + QueryBuilder distinctByBottomNavIconIconInt() { return QueryBuilder.apply(this, (query) { @@ -16643,6 +16743,13 @@ extension StackThemeQueryProperty }); } + QueryBuilder + bottomNavIconIconHighlightedIntProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'bottomNavIconIconHighlightedInt'); + }); + } + QueryBuilder bottomNavIconIconIntProperty() { return QueryBuilder.apply(this, (query) { diff --git a/lib/themes/stack_colors.dart b/lib/themes/stack_colors.dart index 2aeade5b9..8a326cb97 100644 --- a/lib/themes/stack_colors.dart +++ b/lib/themes/stack_colors.dart @@ -103,6 +103,7 @@ class StackColors extends ThemeExtension { // icons final Color bottomNavIconBack; final Color bottomNavIconIcon; + final Color bottomNavIconIconHighlighted; final Color topNavIconPrimary; final Color topNavIconGreen; final Color topNavIconYellow; @@ -281,6 +282,7 @@ class StackColors extends ThemeExtension { required this.snackBarTextInfo, required this.bottomNavIconBack, required this.bottomNavIconIcon, + required this.bottomNavIconIconHighlighted, required this.topNavIconPrimary, required this.topNavIconGreen, required this.topNavIconYellow, @@ -441,6 +443,7 @@ class StackColors extends ThemeExtension { snackBarTextInfo: colorTheme.snackBarTextInfo, bottomNavIconBack: colorTheme.bottomNavIconBack, bottomNavIconIcon: colorTheme.bottomNavIconIcon, + bottomNavIconIconHighlighted: colorTheme.bottomNavIconIconHighlighted, topNavIconPrimary: colorTheme.topNavIconPrimary, topNavIconGreen: colorTheme.topNavIconGreen, topNavIconYellow: colorTheme.topNavIconYellow, @@ -603,6 +606,7 @@ class StackColors extends ThemeExtension { Color? snackBarTextInfo, Color? bottomNavIconBack, Color? bottomNavIconIcon, + Color? bottomNavIconIconHighlighted, Color? topNavIconPrimary, Color? topNavIconGreen, Color? topNavIconYellow, @@ -776,6 +780,8 @@ class StackColors extends ThemeExtension { snackBarTextInfo: snackBarTextInfo ?? this.snackBarTextInfo, bottomNavIconBack: bottomNavIconBack ?? this.bottomNavIconBack, bottomNavIconIcon: bottomNavIconIcon ?? this.bottomNavIconIcon, + bottomNavIconIconHighlighted: + bottomNavIconIconHighlighted ?? this.bottomNavIconIconHighlighted, topNavIconPrimary: topNavIconPrimary ?? this.topNavIconPrimary, topNavIconGreen: topNavIconGreen ?? this.topNavIconGreen, topNavIconYellow: topNavIconYellow ?? this.topNavIconYellow, @@ -1279,6 +1285,11 @@ class StackColors extends ThemeExtension { other.bottomNavIconIcon, t, )!, + bottomNavIconIconHighlighted: Color.lerp( + bottomNavIconIconHighlighted, + other.bottomNavIconIconHighlighted, + t, + )!, topNavIconPrimary: Color.lerp( topNavIconPrimary, other.topNavIconPrimary, diff --git a/lib/widgets/wallet_navigation_bar/wallet_navigation_bar.dart b/lib/widgets/wallet_navigation_bar/wallet_navigation_bar.dart index ceaea74db..f389b2c85 100644 --- a/lib/widgets/wallet_navigation_bar/wallet_navigation_bar.dart +++ b/lib/widgets/wallet_navigation_bar/wallet_navigation_bar.dart @@ -175,7 +175,7 @@ class _WalletNavigationBarState extends ConsumerState { height: 20, color: Theme.of(context) .extension()! - .infoItemIcons, + .bottomNavIconIconHighlighted, ), crossFadeState: ref .watch(walletNavBarMore.state) @@ -190,10 +190,10 @@ class _WalletNavigationBarState extends ConsumerState { style: STextStyles.buttonSmall(context) .copyWith( - color: Theme.of(context) - .extension< - StackColors>()! - .bottomNavText), + color: Theme.of(context) + .extension()! + .bottomNavText, + ), ), secondChild: Text( "More", @@ -202,7 +202,7 @@ class _WalletNavigationBarState extends ConsumerState { .copyWith( color: Theme.of(context) .extension()! - .infoItemIcons, + .bottomNavIconIconHighlighted, ), ), crossFadeState: ref From 8351821c89e21771e437a2970ca2f3e8957b25d0 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 15 May 2023 11:15:35 -0600 Subject: [PATCH 7/8] disable xpubs temporarily --- lib/pages/settings_views/global_settings_view/xpub_view.dart | 3 +-- lib/services/coins/manager.dart | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 bd26251d8..e23131ec8 100644 --- a/lib/pages/settings_views/global_settings_view/xpub_view.dart +++ b/lib/pages/settings_views/global_settings_view/xpub_view.dart @@ -8,7 +8,6 @@ import 'package:qr_flutter/qr_flutter.dart'; import 'package:stackwallet/notifications/show_flush_bar.dart'; import 'package:stackwallet/providers/global/wallets_provider.dart'; import 'package:stackwallet/services/coins/manager.dart'; -import 'package:stackwallet/services/mixins/xpubable.dart'; import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/clipboard_interface.dart'; @@ -177,7 +176,7 @@ class _XPubViewState extends ConsumerState { child: child, ), child: FutureBuilder( - future: (manager.wallet as XPubAble).xpub, + future: manager.xpub, builder: (context, AsyncSnapshot snapshot) { if (snapshot.connectionState == ConnectionState.done && snapshot.hasData) { diff --git a/lib/services/coins/manager.dart b/lib/services/coins/manager.dart index a44cf9d8f..b8bb6d6d4 100644 --- a/lib/services/coins/manager.dart +++ b/lib/services/coins/manager.dart @@ -12,8 +12,8 @@ import 'package:stackwallet/services/event_bus/events/global/updated_in_backgrou import 'package:stackwallet/services/event_bus/global_event_bus.dart'; import 'package:stackwallet/services/mixins/coin_control_interface.dart'; import 'package:stackwallet/services/mixins/paynym_wallet_interface.dart'; -import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/services/mixins/xpubable.dart'; +import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/logger.dart'; @@ -252,7 +252,8 @@ class Manager with ChangeNotifier { ); } - bool get hasXPub => _currentWallet is XPubAble; + // TODO: re enable once xpubs have been redone + bool get hasXPub => false; //_currentWallet is XPubAble; Future get xpub async { if (!hasXPub) { From 5e5e89278a1b9d2541c595f2f34db5aea2d03b55 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 15 May 2023 12:51:43 -0600 Subject: [PATCH 8/8] fix tests --- test/sample_data/theme_json.dart | 1 + .../coins/bitcoincash/bitcoincash_wallet_test.dart | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/test/sample_data/theme_json.dart b/test/sample_data/theme_json.dart index 8bff3a179..6f7601b42 100644 --- a/test/sample_data/theme_json.dart +++ b/test/sample_data/theme_json.dart @@ -91,6 +91,7 @@ const Map lightThemeJsonMap = { "snack_bar_text_info": "0xFF002A78", "bottom_nav_icon_back": "0xFFA2A2A2", "bottom_nav_icon_icon": "0xFF232323", + "bottom_nav_icon_icon_highlighted": "0xFF232323", "top_nav_icon_primary": "0xFF232323", "top_nav_icon_green": "0xFF00A578", "top_nav_icon_yellow": "0xFFF4C517", diff --git a/test/services/coins/bitcoincash/bitcoincash_wallet_test.dart b/test/services/coins/bitcoincash/bitcoincash_wallet_test.dart index 9fad50494..661c9a1b7 100644 --- a/test/services/coins/bitcoincash/bitcoincash_wallet_test.dart +++ b/test/services/coins/bitcoincash/bitcoincash_wallet_test.dart @@ -175,17 +175,6 @@ void main() async { verifyNoMoreInteractions(cachedClient); verifyNoMoreInteractions(tracker); }); - - test("Multisig/P2SH address", () { - expect( - mainnetWallet?.addressType( - address: "3DYuVEmuKWQFxJcF7jDPhwPiXLTiNnyMFb"), - DerivePathType.bip49); - expect(secureStore.interactions, 0); - verifyNoMoreInteractions(client); - verifyNoMoreInteractions(cachedClient); - verifyNoMoreInteractions(tracker); - }); }); group("validate mainnet bitcoincash addresses", () {