diff --git a/assets/images/2.0x/arrow_bottom_cake_green.png b/assets/images/2.0x/arrow_bottom_green.png similarity index 100% rename from assets/images/2.0x/arrow_bottom_cake_green.png rename to assets/images/2.0x/arrow_bottom_green.png diff --git a/assets/images/3.0x/arrow_bottom_cake_green.png b/assets/images/3.0x/arrow_bottom_green.png similarity index 100% rename from assets/images/3.0x/arrow_bottom_cake_green.png rename to assets/images/3.0x/arrow_bottom_green.png diff --git a/assets/images/arrow_bottom_cake_green.png b/assets/images/arrow_bottom_green.png similarity index 100% rename from assets/images/arrow_bottom_cake_green.png rename to assets/images/arrow_bottom_green.png diff --git a/assets/images/birthday_cake.png b/assets/images/birthday_cake.png deleted file mode 100644 index 293cd10f6..000000000 Binary files a/assets/images/birthday_cake.png and /dev/null differ diff --git a/assets/images/cake_icon.png b/assets/images/cake_icon.png deleted file mode 100644 index cfa56cf0f..000000000 Binary files a/assets/images/cake_icon.png and /dev/null differ diff --git a/assets/images/cake_wordmark.png b/assets/images/cake_wordmark.png deleted file mode 100644 index 14bc2efa8..000000000 Binary files a/assets/images/cake_wordmark.png and /dev/null differ diff --git a/assets/images/cakewallet_android_icon/mipmap-hdpi/ic_launcher_foreground.png b/assets/images/cakewallet_android_icon/mipmap-hdpi/ic_launcher_foreground.png index bf5cde244..1561688c3 100644 Binary files a/assets/images/cakewallet_android_icon/mipmap-hdpi/ic_launcher_foreground.png and b/assets/images/cakewallet_android_icon/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/assets/images/cakewallet_android_icon/mipmap-hdpi/ic_launcher_monochrome.png b/assets/images/cakewallet_android_icon/mipmap-hdpi/ic_launcher_monochrome.png index 405c6b845..2c56eb83d 100644 Binary files a/assets/images/cakewallet_android_icon/mipmap-hdpi/ic_launcher_monochrome.png and b/assets/images/cakewallet_android_icon/mipmap-hdpi/ic_launcher_monochrome.png differ diff --git a/assets/images/cakewallet_android_icon/mipmap-mdpi/ic_launcher_foreground.png b/assets/images/cakewallet_android_icon/mipmap-mdpi/ic_launcher_foreground.png index 38bea2914..c153ef775 100644 Binary files a/assets/images/cakewallet_android_icon/mipmap-mdpi/ic_launcher_foreground.png and b/assets/images/cakewallet_android_icon/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/assets/images/cakewallet_android_icon/mipmap-mdpi/ic_launcher_monochrome.png b/assets/images/cakewallet_android_icon/mipmap-mdpi/ic_launcher_monochrome.png index c9cc2a371..b4bec2c0c 100644 Binary files a/assets/images/cakewallet_android_icon/mipmap-mdpi/ic_launcher_monochrome.png and b/assets/images/cakewallet_android_icon/mipmap-mdpi/ic_launcher_monochrome.png differ diff --git a/assets/images/cakewallet_android_icon/mipmap-xhdpi/ic_launcher_foreground.png b/assets/images/cakewallet_android_icon/mipmap-xhdpi/ic_launcher_foreground.png index 48012d5ac..63918f01e 100644 Binary files a/assets/images/cakewallet_android_icon/mipmap-xhdpi/ic_launcher_foreground.png and b/assets/images/cakewallet_android_icon/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/assets/images/cakewallet_android_icon/mipmap-xhdpi/ic_launcher_monochrome.png b/assets/images/cakewallet_android_icon/mipmap-xhdpi/ic_launcher_monochrome.png index 28bbc6ed0..59ef4df22 100644 Binary files a/assets/images/cakewallet_android_icon/mipmap-xhdpi/ic_launcher_monochrome.png and b/assets/images/cakewallet_android_icon/mipmap-xhdpi/ic_launcher_monochrome.png differ diff --git a/assets/images/cakewallet_android_icon/mipmap-xxhdpi/ic_launcher_foreground.png b/assets/images/cakewallet_android_icon/mipmap-xxhdpi/ic_launcher_foreground.png index 97595543f..bcbc04401 100644 Binary files a/assets/images/cakewallet_android_icon/mipmap-xxhdpi/ic_launcher_foreground.png and b/assets/images/cakewallet_android_icon/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/assets/images/cakewallet_android_icon/mipmap-xxhdpi/ic_launcher_monochrome.png b/assets/images/cakewallet_android_icon/mipmap-xxhdpi/ic_launcher_monochrome.png index dbf46988f..6b52c3734 100644 Binary files a/assets/images/cakewallet_android_icon/mipmap-xxhdpi/ic_launcher_monochrome.png and b/assets/images/cakewallet_android_icon/mipmap-xxhdpi/ic_launcher_monochrome.png differ diff --git a/assets/images/cakewallet_android_icon/mipmap-xxxhdpi/ic_launcher_foreground.png b/assets/images/cakewallet_android_icon/mipmap-xxxhdpi/ic_launcher_foreground.png index 1a9ea8271..6d2cd0ab4 100644 Binary files a/assets/images/cakewallet_android_icon/mipmap-xxxhdpi/ic_launcher_foreground.png and b/assets/images/cakewallet_android_icon/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/assets/images/cakewallet_android_icon/mipmap-xxxhdpi/ic_launcher_monochrome.png b/assets/images/cakewallet_android_icon/mipmap-xxxhdpi/ic_launcher_monochrome.png index 9bbfefac1..b736e3c5a 100644 Binary files a/assets/images/cakewallet_android_icon/mipmap-xxxhdpi/ic_launcher_monochrome.png and b/assets/images/cakewallet_android_icon/mipmap-xxxhdpi/ic_launcher_monochrome.png differ diff --git a/assets/images/hash_bag.png b/assets/images/hash_bag.png new file mode 100644 index 000000000..5ae71331d Binary files /dev/null and b/assets/images/hash_bag.png differ diff --git a/assets/images/hash_bag_base.png b/assets/images/hash_bag_base.png new file mode 100644 index 000000000..d8f586860 Binary files /dev/null and b/assets/images/hash_bag_base.png differ diff --git a/assets/images/hashbag_sym_btc.png b/assets/images/hashbag_sym_btc.png new file mode 100644 index 000000000..40eed0f79 Binary files /dev/null and b/assets/images/hashbag_sym_btc.png differ diff --git a/assets/images/hashbag_sym_dollar.png b/assets/images/hashbag_sym_dollar.png new file mode 100644 index 000000000..70ff3d00d Binary files /dev/null and b/assets/images/hashbag_sym_dollar.png differ diff --git a/assets/images/hashbag_sym_hash.png b/assets/images/hashbag_sym_hash.png new file mode 100644 index 000000000..1591fed09 Binary files /dev/null and b/assets/images/hashbag_sym_hash.png differ diff --git a/assets/images/qr-cake.png b/assets/images/qr-cake.png deleted file mode 100644 index 7c54dedb0..000000000 Binary files a/assets/images/qr-cake.png and /dev/null differ diff --git a/assets/images/qr-hashbag.png b/assets/images/qr-hashbag.png new file mode 100644 index 000000000..955a9d690 Binary files /dev/null and b/assets/images/qr-hashbag.png differ diff --git a/assets/images/restore_cupcake.png b/assets/images/restore_cupcake.png deleted file mode 100644 index b05b3a6a7..000000000 Binary files a/assets/images/restore_cupcake.png and /dev/null differ diff --git a/assets/images/restore_cupcake_dark.png b/assets/images/restore_cupcake_dark.png deleted file mode 100644 index 48fe965cb..000000000 Binary files a/assets/images/restore_cupcake_dark.png and /dev/null differ diff --git a/assets/images/restore_hashbag.png b/assets/images/restore_hashbag.png new file mode 100644 index 000000000..d785afef4 Binary files /dev/null and b/assets/images/restore_hashbag.png differ diff --git a/assets/new-ui/cakewallet-wordmark-light.svg b/assets/new-ui/hash-wordmark-light.svg similarity index 100% rename from assets/new-ui/cakewallet-wordmark-light.svg rename to assets/new-ui/hash-wordmark-light.svg diff --git a/assets/new-ui/cakewallet-wordmark.svg b/assets/new-ui/hash-wordmark.svg similarity index 100% rename from assets/new-ui/cakewallet-wordmark.svg rename to assets/new-ui/hash-wordmark.svg diff --git a/assets/new-ui/cake_squircle_icon.svg b/assets/new-ui/hash_squircle_icon.svg similarity index 100% rename from assets/new-ui/cake_squircle_icon.svg rename to assets/new-ui/hash_squircle_icon.svg diff --git a/lib/new-ui/pages/about_page.dart b/lib/new-ui/pages/about_page.dart index cb2e3a026..e76e8dd4a 100644 --- a/lib/new-ui/pages/about_page.dart +++ b/lib/new-ui/pages/about_page.dart @@ -4,7 +4,7 @@ import 'package:hash_wallet/entities/new_ui_entities/list_item/list_item_regular import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/widgets/modal_page_wrapper.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/new_list_row/new_list_section.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -14,12 +14,12 @@ import 'package:url_launcher/url_launcher.dart'; const List aboutPageEasterEggs = [ "Designed in (S)pain", "Proudly managing over 🤷‍♂️ XMR", - "The cake is not a lie 🍰", + "The bag is not a lie 💰", "I don’t play soccer because I enjoy the sport. I’m just doing it for kicks.", "Markets in red? Big deal.\nWhat color is the grass outside?", "Conquered Web3, now working on Web6-7", "Proud owner of none of your funds\n(we are not impressed)", - "*writing down my seedphrase*\ncake cake cake cake cake cake cake ca...", + "*writing down my seedphrase*\nhash hash hash hash hash hash hash ha...", "Don't forget to actually use your crypto to pay for stuff in the real world 🙂", "A chain of blocks? That's preposterous!", "IOU a hug <3", @@ -69,8 +69,8 @@ class _AboutPageState extends State { SizedBox(), GestureDetector( onTap: _easterEgg, - child: CakeImageWidget( - imageUrl: "assets/new-ui/cake_squircle_icon.svg", + child: HashImageWidget( + imageUrl: "assets/new-ui/hash_squircle_icon.svg", width: 128, height: 128, ), diff --git a/lib/new-ui/pages/account_customizer.dart b/lib/new-ui/pages/account_customizer.dart index 82bddc8ae..aa8432610 100644 --- a/lib/new-ui/pages/account_customizer.dart +++ b/lib/new-ui/pages/account_customizer.dart @@ -11,7 +11,7 @@ import 'package:hash_wallet/new-ui/widgets/new_primary_button.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; import 'package:hash_wallet/src/widgets/alert_with_one_action.dart'; import 'package:hash_wallet/src/widgets/alert_with_two_actions.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/utils/show_pop_up.dart'; import 'package:hash_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:hash_wallet/view_model/monero_account_list/account_list_item.dart'; @@ -459,7 +459,7 @@ class _AccountCreationModalState extends State { decoration: BoxDecoration( color: Theme.of(context).colorScheme.surfaceContainerHigh, borderRadius: BorderRadius.circular(5)), - child: CakeImageWidget( + child: HashImageWidget( imageUrl: "assets/new-ui/randomize.svg", colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.primary, BlendMode.srcIn), diff --git a/lib/new-ui/pages/addresses_page.dart b/lib/new-ui/pages/addresses_page.dart index 16c048869..00177f21f 100644 --- a/lib/new-ui/pages/addresses_page.dart +++ b/lib/new-ui/pages/addresses_page.dart @@ -10,7 +10,7 @@ import 'package:hash_wallet/new-ui/widgets/coins_page/cards/balance_card.dart'; import 'package:hash_wallet/new-ui/widgets/long_press_menu.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; import 'package:hash_wallet/routes.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/utils/address_formatter.dart'; import 'package:hash_wallet/utils/show_pop_up.dart'; import 'package:hash_wallet/view_model/dashboard/dashboard_view_model.dart'; @@ -440,7 +440,7 @@ class AddressRow extends StatelessWidget { ], ), ), - if (selected) CakeImageWidget(imageUrl: "assets/new-ui/checkmark.svg") + if (selected) HashImageWidget(imageUrl: "assets/new-ui/checkmark.svg") ], ), ), @@ -479,7 +479,7 @@ class ShowHiddenButton extends StatelessWidget { Text(S.of(context).show_hidden_addresses), RotatedBox( quarterTurns: 1, - child: CakeImageWidget(imageUrl: "assets/new-ui/dropdown_arrow.svg")) + child: HashImageWidget(imageUrl: "assets/new-ui/dropdown_arrow.svg")) ], ), ), diff --git a/lib/new-ui/pages/bridge/bridge_amount_page.dart b/lib/new-ui/pages/bridge/bridge_amount_page.dart index 04c724b74..5b12dedaf 100644 --- a/lib/new-ui/pages/bridge/bridge_amount_page.dart +++ b/lib/new-ui/pages/bridge/bridge_amount_page.dart @@ -66,7 +66,7 @@ class _BridgeAmountPageState extends State { return InfoBottomSheet( footerType: FooterType.doubleActionButton, titleText: 'Bridge initiated!', - contentImage: 'assets/images/birthday_cake.png', + contentImage: 'assets/images/hash_bag.png', content: 'The bridging will take between 30 seconds and 3 ' 'minutes to complete.', doubleActionLeftButtonText: S.of(bottomSheetContext).close, diff --git a/lib/new-ui/pages/bridge/bridge_confirm_sheet.dart b/lib/new-ui/pages/bridge/bridge_confirm_sheet.dart index 6f2d6fb5a..fc1b36e51 100644 --- a/lib/new-ui/pages/bridge/bridge_confirm_sheet.dart +++ b/lib/new-ui/pages/bridge/bridge_confirm_sheet.dart @@ -4,7 +4,7 @@ import 'package:hash_wallet/new-ui/widgets/bridge/network_path_pill.dart'; import 'package:hash_wallet/new-ui/widgets/confirm_swiper.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; import 'package:hash_wallet/new-ui/widgets/send_page/send_confirm_bottom_widget.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/view_model/bridge/bridge_view_model.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -70,7 +70,7 @@ class _BridgeConfirmSheetState extends State { leadingWidget: Row( spacing: 8, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: bridgeViewModel.selectedToken?.iconPath ?? '', width: 36, height: 36, diff --git a/lib/new-ui/pages/bridge/bridge_receive_address_input_page.dart b/lib/new-ui/pages/bridge/bridge_receive_address_input_page.dart index 64b66a39c..c5920718b 100644 --- a/lib/new-ui/pages/bridge/bridge_receive_address_input_page.dart +++ b/lib/new-ui/pages/bridge/bridge_receive_address_input_page.dart @@ -4,7 +4,7 @@ import 'package:hash_wallet/new-ui/pages/bridge/bridge_confirm_sheet.dart'; import 'package:hash_wallet/new-ui/widgets/keyboard_hide_overlay.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; import 'package:hash_wallet/new-ui/widgets/send_page/send_address_input.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/view_model/bridge/bridge_view_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -85,7 +85,7 @@ class _BridgeReceiveAddressInputPageState extends State { children: [ const SizedBox(height: 8), Center( - child: CakeImageWidget( + child: HashImageWidget( borderRadius: 8, imageUrl: chainName.isNotEmpty ? 'assets/images/crypto/${chainName.toLowerCase()}.webp' @@ -251,7 +251,7 @@ class _BridgeReceivingWalletRow extends StatelessWidget { ], ), ), - CakeImageWidget( + HashImageWidget( imageUrl: 'assets/new-ui/arrow_forward.svg', height: 16, color: Theme.of(ctx).colorScheme.onSurfaceVariant, diff --git a/lib/new-ui/pages/lightning_username_page.dart b/lib/new-ui/pages/lightning_username_page.dart index 944078bf9..9f2f53e77 100644 --- a/lib/new-ui/pages/lightning_username_page.dart +++ b/lib/new-ui/pages/lightning_username_page.dart @@ -5,7 +5,7 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/viewmodels/lightning_username/lightning_username_bloc.dart'; import 'package:hash_wallet/new-ui/widgets/new_primary_button.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/themes/core/theme_store.dart'; import 'package:cw_core/generate_name.dart'; import 'package:flutter/material.dart'; @@ -165,7 +165,7 @@ class LightningUsernameInfo extends StatelessWidget { return Column( spacing: 24, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: isLightMode ? "assets/new-ui/lightning_username_setup_light.svg" : "assets/new-ui/lightning_username_setup.svg"), @@ -221,7 +221,7 @@ class LightningUsernameEditor extends StatelessWidget { mainAxisSize: MainAxisSize.min, spacing: 12, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: isLightMode ? "assets/new-ui/lightning_username_setup_light.svg" : "assets/new-ui/lightning_username_setup.svg"), @@ -257,7 +257,7 @@ class LightningUsernameEditor extends StatelessWidget { color: Colors.transparent, child: InkWell( onTap: onRandomizeButtonTap, - child: CakeImageWidget( + child: HashImageWidget( imageUrl: "assets/new-ui/randomize.svg", colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.primary, BlendMode.srcIn)), diff --git a/lib/new-ui/pages/send_page.dart b/lib/new-ui/pages/send_page.dart index bf425621b..7eb35e70b 100644 --- a/lib/new-ui/pages/send_page.dart +++ b/lib/new-ui/pages/send_page.dart @@ -20,7 +20,7 @@ import 'package:hash_wallet/new-ui/widgets/send_page/send_confirm_sheet.dart'; import 'package:hash_wallet/new-ui/widgets/send_page/send_memo_input.dart'; import 'package:hash_wallet/reactions/wallet_connect.dart'; import 'package:hash_wallet/src/widgets/bottom_sheet/token_selection_bottom_sheet.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/new_list_row/list_item_regular_row_widget.dart'; import 'package:hash_wallet/src/widgets/standard_checkbox.dart'; import 'package:hash_wallet/store/app_store.dart'; @@ -291,7 +291,7 @@ class _NewSendPageState extends State { if (widget.sendViewModel.outputs.length > 1) ModernButton( size: 36, - icon: CakeImageWidget(imageUrl: + icon: HashImageWidget(imageUrl: "assets/new-ui/remove_recipient.svg", colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.primary, @@ -322,7 +322,7 @@ class _NewSendPageState extends State { if (widget.mode.helpContent != null) ModernButton( size: 36, - icon: CakeImageWidget(imageUrl: + icon: HashImageWidget(imageUrl: "assets/new-ui/help.svg", colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.primary, BlendMode.srcIn), @@ -1343,7 +1343,7 @@ class SendHelpPage extends StatelessWidget { mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.center, children: [ - CakeImageWidget(imageUrl:content.imagePath), + HashImageWidget(imageUrl:content.imagePath), Text( content.description, textAlign: TextAlign.center, diff --git a/lib/new-ui/pages/settings_page.dart b/lib/new-ui/pages/settings_page.dart index 4fbd97d2b..91a4faaeb 100644 --- a/lib/new-ui/pages/settings_page.dart +++ b/lib/new-ui/pages/settings_page.dart @@ -5,7 +5,7 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/modal_navigator.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; import 'package:hash_wallet/routes.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/new_list_row/new_list_section.dart'; import 'package:hash_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:cw_core/wallet_info.dart'; @@ -62,7 +62,7 @@ class SettingsSectionData { ]); static SettingsSectionData appSettings = - SettingsSectionData(S.current.app_settings, "assets/new-ui/cake-setting.svg", [ + SettingsSectionData(S.current.app_settings, "assets/new-ui/hash-setting.svg", [ SettingsListItem("assets/new-ui/settings_row_icons/connections.svg", S.current.connections, Routes.connectionSync), // SettingsListItem("assets/new-ui/settings_row_icons/defaults.svg", "Defaults", ""), SettingsListItem("assets/new-ui/settings_row_icons/display.svg", S.current.display, Routes.displaySettingsPage), @@ -147,7 +147,7 @@ class SettingsMainPage extends StatelessWidget { child: Row( spacing: 8, children: [ - CakeImageWidget(imageUrl: section.titleIconPath, + HashImageWidget(imageUrl: section.titleIconPath, colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.onSurfaceVariant, BlendMode.srcIn, diff --git a/lib/new-ui/pages/swap_page.dart b/lib/new-ui/pages/swap_page.dart index 99123d4ad..f5f003037 100644 --- a/lib/new-ui/pages/swap_page.dart +++ b/lib/new-ui/pages/swap_page.dart @@ -24,7 +24,7 @@ import 'package:hash_wallet/src/screens/exchange/widgets/present_provider_picker import 'package:hash_wallet/src/screens/send/widgets/extract_address_from_parsed.dart'; import 'package:hash_wallet/src/widgets/alert_with_one_action.dart'; import 'package:hash_wallet/src/widgets/alert_with_two_actions.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/primary_button.dart'; import 'package:hash_wallet/utils/debounce.dart'; import 'package:hash_wallet/utils/payment_request.dart'; @@ -463,7 +463,7 @@ class _NewSwapPageState extends State { title: S.of(context).swap, leadingIcon: Icon(Icons.close), onLeadingPressed: Navigator.of(context).maybePop, - trailingIcon: CakeImageWidget(imageUrl: + trailingIcon: HashImageWidget(imageUrl: "assets/new-ui/options.svg", colorFilter: ColorFilter.mode(Theme.of(context).colorScheme.primary, BlendMode.srcIn), @@ -752,7 +752,7 @@ class SwapProviderPreview extends StatelessWidget { spacing: 12, children: [ if (provider != null) - CakeImageWidget(imageUrl:provider.description.image,width:28,height:28), + HashImageWidget(imageUrl:provider.description.image,width:28,height:28), if (provider == null) CupertinoActivityIndicator(), Text( provider?.title ?? "${S.of(context).finding_provider}...", @@ -775,7 +775,7 @@ class SwapProviderPreview extends StatelessWidget { fontWeight: FontWeight.w400, color: Theme.of(context).colorScheme.onSurfaceVariant), ), - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: "assets/new-ui/chooser.svg", colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.onSurfaceVariant, BlendMode.srcIn), @@ -936,7 +936,7 @@ class SwapAmountBoxState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - CakeImageWidget(imageUrl: _selectedCurrency.iconPath ?? "", + HashImageWidget(imageUrl: _selectedCurrency.iconPath ?? "", width: 28, height: 28), SizedBox(width: 10), Text( @@ -945,7 +945,7 @@ class SwapAmountBoxState extends State { ), if (chainIconPath != null && chainIconPath.isNotEmpty) ...[ SizedBox(width: 4), - CakeImageWidget( + HashImageWidget( imageUrl: chainIconPath, width: 12, height: 12, @@ -966,7 +966,7 @@ class SwapAmountBoxState extends State { padding: const EdgeInsets.all(4.0), child: RotatedBox( quarterTurns: 2, - child: CakeImageWidget(imageUrl: + child: HashImageWidget(imageUrl: "assets/new-ui/dropdown_arrow.svg", width: 4, height: 4, @@ -1078,7 +1078,7 @@ class SwapAmountBoxState extends State { ), RotatedBox( quarterTurns: 2, - child: CakeImageWidget(imageUrl: + child: HashImageWidget(imageUrl: "assets/new-ui/dropdown_arrow.svg", colorFilter: ColorFilter.mode( (addressEmpty && widget.isReceiverCard) diff --git a/lib/new-ui/widgets/apps_widget.dart b/lib/new-ui/widgets/apps_widget.dart index a9278406e..f31fd0626 100644 --- a/lib/new-ui/widgets/apps_widget.dart +++ b/lib/new-ui/widgets/apps_widget.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/themes/core/theme_extension.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -76,7 +76,7 @@ class AppsWidget extends StatelessWidget { children: [ Padding( padding: const EdgeInsets.only(right: 20), - child: CakeImageWidget(imageUrl: image, height: 54, width: 54), + child: HashImageWidget(imageUrl: image, height: 54, width: 54), ), Expanded( child: Column( diff --git a/lib/new-ui/widgets/bridge/network_path_pill.dart b/lib/new-ui/widgets/bridge/network_path_pill.dart index 94e56cb75..07b5b6e55 100644 --- a/lib/new-ui/widgets/bridge/network_path_pill.dart +++ b/lib/new-ui/widgets/bridge/network_path_pill.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:cw_core/generate_name.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -21,7 +21,7 @@ class NetworkPathPill extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, mainAxisSize: MainAxisSize.min, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: 'assets/new-ui/chain_badges/${sourceChainName.toLowerCase()}.svg', width: 24, height: 24, @@ -47,7 +47,7 @@ class NetworkPathPill extends StatelessWidget { color: scheme.primary, ), ), - CakeImageWidget( + HashImageWidget( imageUrl: 'assets/new-ui/chain_badges/${destChainName.toLowerCase()}.svg', width: 24, height: 24, diff --git a/lib/new-ui/widgets/bridge/transfer_history_row.dart b/lib/new-ui/widgets/bridge/transfer_history_row.dart index 2030ffa44..b4a55ffc7 100644 --- a/lib/new-ui/widgets/bridge/transfer_history_row.dart +++ b/lib/new-ui/widgets/bridge/transfer_history_row.dart @@ -1,6 +1,6 @@ import 'package:hash_wallet/entities/bridge_transfer.dart'; import 'package:hash_wallet/evm/evm.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/themes/core/custom_theme_colors.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; @@ -87,7 +87,7 @@ class TransferHistoryRow extends StatelessWidget { ), child: Stack( children: [ - CakeImageWidget( + HashImageWidget( imageUrl: 'assets/images/crypto/${sourceChainName?.toLowerCase()}.webp', width: 28, height: 28, @@ -95,7 +95,7 @@ class TransferHistoryRow extends StatelessWidget { Positioned( top: 14, left: 12, - child: CakeImageWidget( + child: HashImageWidget( imageUrl: 'assets/images/crypto/${destChainName?.toLowerCase()}.webp', width: 28, height: 28, diff --git a/lib/new-ui/widgets/changelog_modal.dart b/lib/new-ui/widgets/changelog_modal.dart index bfb2dc750..26123ae5f 100644 --- a/lib/new-ui/widgets/changelog_modal.dart +++ b/lib/new-ui/widgets/changelog_modal.dart @@ -4,7 +4,7 @@ import 'dart:io'; import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/widgets/new_primary_button.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -145,7 +145,7 @@ class VersionNumberHeader extends StatelessWidget { spacing: 8, mainAxisSize: MainAxisSize.min, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: "assets/images/cake_logo_dark.svg", height: 32, width: 32, @@ -175,7 +175,7 @@ class ChangelogItemWidget extends StatelessWidget { spacing: 12, children: [ if (item.iconFilename.isNotEmpty) - CakeImageWidget( + HashImageWidget( imageUrl: "$changelogIconLocation/${item.iconFilename}.svg", height: 36, width: 36, diff --git a/lib/new-ui/widgets/coin_control_page/coin_control_list_item.dart b/lib/new-ui/widgets/coin_control_page/coin_control_list_item.dart index 7118556f0..7ee2de51c 100644 --- a/lib/new-ui/widgets/coin_control_page/coin_control_list_item.dart +++ b/lib/new-ui/widgets/coin_control_page/coin_control_list_item.dart @@ -1,5 +1,5 @@ import 'package:auto_size_text/auto_size_text.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/new_list_row/new_simple_checkbox.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -64,7 +64,7 @@ class CoinControlListItem extends StatelessWidget { children: [ Text(amount, style: TextStyle(fontSize:14,fontWeight: FontWeight.w400,color: Theme.of(context).colorScheme.onSurface),), if(address.toLowerCase().contains("mweb")) // hack carried over from old ui, we really should just have a boolean in the object - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: "assets/new-ui/address-type-picker-icons/mweb.svg", width: 18, height: 18, @@ -72,7 +72,7 @@ class CoinControlListItem extends StatelessWidget { Theme.of(context).colorScheme.onSurfaceVariant, BlendMode.srcIn), ), if(isSilentPayment) - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: "assets/new-ui/address-type-picker-icons/silent.svg", width: 18, height: 18, @@ -101,7 +101,7 @@ class CoinControlListItem extends StatelessWidget { fontWeight: FontWeight.w400, color: Theme.of(context).colorScheme.onSurfaceVariant), ), - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: "assets/new-ui/arrow_right.svg", colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.onSurfaceVariant, BlendMode.srcIn), @@ -120,7 +120,7 @@ class CoinControlListItem extends StatelessWidget { } if(isFrozen) { - return CakeImageWidget(imageUrl:"assets/new-ui/frozen.svg"); + return HashImageWidget(imageUrl:"assets/new-ui/frozen.svg"); } return NewSimpleCheckbox(value: isSending, onChanged: (value){onCheckBoxTap?.call();}); diff --git a/lib/new-ui/widgets/coins_page/action_row/coin_action_row.dart b/lib/new-ui/widgets/coins_page/action_row/coin_action_row.dart index 94c8531c3..02ef46510 100644 --- a/lib/new-ui/widgets/coins_page/action_row/coin_action_row.dart +++ b/lib/new-ui/widgets/coins_page/action_row/coin_action_row.dart @@ -9,7 +9,7 @@ import 'package:hash_wallet/new-ui/pages/swap_page.dart'; import 'package:hash_wallet/reactions/wallet_connect.dart'; import 'package:hash_wallet/routes.dart'; import 'package:hash_wallet/src/widgets/alert_with_one_action.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/utils/feature_flag.dart'; import 'package:hash_wallet/utils/payment_request.dart'; import 'package:hash_wallet/utils/show_pop_up.dart'; @@ -44,7 +44,7 @@ class CoinActionRow extends StatelessWidget { spacing: MediaQuery.of(context).size.width * 0.05, children: [ CoinActionButton( - icon: CakeImageWidget(imageUrl: + icon: HashImageWidget(imageUrl: "assets/new-ui/send.svg", colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.primary, @@ -82,7 +82,7 @@ class CoinActionRow extends StatelessWidget { }, ), CoinActionButton( - icon: CakeImageWidget(imageUrl: + icon: HashImageWidget(imageUrl: "assets/new-ui/receive.svg", colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.primary, @@ -115,7 +115,7 @@ class CoinActionRow extends StatelessWidget { ), if (showSwap) CoinActionButton( - icon: CakeImageWidget(imageUrl: + icon: HashImageWidget(imageUrl: "assets/new-ui/exchange.svg", colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.primary, @@ -141,7 +141,7 @@ class CoinActionRow extends StatelessWidget { }, ), CoinActionButton( - icon: CakeImageWidget(imageUrl: + icon: HashImageWidget(imageUrl: "assets/new-ui/scan.svg", colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.primary, diff --git a/lib/new-ui/widgets/coins_page/assets_history/asset_details_modal.dart b/lib/new-ui/widgets/coins_page/assets_history/asset_details_modal.dart index 0521255e6..ddac2b1aa 100644 --- a/lib/new-ui/widgets/coins_page/assets_history/asset_details_modal.dart +++ b/lib/new-ui/widgets/coins_page/assets_history/asset_details_modal.dart @@ -8,7 +8,7 @@ import 'package:hash_wallet/new-ui/pages/send_page.dart'; import 'package:hash_wallet/new-ui/pages/swap_page.dart'; import 'package:hash_wallet/new-ui/widgets/modern_button.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/utils/payment_request.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/unspent_coin_type.dart'; @@ -77,7 +77,7 @@ class AssetDetailsModal extends StatelessWidget { child: Stack( children: [ if (iconPath.isNotEmpty) - CakeImageWidget(imageUrl: iconPath, width: 75, height: 75) + HashImageWidget(imageUrl: iconPath, width: 75, height: 75) else Container( width: 75, @@ -103,7 +103,7 @@ class AssetDetailsModal extends StatelessWidget { // color: Colors.white), // child: Padding( // padding: const EdgeInsets.all(4.0), - // child: CakeImageWidget(imageUrl: + // child: HashImageWidget(imageUrl: // chainIconPath, // width: 18, // height: 18, @@ -150,7 +150,7 @@ class AssetDetailsModal extends StatelessWidget { spacing: 4, children: [ if (chainIconPath.isNotEmpty) - CakeImageWidget( + HashImageWidget( imageUrl: chainIconPath, width: 16, height: 16, diff --git a/lib/new-ui/widgets/coins_page/assets_history/asset_tile.dart b/lib/new-ui/widgets/coins_page/assets_history/asset_tile.dart index 07c299eab..6c8555f60 100644 --- a/lib/new-ui/widgets/coins_page/assets_history/asset_tile.dart +++ b/lib/new-ui/widgets/coins_page/assets_history/asset_tile.dart @@ -2,7 +2,7 @@ import 'dart:math' show min; import 'package:hash_wallet/new-ui/widgets/coins_page/assets_history/asset_details_modal.dart'; import 'package:hash_wallet/src/screens/wallet_connect/utils/string_parsing.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/view_model/dashboard/balance_view_model.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/wallet_base.dart'; @@ -89,7 +89,7 @@ class AssetTile extends StatelessWidget { child: Stack( children: [ if((iconPath).isNotEmpty) - CakeImageWidget(imageUrl: iconPath) + HashImageWidget(imageUrl: iconPath) else Container( width: 36, @@ -114,7 +114,7 @@ class AssetTile extends StatelessWidget { // color: Colors.white), // child: Padding( // padding: const EdgeInsets.all(2.0), - // child: CakeImageWidget( + // child: HashImageWidget( // imageUrl: chainIconPath, // width: 12, // height: 12, diff --git a/lib/new-ui/widgets/coins_page/assets_history/assets_top_bar.dart b/lib/new-ui/widgets/coins_page/assets_history/assets_top_bar.dart index e01f1c22e..675c161a3 100644 --- a/lib/new-ui/widgets/coins_page/assets_history/assets_top_bar.dart +++ b/lib/new-ui/widgets/coins_page/assets_history/assets_top_bar.dart @@ -3,7 +3,7 @@ import 'package:hash_wallet/new-ui/widgets/line_tab_switcher.dart'; import 'package:hash_wallet/routes.dart'; import 'package:hash_wallet/src/screens/dashboard/widgets/filter_widget.dart'; import 'package:hash_wallet/utils/show_pop_up.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:flutter/material.dart'; @@ -69,7 +69,7 @@ class AssetsTopBar extends StatelessWidget { child: Row( spacing: 6, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: "assets/new-ui/options_slider.svg", colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.primary, BlendMode.srcIn)), diff --git a/lib/new-ui/widgets/coins_page/assets_history/history_tile.dart b/lib/new-ui/widgets/coins_page/assets_history/history_tile.dart index 156aff3b2..c308df62a 100644 --- a/lib/new-ui/widgets/coins_page/assets_history/history_tile.dart +++ b/lib/new-ui/widgets/coins_page/assets_history/history_tile.dart @@ -1,5 +1,5 @@ import 'package:hash_wallet/new-ui/widgets/coins_page/assets_history/history_tile_base.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/transaction_direction.dart'; import 'package:flutter/material.dart'; @@ -66,7 +66,7 @@ class HistoryTile extends StatelessWidget { if (asset == CryptoCurrency.btcln) { return Stack( children: [ - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: "assets/new-ui/lightning-icon.svg", width: 34, height: 34, @@ -78,7 +78,7 @@ class HistoryTile extends StatelessWidget { width: 16, height: 16, decoration: BoxDecoration(color: Theme.of(context).colorScheme.onInverseSurface, shape: BoxShape.circle), - child: CakeImageWidget(imageUrl: + child: HashImageWidget(imageUrl: _getDirectionIconToken(), colorFilter: ColorFilter.mode( direction == TransactionDirection.outgoing @@ -101,7 +101,7 @@ class HistoryTile extends StatelessWidget { return Stack(children: [ Opacity( opacity: pending ? 0.5 : 1, - child: CakeImageWidget(imageUrl: asset?.iconPath ??"", width: 34, + child: HashImageWidget(imageUrl: asset?.iconPath ??"", width: 34, height: 34,), ), Align( @@ -113,7 +113,7 @@ class HistoryTile extends StatelessWidget { color: Colors.white), child: Padding( padding: const EdgeInsets.all(2.0), - child: CakeImageWidget( + child: HashImageWidget( imageUrl: chainIconPath, width: 12, height: 12, @@ -124,7 +124,7 @@ class HistoryTile extends StatelessWidget { ],); } - return CakeImageWidget(imageUrl:_getDirectionIcon(), + return HashImageWidget(imageUrl:_getDirectionIcon(), colorFilter: ColorFilter.mode( direction == TransactionDirection.outgoing ? Theme.of(context).colorScheme.inverseSurface.withAlpha(175) diff --git a/lib/new-ui/widgets/coins_page/assets_history/history_trade_tile.dart b/lib/new-ui/widgets/coins_page/assets_history/history_trade_tile.dart index 5d1411183..187613e27 100644 --- a/lib/new-ui/widgets/coins_page/assets_history/history_trade_tile.dart +++ b/lib/new-ui/widgets/coins_page/assets_history/history_trade_tile.dart @@ -1,7 +1,7 @@ import 'package:hash_wallet/exchange/exchange_provider_description.dart'; import 'package:hash_wallet/exchange/trade_state.dart'; import 'package:hash_wallet/new-ui/widgets/coins_page/assets_history/history_tile_base.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:cw_core/crypto_amount_format.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:flutter/material.dart'; @@ -39,7 +39,7 @@ class HistoryTradeTile extends StatelessWidget { width: 50, child: Stack( children: [ - CakeImageWidget( + HashImageWidget( imageUrl: _getIconPath(from), width: currencyIconSize, height: currencyIconSize), Positioned( top: currencyIconSize / 2, @@ -49,7 +49,7 @@ class HistoryTradeTile extends StatelessWidget { border: Border.all(width: 2, color: Theme.of(context).colorScheme.surfaceContainer), shape: BoxShape.circle), - child: CakeImageWidget( + child: HashImageWidget( imageUrl: _getIconPath(to), width: currencyIconSize, height: currencyIconSize, @@ -73,7 +73,7 @@ class HistoryTradeTile extends StatelessWidget { spacing: 4, children: [ Text(swapState.title), - CakeImageWidget(imageUrl: provider.image, width: 14, height: 14) + HashImageWidget(imageUrl: provider.image, width: 14, height: 14) ], ), date: date, @@ -87,7 +87,7 @@ class HistoryTradeTile extends StatelessWidget { fontWeight: FontWeight.w500)), Text(from.title, style: TextStyle(color: Theme.of(context).colorScheme.onSurfaceVariant)), if (fromChainIcon.isNotEmpty) - CakeImageWidget( + HashImageWidget( imageUrl: fromChainIcon, width: 12, height: 12, @@ -109,7 +109,7 @@ class HistoryTradeTile extends StatelessWidget { Text( to.title, ), - if (toChainIcon.isNotEmpty) CakeImageWidget(imageUrl: toChainIcon, width: 12, height: 12) + if (toChainIcon.isNotEmpty) HashImageWidget(imageUrl: toChainIcon, width: 12, height: 12) ], ), leadingIcon: _getLeadingStack(context), diff --git a/lib/new-ui/widgets/coins_page/assets_history/transaction_details_modal.dart b/lib/new-ui/widgets/coins_page/assets_history/transaction_details_modal.dart index 3a8abde9b..291961949 100644 --- a/lib/new-ui/widgets/coins_page/assets_history/transaction_details_modal.dart +++ b/lib/new-ui/widgets/coins_page/assets_history/transaction_details_modal.dart @@ -6,7 +6,7 @@ import 'package:hash_wallet/routes.dart'; import 'package:hash_wallet/src/screens/transaction_details/confirmations_list_item.dart'; import 'package:hash_wallet/src/screens/transaction_details/transaction_details_list_item.dart'; import 'package:hash_wallet/src/screens/transaction_details/address_list_item.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/new_list_row/new_list_section.dart'; import 'package:hash_wallet/utils/address_formatter.dart'; import 'package:hash_wallet/view_model/transaction_details_view_model.dart'; @@ -70,7 +70,7 @@ class _TransactionDetailsModalState extends State { controller: controller, child: Column( children: [ - CakeImageWidget( + HashImageWidget( imageUrl: widget.transactionDetailsViewModel.transactionAsset.iconPath ?? "", width: 64, diff --git a/lib/new-ui/widgets/coins_page/cards/balance_card.dart b/lib/new-ui/widgets/coins_page/cards/balance_card.dart index 3628a0743..4f01d201e 100644 --- a/lib/new-ui/widgets/coins_page/cards/balance_card.dart +++ b/lib/new-ui/widgets/coins_page/cards/balance_card.dart @@ -1,5 +1,5 @@ import 'package:hash_wallet/generated/i18n.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:cw_core/card_design.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -94,7 +94,7 @@ class BalanceCard extends StatelessWidget { ? ClipRSuperellipse( borderRadius: BorderRadius.circular(borderRadius), key: ValueKey(design.imagePath), - child: CakeImageWidget( + child: HashImageWidget( imageUrl: design.imagePath, width: width, height: height, @@ -247,7 +247,7 @@ class BalanceCard extends StatelessWidget { switchInCurve: Curves.easeInOut, switchOutCurve: Curves.easeInOut, child: design.backgroundType == CardDesignBackgroundTypes.svgIcon - ? CakeImageWidget( + ? HashImageWidget( imageUrl: design.imagePath, key: const ValueKey('svgIcon'), height: iconWidth, @@ -279,7 +279,7 @@ class BalanceCard extends StatelessWidget { height: 40, width: 40, child: Center( - child: CakeImageWidget( + child: HashImageWidget( imageUrl: "assets/new-ui/3dots_vertical.svg", alignment: Alignment.topRight, colorFilter: diff --git a/lib/new-ui/widgets/coins_page/mweb_ad.dart b/lib/new-ui/widgets/coins_page/mweb_ad.dart index e1a6806d7..a231c4f13 100644 --- a/lib/new-ui/widgets/coins_page/mweb_ad.dart +++ b/lib/new-ui/widgets/coins_page/mweb_ad.dart @@ -1,6 +1,6 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/routes.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -33,7 +33,7 @@ class MwebAd extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: "assets/new-ui/settings_row_icons/mweb.svg", width: 24, height: 24, diff --git a/lib/new-ui/widgets/coins_page/top_bar_widget/chain_icon.dart b/lib/new-ui/widgets/coins_page/top_bar_widget/chain_icon.dart index 5817b4383..e40fb08e3 100644 --- a/lib/new-ui/widgets/coins_page/top_bar_widget/chain_icon.dart +++ b/lib/new-ui/widgets/coins_page/top_bar_widget/chain_icon.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -38,7 +38,7 @@ class ChainIcon extends StatelessWidget { scale: done ? 1 : 0.8, child: AnimatedSwitcher( duration: Duration(milliseconds: 150), - child: CakeImageWidget( + child: HashImageWidget( imageUrl: iconPath, key: ValueKey(progress >= 1), width: 36, diff --git a/lib/new-ui/widgets/coins_page/top_bar_widget/lightning_switcher.dart b/lib/new-ui/widgets/coins_page/top_bar_widget/lightning_switcher.dart index 4fec058bc..06a94153b 100644 --- a/lib/new-ui/widgets/coins_page/top_bar_widget/lightning_switcher.dart +++ b/lib/new-ui/widgets/coins_page/top_bar_widget/lightning_switcher.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -48,7 +48,7 @@ class LightningSwitcher extends StatelessWidget { duration: Duration(milliseconds: 150), transitionBuilder: (child, animation) => FadeTransition(opacity: animation, child: child), - child: CakeImageWidget(imageUrl:'assets/new-ui/switcher-bitcoin.svg', + child: HashImageWidget(imageUrl:'assets/new-ui/switcher-bitcoin.svg', key: ValueKey(lightningMode), width: 32, height: 32, @@ -64,7 +64,7 @@ class LightningSwitcher extends StatelessWidget { duration: Duration(milliseconds: 150), transitionBuilder: (child, animation) => FadeTransition(opacity: animation, child: child), - child: CakeImageWidget(imageUrl: 'assets/new-ui/switcher-lightning.svg', + child: HashImageWidget(imageUrl: 'assets/new-ui/switcher-lightning.svg', key: ValueKey(lightningMode), width: 32, height: 32, diff --git a/lib/new-ui/widgets/coins_page/top_bar_widget/sync_bar.dart b/lib/new-ui/widgets/coins_page/top_bar_widget/sync_bar.dart index 324f70f71..f8731ed86 100644 --- a/lib/new-ui/widgets/coins_page/top_bar_widget/sync_bar.dart +++ b/lib/new-ui/widgets/coins_page/top_bar_widget/sync_bar.dart @@ -2,7 +2,7 @@ import 'package:hash_wallet/core/sync_status_title.dart'; import 'package:hash_wallet/di.dart'; import 'package:hash_wallet/new-ui/widgets/coins_page/top_bar_widget/pulsing_dot.dart'; import 'package:hash_wallet/src/screens/settings/manage_nodes_page.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:cw_core/sync_status.dart'; import 'package:flutter/material.dart'; @@ -53,7 +53,7 @@ class SyncBar extends StatelessWidget { spacing: 6, children: [ if (dashboardViewModel.isTorEnabled) - CakeImageWidget( + HashImageWidget( imageUrl: "assets/new-ui/tor.svg", width: 20, height: 20, @@ -147,14 +147,14 @@ class SyncBar extends StatelessWidget { Widget? _getIcon(BuildContext context, Type status) { if (status == LostConnectionSyncStatus || status == FailedSyncStatus) { - return CakeImageWidget(imageUrl: + return HashImageWidget(imageUrl: "assets/new-ui/offline.svg", colorFilter: ColorFilter.mode(Theme.of(context).colorScheme.error, BlendMode.srcIn), ); } if (failStatuses.contains(status)) { - return CakeImageWidget(imageUrl: + return HashImageWidget(imageUrl: "assets/new-ui/warning.svg", colorFilter: ColorFilter.mode(Theme.of(context).colorScheme.error, BlendMode.srcIn), ); @@ -163,18 +163,18 @@ class SyncBar extends StatelessWidget { final List children = []; if (dashboardViewModel.isTorEnabled) { - children.add(CakeImageWidget(imageUrl:"assets/new-ui/tor_sync.svg", + children.add(HashImageWidget(imageUrl:"assets/new-ui/tor_sync.svg", colorFilter: ColorFilter.mode(Color(0xFF8A38F5), BlendMode.srcIn))); } if (dashboardViewModel.hasMweb) { - children.add(CakeImageWidget(imageUrl: + children.add(HashImageWidget(imageUrl: "assets/new-ui/mweb_sync.svg", colorFilter: ColorFilter.mode(Theme.of(context).colorScheme.onSurfaceVariant, BlendMode.srcIn), )); } if (dashboardViewModel.hasSilentPayments) { - children.add(CakeImageWidget(imageUrl: + children.add(HashImageWidget(imageUrl: "assets/new-ui/silent_sync.svg", colorFilter: ColorFilter.mode(Color(0xFFEFBA5E), BlendMode.srcIn), )); diff --git a/lib/new-ui/widgets/coins_page/unconfirmed_balance_widget.dart b/lib/new-ui/widgets/coins_page/unconfirmed_balance_widget.dart index d5a81353c..8f9b710b4 100644 --- a/lib/new-ui/widgets/coins_page/unconfirmed_balance_widget.dart +++ b/lib/new-ui/widgets/coins_page/unconfirmed_balance_widget.dart @@ -1,7 +1,7 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/widgets/new_primary_button.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -138,7 +138,7 @@ class UnconfirmedBalanceModal extends StatelessWidget { Stack( alignment: Alignment.bottomRight, children: [ - CakeImageWidget(imageUrl: currencyIconPath, height: 100, width: 100), + HashImageWidget(imageUrl: currencyIconPath, height: 100, width: 100), Container( width: 36, height: 36, diff --git a/lib/new-ui/widgets/coins_page/wallet_info.dart b/lib/new-ui/widgets/coins_page/wallet_info.dart index 9ce31ee48..954a03dd1 100644 --- a/lib/new-ui/widgets/coins_page/wallet_info.dart +++ b/lib/new-ui/widgets/coins_page/wallet_info.dart @@ -1,5 +1,5 @@ import 'package:hash_wallet/new-ui/widgets/modern_button.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -46,7 +46,7 @@ class WalletInfoBar extends StatelessWidget { ? const SizedBox.shrink(key: ValueKey("empty")) : Padding( padding: const EdgeInsets.only(right: 8), - child: CakeImageWidget(imageUrl: + child: HashImageWidget(imageUrl: hardwareWalletIcon!, key: ValueKey("hardware_wallet_icon"), width: 24, diff --git a/lib/new-ui/widgets/dropdown_row.dart b/lib/new-ui/widgets/dropdown_row.dart index 821deed1f..f9dd93a5c 100644 --- a/lib/new-ui/widgets/dropdown_row.dart +++ b/lib/new-ui/widgets/dropdown_row.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -37,7 +37,7 @@ class DropdownRow extends StatelessWidget { duration: Duration(milliseconds: 300), turns: expanded ? 0.0 : 0.5, curve: Curves.easeOut, - child: CakeImageWidget( + child: HashImageWidget( imageUrl: "assets/new-ui/dropdown_arrow.svg", colorFilter: diff --git a/lib/new-ui/widgets/keyboard_hide_overlay.dart b/lib/new-ui/widgets/keyboard_hide_overlay.dart index 619292ecc..ab2292789 100644 --- a/lib/new-ui/widgets/keyboard_hide_overlay.dart +++ b/lib/new-ui/widgets/keyboard_hide_overlay.dart @@ -1,6 +1,6 @@ import 'dart:io'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -74,7 +74,7 @@ class _KeyboardHideButtonState extends State { ), child: Padding( padding: const EdgeInsets.all(8.0), - child: CakeImageWidget( + child: HashImageWidget( imageUrl: "assets/new-ui/hide_keyboard.svg", colorFilter: ColorFilter.mode( diff --git a/lib/new-ui/widgets/long_press_menu.dart b/lib/new-ui/widgets/long_press_menu.dart index bf8e8ad63..c04e61693 100644 --- a/lib/new-ui/widgets/long_press_menu.dart +++ b/lib/new-ui/widgets/long_press_menu.dart @@ -1,6 +1,6 @@ import 'dart:ui'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -75,7 +75,7 @@ class _LongPressMenuState extends State { mainAxisAlignment: MainAxisAlignment.start, spacing: 8, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: item.iconPath, height: 20, diff --git a/lib/new-ui/widgets/modal_header.dart b/lib/new-ui/widgets/modal_header.dart index 20f7ac12b..2b1500d8b 100644 --- a/lib/new-ui/widgets/modal_header.dart +++ b/lib/new-ui/widgets/modal_header.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -23,7 +23,7 @@ class ModalHeader extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: iconPath, width: 36, height: 36), Text( title, diff --git a/lib/new-ui/widgets/modern_button.dart b/lib/new-ui/widgets/modern_button.dart index f5b6aa2dc..d536bb27a 100644 --- a/lib/new-ui/widgets/modern_button.dart +++ b/lib/new-ui/widgets/modern_button.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -42,7 +42,7 @@ class ModernButton extends StatelessWidget { final resolvedBackgroundColor = backgroundColor ?? Theme.of(context).colorScheme.surfaceContainer; final Widget resolvedIcon = svgPath != null - ? CakeImageWidget( + ? HashImageWidget( imageUrl: svgPath!, width: resolvedIconSize, height: resolvedIconSize, diff --git a/lib/new-ui/widgets/picker.dart b/lib/new-ui/widgets/picker.dart index 0b01d1502..e19502402 100644 --- a/lib/new-ui/widgets/picker.dart +++ b/lib/new-ui/widgets/picker.dart @@ -2,7 +2,7 @@ import 'dart:io'; import 'package:hash_wallet/new-ui/widgets/new_primary_button.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/new_list_row/new_simple_checkbox.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -217,7 +217,7 @@ class PickerSliderButton extends StatelessWidget { fontSize: 14, color: Theme.of(context).colorScheme.onSurfaceVariant, fontWeight: FontWeight.w400)), - if(isSelected) CakeImageWidget(imageUrl: + if(isSelected) HashImageWidget(imageUrl: "assets/new-ui/arrow_right.svg", colorFilter: ColorFilter.mode(Theme.of(context).colorScheme.primary, BlendMode.srcIn),) @@ -230,7 +230,7 @@ class PickerSliderButton extends StatelessWidget { ], ), isSelected? NewSimpleCheckbox(value: true, onChanged: (val){}): - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: "assets/new-ui/arrow_right.svg", colorFilter: ColorFilter.mode(Theme.of(context).colorScheme.primary, BlendMode.srcIn), diff --git a/lib/new-ui/widgets/receive_page/receive_address_type.dart b/lib/new-ui/widgets/receive_page/receive_address_type.dart index 6a2fd40c0..3ad810dbd 100644 --- a/lib/new-ui/widgets/receive_page/receive_address_type.dart +++ b/lib/new-ui/widgets/receive_page/receive_address_type.dart @@ -1,6 +1,6 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_address_type_selector.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/view_model/dashboard/receive_option_view_model.dart'; import 'package:cw_core/receive_page_option.dart'; import 'package:flutter/material.dart'; @@ -52,7 +52,7 @@ class ReceiveAddressTypeDisplay extends StatelessWidget { spacing: 12.0, children: [ if (iconPath != null) - CakeImageWidget(imageUrl:iconPath, + HashImageWidget(imageUrl:iconPath, width: 24, height: 24, colorFilter: ColorFilter.mode( diff --git a/lib/new-ui/widgets/receive_page/receive_address_type_selector.dart b/lib/new-ui/widgets/receive_page/receive_address_type_selector.dart index bdd7e4770..10212ea3f 100644 --- a/lib/new-ui/widgets/receive_page/receive_address_type_selector.dart +++ b/lib/new-ui/widgets/receive_page/receive_address_type_selector.dart @@ -1,6 +1,6 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/rounded_checkbox.dart'; import 'package:hash_wallet/src/widgets/section_divider.dart'; import 'package:hash_wallet/view_model/dashboard/receive_option_view_model.dart'; @@ -160,7 +160,7 @@ class _ReceiveAddressTypeSelectorState extends State ReceiveAddressTypeSelector.otherOptionsExpandDuration, turns: _otherOptionsExpanded ? 0.0 : 0.5, curve: Curves.easeOut, - child: CakeImageWidget(imageUrl:"assets/new-ui/dropdown_arrow.svg")) + child: HashImageWidget(imageUrl:"assets/new-ui/dropdown_arrow.svg")) ], ), ), @@ -280,7 +280,7 @@ class ReceiveAddressTypeRow extends StatelessWidget { Row( children: [ if (iconPath != null) - CakeImageWidget(imageUrl:iconPath!, width: iconSize, height: iconSize,colorFilter: ColorFilter.mode(Theme.of(context).colorScheme.onSurfaceVariant,BlendMode.srcIn),) + HashImageWidget(imageUrl:iconPath!, width: iconSize, height: iconSize,colorFilter: ColorFilter.mode(Theme.of(context).colorScheme.onSurfaceVariant,BlendMode.srcIn),) else Container(width: iconSize, height: iconSize), Padding( diff --git a/lib/new-ui/widgets/receive_page/receive_amount_modal.dart b/lib/new-ui/widgets/receive_page/receive_amount_modal.dart index 169ab7f83..2c7898e33 100644 --- a/lib/new-ui/widgets/receive_page/receive_amount_modal.dart +++ b/lib/new-ui/widgets/receive_page/receive_amount_modal.dart @@ -3,7 +3,7 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/widgets/new_primary_button.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; import 'package:hash_wallet/src/screens/exchange/widgets/currency_picker.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/utils/show_pop_up.dart'; import 'package:hash_wallet/view_model/wallet_address_list/wallet_address_list_view_model.dart'; import 'package:cw_core/crypto_currency.dart'; @@ -101,7 +101,7 @@ class _ReceiveAmountModalState extends State { ), RotatedBox( quarterTurns: 2, - child: CakeImageWidget(imageUrl:"assets/new-ui/dropdown_arrow.svg")) + child: HashImageWidget(imageUrl:"assets/new-ui/dropdown_arrow.svg")) ], ), ), diff --git a/lib/new-ui/widgets/receive_page/receive_info_box.dart b/lib/new-ui/widgets/receive_page/receive_info_box.dart index 0cba70951..085d33166 100644 --- a/lib/new-ui/widgets/receive_page/receive_info_box.dart +++ b/lib/new-ui/widgets/receive_page/receive_info_box.dart @@ -2,7 +2,7 @@ import 'dart:math'; import 'package:hash_wallet/entities/auto_generate_subaddress_status.dart'; import 'package:hash_wallet/generated/i18n.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/material.dart'; @@ -63,7 +63,7 @@ class ReceiveInfoBox extends StatelessWidget { spacing: 10, children: [ if(iconPath.isNotEmpty) - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: iconPath, width: 16, height: 16, @@ -130,7 +130,7 @@ class InfoboxCurrencyRow extends StatelessWidget { return Row( spacing: 8, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: chainIconPath, width: 20, height: 20, @@ -174,7 +174,7 @@ class InfoboxCurrencyRow extends StatelessWidget { color: Theme.of(context).colorScheme.surfaceContainer, width: iconBorder), borderRadius: BorderRadius.circular(9999999)), - child: CakeImageWidget( + child: HashImageWidget( imageUrl: entry.value.iconPath, width: 24, height: 24, diff --git a/lib/new-ui/widgets/receive_page/receive_label_widget.dart b/lib/new-ui/widgets/receive_page/receive_label_widget.dart index fcaad05dd..44dda7442 100644 --- a/lib/new-ui/widgets/receive_page/receive_label_widget.dart +++ b/lib/new-ui/widgets/receive_page/receive_label_widget.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -23,7 +23,7 @@ class ReceiveLabelWidget extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ ClipRect( - child: CakeImageWidget(imageUrl:"assets/new-ui/label.svg", + child: HashImageWidget(imageUrl:"assets/new-ui/label.svg", width: 24, height: 24, colorFilter: ColorFilter.mode( diff --git a/lib/new-ui/widgets/receive_page/receive_large_amount_preview.dart b/lib/new-ui/widgets/receive_page/receive_large_amount_preview.dart index 6f4bff6fa..9d0c94e9b 100644 --- a/lib/new-ui/widgets/receive_page/receive_large_amount_preview.dart +++ b/lib/new-ui/widgets/receive_page/receive_large_amount_preview.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -30,7 +30,7 @@ class ReceiveLargeAmountPreview extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, spacing: 12, children: [ - CakeImageWidget(imageUrl:"assets/new-ui/send.svg", + HashImageWidget(imageUrl:"assets/new-ui/send.svg", width: 24, height: 24, colorFilter: ColorFilter.mode( diff --git a/lib/new-ui/widgets/receive_page/receive_qr_code.dart b/lib/new-ui/widgets/receive_page/receive_qr_code.dart index 5bd8b824b..cdfae79c8 100644 --- a/lib/new-ui/widgets/receive_page/receive_qr_code.dart +++ b/lib/new-ui/widgets/receive_page/receive_qr_code.dart @@ -1,6 +1,6 @@ import 'package:hash_wallet/di.dart'; import 'package:hash_wallet/generated/i18n.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/themes/core/theme_store.dart'; import 'package:hash_wallet/view_model/wallet_address_list/wallet_address_list_view_model.dart'; import 'package:cw_core/crypto_currency.dart'; @@ -42,10 +42,10 @@ class ReceiveQrCode extends StatelessWidget { child: AnimatedOpacity( duration: animDuration, opacity: largeQrMode ? 1 : 0, - child: CakeImageWidget(imageUrl: + child: HashImageWidget(imageUrl: isLightMode - ? "assets/new-ui/cakewallet-wordmark-light.svg" - : "assets/new-ui/cakewallet-wordmark.svg", + ? "assets/new-ui/hash-wordmark-light.svg" + : "assets/new-ui/hash-wordmark.svg", height: 45, )), ), @@ -116,7 +116,7 @@ class ReceiveQrCode extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, spacing: 4, children: [ - CakeImageWidget(imageUrl:"assets/new-ui/payjoin.svg"), + HashImageWidget(imageUrl:"assets/new-ui/payjoin.svg"), Text(S.of(context).payjoin_enabled) ], ), diff --git a/lib/new-ui/widgets/receive_page/receive_token_display.dart b/lib/new-ui/widgets/receive_page/receive_token_display.dart index 4c7fb6588..909f54a29 100644 --- a/lib/new-ui/widgets/receive_page/receive_token_display.dart +++ b/lib/new-ui/widgets/receive_page/receive_token_display.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/view_model/wallet_address_list/wallet_address_list_view_model.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/material.dart'; @@ -33,7 +33,7 @@ class ReceiveTokenDisplay extends StatelessWidget { child: Row( spacing:4, children: [ - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: "assets/new-ui/chain_badges/${walletTypeToString(addressListViewModel.wallet.type).toLowerCase()}.svg", width: 16, height: 16, diff --git a/lib/new-ui/widgets/send_page/floating_icon_button.dart b/lib/new-ui/widgets/send_page/floating_icon_button.dart index 8c67b049b..dc8052c3b 100644 --- a/lib/new-ui/widgets/send_page/floating_icon_button.dart +++ b/lib/new-ui/widgets/send_page/floating_icon_button.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -18,7 +18,7 @@ class FloatingIconButton extends StatelessWidget { onTap: onPressed, child: Padding( padding: const EdgeInsets.all(4.0), - child: CakeImageWidget(imageUrl:iconPath, + child: HashImageWidget(imageUrl:iconPath, width: 22, height: 22, colorFilter: ColorFilter.mode(Theme .of(context) diff --git a/lib/new-ui/widgets/send_page/l2_action_wallet_selector.dart b/lib/new-ui/widgets/send_page/l2_action_wallet_selector.dart index 53aeae380..96772e053 100644 --- a/lib/new-ui/widgets/send_page/l2_action_wallet_selector.dart +++ b/lib/new-ui/widgets/send_page/l2_action_wallet_selector.dart @@ -7,7 +7,7 @@ import 'package:hash_wallet/new-ui/widgets/new_primary_button.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; import 'package:hash_wallet/new-ui/widgets/send_page/l2_send_external_modal.dart'; import 'package:hash_wallet/new-ui/widgets/send_page/send_address_input.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/new_list_row/new_simple_checkbox.dart'; import 'package:hash_wallet/view_model/contact_list/contact_list_view_model.dart'; import 'package:hash_wallet/view_model/send/send_view_model.dart'; @@ -252,7 +252,7 @@ class _L2ActionWalletSelectorState extends State { mainAxisAlignment: MainAxisAlignment.center, spacing: 10, children: [ - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: "assets/new-ui/send_from_external.svg", colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.primary, BlendMode.srcIn), diff --git a/lib/new-ui/widgets/send_page/l2_send_external_modal.dart b/lib/new-ui/widgets/send_page/l2_send_external_modal.dart index 88ff88291..536bcad49 100644 --- a/lib/new-ui/widgets/send_page/l2_send_external_modal.dart +++ b/lib/new-ui/widgets/send_page/l2_send_external_modal.dart @@ -3,7 +3,7 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/widgets/new_primary_button.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; import 'package:hash_wallet/src/screens/receive/widgets/qr_image.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/utils/address_formatter.dart'; import 'package:hash_wallet/view_model/send/send_view_model.dart'; import 'package:cw_core/payment_uris.dart'; @@ -66,7 +66,7 @@ class _L2SendExternalModalState extends State { spacing: 12, children: [ if(widget.sendViewModel.walletType == WalletType.bitcoin) - CakeImageWidget(imageUrl:"assets/new-ui/lightning_deposit_help.svg", height: 36), + HashImageWidget(imageUrl:"assets/new-ui/lightning_deposit_help.svg", height: 36), Text( S.of(context).bitcoin_lightning_deposit, style: TextStyle(fontWeight: FontWeight.w500, fontSize: 20), diff --git a/lib/new-ui/widgets/send_page/send_amount_input.dart b/lib/new-ui/widgets/send_page/send_amount_input.dart index fa6ea3cf6..38f75b630 100644 --- a/lib/new-ui/widgets/send_page/send_amount_input.dart +++ b/lib/new-ui/widgets/send_page/send_amount_input.dart @@ -1,5 +1,5 @@ import 'package:hash_wallet/new-ui/widgets/send_page/floating_icon_button.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -109,10 +109,10 @@ class _NewSendAmountInputState extends State { spacing: 8, children: [ if (widget.hasPicker && widget.currencyIconPath.isNotEmpty) - CakeImageWidget(imageUrl: widget.currencyIconPath, width: 24, height: 24), + HashImageWidget(imageUrl: widget.currencyIconPath, width: 24, height: 24), Text(widget.currency), if (widget.hasPicker) - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: "assets/new-ui/chooser.svg", width: 12, height: 12, diff --git a/lib/new-ui/widgets/send_page/send_confirm_bottom_widget.dart b/lib/new-ui/widgets/send_page/send_confirm_bottom_widget.dart index 9a411afa3..4a845a9d8 100644 --- a/lib/new-ui/widgets/send_page/send_confirm_bottom_widget.dart +++ b/lib/new-ui/widgets/send_page/send_confirm_bottom_widget.dart @@ -2,7 +2,7 @@ import 'package:hash_wallet/core/execution_state.dart'; import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/widgets/confirm_swiper.dart'; import 'package:hash_wallet/new-ui/widgets/new_primary_button.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/view_model/send/send_view_model.dart'; import 'package:hash_wallet/view_model/send/send_view_model_state.dart'; import 'package:cw_core/wallet_info.dart'; @@ -122,7 +122,7 @@ class TransactionErrorActions extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, spacing: 8, children: [ - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: "assets/new-ui/warning.svg", height: 24, width: 24, @@ -193,7 +193,7 @@ class HardwareWalletConfirmationMessage extends StatelessWidget { padding: const EdgeInsets.all(12.0), child: Column(spacing: 8, children: [ if (hardwareWalletIcon != null) - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: hardwareWalletIcon!, width: 36, height: 36, diff --git a/lib/new-ui/widgets/send_page/send_confirm_sheet.dart b/lib/new-ui/widgets/send_page/send_confirm_sheet.dart index 7cdb85692..43353067a 100644 --- a/lib/new-ui/widgets/send_page/send_confirm_sheet.dart +++ b/lib/new-ui/widgets/send_page/send_confirm_sheet.dart @@ -6,7 +6,7 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/widgets/animated_dropdown.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; import 'package:hash_wallet/new-ui/widgets/send_page/send_confirm_bottom_widget.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/utils/address_formatter.dart'; import 'package:hash_wallet/view_model/send/send_view_model.dart'; import 'package:hash_wallet/view_model/send/send_view_model_state.dart'; @@ -119,7 +119,7 @@ class SendTransactionDetails extends StatelessWidget { spacing: 8, children: [ if (resolvedIconPath.toLowerCase().endsWith(".svg")) - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: resolvedIconPath, width: 28, height: 28, @@ -418,7 +418,7 @@ class TransactionCommitedScreen extends StatelessWidget { S.of(context).transaction_sent_new, style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600), ), - Image.asset(width: 256, height: 256, "assets/images/birthday_cake.png") + Image.asset(width: 256, height: 256, "assets/images/hash_bag.png") ], ), ); diff --git a/lib/new-ui/widgets/swap_page/refund_address_modal.dart b/lib/new-ui/widgets/swap_page/refund_address_modal.dart index 9a3a38d4b..81c926274 100644 --- a/lib/new-ui/widgets/swap_page/refund_address_modal.dart +++ b/lib/new-ui/widgets/swap_page/refund_address_modal.dart @@ -2,7 +2,7 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/widgets/new_primary_button.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; import 'package:hash_wallet/new-ui/widgets/send_page/send_address_input.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -52,7 +52,7 @@ class _RefundAddressModalState extends State { child: Column( spacing: 24, children: [ - CakeImageWidget( + HashImageWidget( imageUrl:"assets/new-ui/refund_address.svg", colorFilter: ColorFilter.mode(Theme.of(context).colorScheme.primary, BlendMode.srcIn), diff --git a/lib/new-ui/widgets/swap_page/swap_address_selection_modal.dart b/lib/new-ui/widgets/swap_page/swap_address_selection_modal.dart index 2ffa70108..62fc54afa 100644 --- a/lib/new-ui/widgets/swap_page/swap_address_selection_modal.dart +++ b/lib/new-ui/widgets/swap_page/swap_address_selection_modal.dart @@ -1,7 +1,7 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; import 'package:hash_wallet/new-ui/widgets/send_page/send_address_input.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/new_list_row/new_simple_checkbox.dart'; import 'package:hash_wallet/view_model/exchange/exchange_view_model.dart'; import 'package:cw_core/currency_for_wallet_type.dart'; @@ -153,7 +153,7 @@ class _SwapAddressSelectionModalState extends State { mainAxisAlignment: MainAxisAlignment.center, spacing: 10, children: [ - CakeImageWidget(imageUrl:"assets/new-ui/send_from_external.svg", + HashImageWidget(imageUrl:"assets/new-ui/send_from_external.svg", colorFilter: ColorFilter.mode( Theme.of(context).colorScheme.primary, BlendMode.srcIn)), Text(S.of(context).send_from_external, @@ -272,7 +272,7 @@ class _SwapAddressSelectionModalRowState extends State + HashImageWidget(imageUrl: image); + @override bool get gradientBackground => true; @@ -56,7 +62,7 @@ abstract class InfoPage extends BasePage { ), child: AspectRatio( aspectRatio: 0.9, - child: CakeImageWidget(imageUrl: image), + child: buildIllustration(context, image), ), ), ), diff --git a/lib/src/screens/buy/buy_sell_page.dart b/lib/src/screens/buy/buy_sell_page.dart index a39267c03..9e55fdeaa 100644 --- a/lib/src/screens/buy/buy_sell_page.dart +++ b/lib/src/screens/buy/buy_sell_page.dart @@ -436,7 +436,7 @@ class BuySellPage extends BasePage { currencies: buySellViewModel.cryptoCurrencies, onCurrencySelected: (currency) => buySellViewModel.changeCryptoCurrency(currency: currency), imageArrow: Image.asset( - 'assets/images/arrow_bottom_cake_green.png', + 'assets/images/arrow_bottom_green.png', color: Theme.of(context).colorScheme.primary, height: 8, ), diff --git a/lib/src/screens/contact/contact_list_page.dart b/lib/src/screens/contact/contact_list_page.dart index 93eeb99df..8b50704b2 100644 --- a/lib/src/screens/contact/contact_list_page.dart +++ b/lib/src/screens/contact/contact_list_page.dart @@ -8,7 +8,7 @@ import 'package:hash_wallet/src/screens/base_page.dart'; import 'package:hash_wallet/src/screens/dashboard/widgets/filter_list_widget.dart'; import 'package:hash_wallet/src/screens/wallet_list/filtered_list.dart'; import 'package:hash_wallet/src/widgets/alert_with_two_actions.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/gradient_background.dart'; import 'package:hash_wallet/src/widgets/standard_list.dart'; import 'package:hash_wallet/utils/address_formatter.dart'; @@ -283,7 +283,7 @@ class _ContactPageBodyState extends State with SingleTickerProv Widget _buildCurrencyIcon(ContactBase contact) { final image = contact.type.iconPath; return image != null - ? CakeImageWidget(imageUrl: image, height: 24, width: 24) + ? HashImageWidget(imageUrl: image, height: 24, width: 24) : const SizedBox(height: 24, width: 24); } } diff --git a/lib/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu_item.dart b/lib/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu_item.dart index 344911b39..eae55f618 100644 --- a/lib/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu_item.dart +++ b/lib/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu_item.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; class SideMenuItem extends StatelessWidget { @@ -47,7 +47,7 @@ class SideMenuItem extends StatelessWidget { color: _setColor(context), size: 30, ) - : CakeImageWidget( + : HashImageWidget( imageUrl: imagePath ?? '', fit: BoxFit.cover, height: 30, diff --git a/lib/src/screens/dashboard/edit_token_page.dart b/lib/src/screens/dashboard/edit_token_page.dart index 335ce123e..5887182fc 100644 --- a/lib/src/screens/dashboard/edit_token_page.dart +++ b/lib/src/screens/dashboard/edit_token_page.dart @@ -5,7 +5,7 @@ import 'package:hash_wallet/src/widgets/address_text_field.dart'; import 'package:hash_wallet/src/widgets/alert_with_one_action.dart'; import 'package:hash_wallet/src/widgets/alert_with_two_actions.dart'; import 'package:hash_wallet/src/widgets/base_text_form_field.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/checkbox_widget.dart'; import 'package:hash_wallet/src/widgets/primary_button.dart'; import 'package:hash_wallet/src/widgets/scrollable_with_bottom_section.dart'; @@ -394,7 +394,7 @@ class _EditTokenPageBodyState extends State { alignment: Alignment.center, children: [ ClipOval( - child: CakeImageWidget( + child: HashImageWidget( imageUrl: _tokenIconPathController.text, width: 75, height: 75, diff --git a/lib/src/screens/dashboard/home_settings_page.dart b/lib/src/screens/dashboard/home_settings_page.dart index 728f7e7d2..dfdad7f7e 100644 --- a/lib/src/screens/dashboard/home_settings_page.dart +++ b/lib/src/screens/dashboard/home_settings_page.dart @@ -11,7 +11,7 @@ import 'package:hash_wallet/src/screens/base_page.dart'; import 'package:hash_wallet/src/screens/dashboard/favorite_token_modal.dart'; import 'package:hash_wallet/src/screens/settings/widgets/settings_cell_with_arrow.dart'; import 'package:hash_wallet/src/widgets/base_text_form_field.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/screens/settings/widgets/settings_picker_cell.dart'; import 'package:hash_wallet/src/screens/settings/widgets/settings_switcher_cell.dart'; import 'package:hash_wallet/src/widgets/new_list_row/new_list_section.dart'; @@ -189,7 +189,7 @@ class HomeSettingsPage extends BasePage { leading: Container( clipBehavior: Clip.hardEdge, decoration: BoxDecoration(shape: BoxShape.circle), - child: CakeImageWidget( + child: HashImageWidget( imageUrl: token.iconPath, height: 40, width: 40, diff --git a/lib/src/screens/dashboard/pages/address_page.dart b/lib/src/screens/dashboard/pages/address_page.dart index 5c90c2f6c..b6f03fe7b 100644 --- a/lib/src/screens/dashboard/pages/address_page.dart +++ b/lib/src/screens/dashboard/pages/address_page.dart @@ -5,7 +5,7 @@ import 'package:hash_wallet/src/screens/base_page.dart'; import 'package:hash_wallet/anonpay/anonpay_donation_link_info.dart'; import 'package:hash_wallet/entities/preferences_key.dart'; import 'package:hash_wallet/src/screens/receive/anonpay_receive_page.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:cw_core/receive_page_option.dart'; import 'package:hash_wallet/src/screens/dashboard/widgets/present_receive_option_picker.dart'; import 'package:hash_wallet/src/widgets/gradient_background.dart'; @@ -182,7 +182,7 @@ class AddressPage extends BasePage { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: addressListViewModel.monoImage, height: 16, width: 16, @@ -230,7 +230,7 @@ class AddressPage extends BasePage { borderRadius: BorderRadius.circular(24), ), child: ClipOval( - child: CakeImageWidget( + child: HashImageWidget( height: 35, width: 35, imageUrl: walletImages[i], diff --git a/lib/src/screens/dashboard/pages/balance/balance_row_widget.dart b/lib/src/screens/dashboard/pages/balance/balance_row_widget.dart index 7374234b3..0bb1b6f1f 100644 --- a/lib/src/screens/dashboard/pages/balance/balance_row_widget.dart +++ b/lib/src/screens/dashboard/pages/balance/balance_row_widget.dart @@ -5,7 +5,7 @@ import 'package:hash_wallet/bitcoin/bitcoin.dart'; import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/routes.dart'; import 'package:hash_wallet/src/screens/exchange_trade/information_page.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/themes/core/theme_extension.dart'; import 'package:hash_wallet/utils/payment_request.dart'; import 'package:hash_wallet/utils/show_pop_up.dart'; @@ -179,7 +179,7 @@ class BalanceRowWidget extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.end, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: currency.iconPath, height: 40, width: 40, diff --git a/lib/src/screens/dashboard/pages/cake_features_page.dart b/lib/src/screens/dashboard/pages/cake_features_page.dart index 7fad8b2cc..d33998c2d 100644 --- a/lib/src/screens/dashboard/pages/cake_features_page.dart +++ b/lib/src/screens/dashboard/pages/cake_features_page.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/widgets/apps_widget.dart'; import 'package:hash_wallet/routes.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/dashboard_card_widget.dart'; import 'package:hash_wallet/utils/feature_flag.dart'; import 'package:hash_wallet/view_model/dashboard/cake_features_view_model.dart'; diff --git a/lib/src/screens/dashboard/pages/nft_details_page.dart b/lib/src/screens/dashboard/pages/nft_details_page.dart index 4f108404f..8030c0490 100644 --- a/lib/src/screens/dashboard/pages/nft_details_page.dart +++ b/lib/src/screens/dashboard/pages/nft_details_page.dart @@ -4,7 +4,7 @@ import 'package:hash_wallet/entities/wallet_nft_response.dart'; import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/src/screens/base_page.dart'; import 'package:hash_wallet/src/screens/dashboard/widgets/menu_widget.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/gradient_background.dart'; import 'package:hash_wallet/view_model/dashboard/dashboard_view_model.dart'; @@ -102,7 +102,7 @@ class _NFTImageWidget extends StatelessWidget { ), color: Theme.of(context).colorScheme.surface, ), - child: CakeImageWidget(imageUrl: imageUrl), + child: HashImageWidget(imageUrl: imageUrl), ); } } diff --git a/lib/src/screens/dashboard/widgets/info_card.dart b/lib/src/screens/dashboard/widgets/info_card.dart index a9660c21d..c605dcdb0 100644 --- a/lib/src/screens/dashboard/widgets/info_card.dart +++ b/lib/src/screens/dashboard/widgets/info_card.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/dashboard_card_widget.dart'; import 'package:flutter/material.dart'; @@ -86,7 +86,7 @@ class InfoCard extends StatelessWidget { color: Theme.of(context).colorScheme.surfaceContainer, shape: BoxShape.circle, ), - child: CakeImageWidget( + child: HashImageWidget( imageUrl: image, height: 40, width: 40, diff --git a/lib/src/screens/dashboard/widgets/new_main_navbar_widget.dart b/lib/src/screens/dashboard/widgets/new_main_navbar_widget.dart index 033b7167a..40446be6c 100644 --- a/lib/src/screens/dashboard/widgets/new_main_navbar_widget.dart +++ b/lib/src/screens/dashboard/widgets/new_main_navbar_widget.dart @@ -1,6 +1,6 @@ import 'dart:io'; import 'dart:ui'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -220,7 +220,7 @@ class _NEWNewMainNavBarState extends State { builder: (context, value, child) { return Container( height: NewMainNavBar.barHeight, - child: CakeImageWidget(imageUrl: + child: HashImageWidget(imageUrl: visibleActions[i].image, width: iconWidth, height: iconHeight, diff --git a/lib/src/screens/dashboard/widgets/nft_tile_widget.dart b/lib/src/screens/dashboard/widgets/nft_tile_widget.dart index 8d9e3c1b4..2212a1006 100644 --- a/lib/src/screens/dashboard/widgets/nft_tile_widget.dart +++ b/lib/src/screens/dashboard/widgets/nft_tile_widget.dart @@ -1,7 +1,7 @@ import 'package:hash_wallet/entities/wallet_nft_response.dart'; import 'package:hash_wallet/routes.dart'; import 'package:hash_wallet/src/screens/dashboard/pages/nft_details_page.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; class NFTTileWidget extends StatelessWidget { @@ -45,7 +45,7 @@ class NFTTileWidget extends StatelessWidget { ), color: Theme.of(context).colorScheme.surface, ), - child: CakeImageWidget( + child: HashImageWidget( imageUrl: nftAsset.normalizedMetadata?.imageUrl, ), ), diff --git a/lib/src/screens/dashboard/widgets/solana_nft_tile_widget.dart b/lib/src/screens/dashboard/widgets/solana_nft_tile_widget.dart index 93ed72519..eabca25b7 100644 --- a/lib/src/screens/dashboard/widgets/solana_nft_tile_widget.dart +++ b/lib/src/screens/dashboard/widgets/solana_nft_tile_widget.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:hash_wallet/entities/solana_nft_asset_model.dart'; import 'package:hash_wallet/routes.dart'; import 'package:hash_wallet/src/screens/dashboard/pages/nft_details_page.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; class SolanaNFTTileWidget extends StatelessWidget { const SolanaNFTTileWidget({super.key, required this.nftAsset}); @@ -49,7 +49,7 @@ class SolanaNFTTileWidget extends StatelessWidget { ), color: Theme.of(context).colorScheme.surface, ), - child: CakeImageWidget( + child: HashImageWidget( imageUrl: nftAsset.imageOriginalUrl, ), ), diff --git a/lib/src/screens/exchange/exchange_template_page.dart b/lib/src/screens/exchange/exchange_template_page.dart index ef3879055..35325fde2 100644 --- a/lib/src/screens/exchange/exchange_template_page.dart +++ b/lib/src/screens/exchange/exchange_template_page.dart @@ -49,7 +49,7 @@ class ExchangeTemplatePage extends BasePage { height: 8, ); final arrowBottomCakeGreen = Image.asset( - 'assets/images/arrow_bottom_cake_green.png', + 'assets/images/arrow_bottom_green.png', color: Theme.of(context).colorScheme.primary, height: 8, ); diff --git a/lib/src/screens/exchange_trade/exchange_trade_page.dart b/lib/src/screens/exchange_trade/exchange_trade_page.dart index c978625f4..28b160ec6 100644 --- a/lib/src/screens/exchange_trade/exchange_trade_page.dart +++ b/lib/src/screens/exchange_trade/exchange_trade_page.dart @@ -363,7 +363,7 @@ class ExchangeTradeState extends State { return InfoBottomSheet( footerType: FooterType.singleActionButton, titleText: S.of(bottomSheetContext).transaction_sent, - contentImage: 'assets/images/birthday_cake.png', + contentImage: 'assets/images/hash_bag.png', singleActionButtonText: S.of(bottomSheetContext).close, singleActionButtonKey: ValueKey('send_page_sent_dialog_ok_button_key'), onSingleActionButtonPressed: () { diff --git a/lib/src/screens/integrations/deuro/savings_page.dart b/lib/src/screens/integrations/deuro/savings_page.dart index bb2a9e3a6..e4f0c1734 100644 --- a/lib/src/screens/integrations/deuro/savings_page.dart +++ b/lib/src/screens/integrations/deuro/savings_page.dart @@ -277,7 +277,7 @@ class DEuroSavingsPage extends BasePage { builder: (BuildContext bottomSheetContext) => InfoBottomSheet( footerType: FooterType.singleActionButton, titleText: S.of(bottomSheetContext).transaction_sent, - contentImage: 'assets/images/birthday_cake.png', + contentImage: 'assets/images/hash_bag.png', content: S.of(bottomSheetContext).deuro_tx_commited_content, singleActionButtonText: S.of(bottomSheetContext).close, singleActionButtonKey: ValueKey('send_page_sent_dialog_ok_button_key'), diff --git a/lib/src/screens/integrations/deuro/widgets/savings_card_widget.dart b/lib/src/screens/integrations/deuro/widgets/savings_card_widget.dart index fdebd2bfd..5a7236822 100644 --- a/lib/src/screens/integrations/deuro/widgets/savings_card_widget.dart +++ b/lib/src/screens/integrations/deuro/widgets/savings_card_widget.dart @@ -3,7 +3,7 @@ import 'dart:math'; import 'package:auto_size_text/auto_size_text.dart'; import 'package:hash_wallet/entities/fiat_currency.dart'; import 'package:hash_wallet/generated/i18n.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/themes/core/theme_extension.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:flutter/cupertino.dart'; @@ -268,7 +268,7 @@ class SavingsCard extends StatelessWidget { child: Center( child: Column( children: [ - CakeImageWidget( + HashImageWidget( imageUrl: currency.iconPath, height: 40, width: 40, diff --git a/lib/src/screens/new_wallet/new_wallet_page.dart b/lib/src/screens/new_wallet/new_wallet_page.dart index f09988874..098b29459 100644 --- a/lib/src/screens/new_wallet/new_wallet_page.dart +++ b/lib/src/screens/new_wallet/new_wallet_page.dart @@ -9,7 +9,7 @@ import 'package:hash_wallet/src/screens/base_page.dart'; import 'package:hash_wallet/src/screens/new_wallet/widgets/select_button.dart'; import 'package:hash_wallet/src/widgets/alert_with_one_action.dart'; import 'package:hash_wallet/src/widgets/base_text_form_field.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/gradient_background.dart'; import 'package:hash_wallet/src/widgets/picker.dart'; import 'package:hash_wallet/src/widgets/primary_button.dart'; @@ -157,7 +157,7 @@ class _WalletNameFormState extends State { child: AspectRatio( aspectRatio: aspectRatioImage, child: FittedBox( - child: CakeImageWidget(imageUrl: widget.walletImage), + child: HashImageWidget(imageUrl: widget.walletImage), fit: BoxFit.contain, ), ), diff --git a/lib/src/screens/new_wallet/new_wallet_type_page.dart b/lib/src/screens/new_wallet/new_wallet_type_page.dart index 0ded60cab..13678a8b6 100644 --- a/lib/src/screens/new_wallet/new_wallet_type_page.dart +++ b/lib/src/screens/new_wallet/new_wallet_type_page.dart @@ -7,7 +7,7 @@ import 'package:hash_wallet/reactions/wallet_utils.dart'; import 'package:hash_wallet/routes.dart'; import 'package:hash_wallet/src/screens/base_page.dart'; import 'package:hash_wallet/src/screens/new_wallet/widgets/select_button.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/primary_button.dart'; import 'package:hash_wallet/src/widgets/scrollable_with_bottom_section.dart'; import 'package:hash_wallet/src/widgets/search_bar_widget.dart'; @@ -135,7 +135,7 @@ class WalletTypeFormState extends State { padding: EdgeInsets.only(top: 12), child: SelectButton( key: ValueKey('new_wallet_type_${type.name}_button_key'), - image: CakeImageWidget( + image: HashImageWidget( imageUrl: getCryptoCurrencyIconForWalletListItem(type), height: 24, width: 24, diff --git a/lib/src/screens/new_wallet/wallet_group_description_page.dart b/lib/src/screens/new_wallet/wallet_group_description_page.dart index ebfa482d1..36f072c92 100644 --- a/lib/src/screens/new_wallet/wallet_group_description_page.dart +++ b/lib/src/screens/new_wallet/wallet_group_description_page.dart @@ -1,5 +1,5 @@ import 'package:hash_wallet/core/new_wallet_arguments.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/gradient_background.dart'; import 'package:hash_wallet/src/widgets/primary_button.dart'; import 'package:cw_core/wallet_type.dart'; @@ -31,7 +31,7 @@ class WalletGroupDescriptionPage extends BasePage { child: Column( children: [ SizedBox(height: 48), - CakeImageWidget( + HashImageWidget( imageUrl: currentTheme.isDark ? 'assets/new-ui/hero/wallet_group_options_dark.svg' : 'assets/new-ui/hero/wallet_group_options_light.svg', diff --git a/lib/src/screens/new_wallet/wallet_group_display_page.dart b/lib/src/screens/new_wallet/wallet_group_display_page.dart index c10f40611..cc9049051 100644 --- a/lib/src/screens/new_wallet/wallet_group_display_page.dart +++ b/lib/src/screens/new_wallet/wallet_group_display_page.dart @@ -3,7 +3,7 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/routes.dart'; import 'package:hash_wallet/src/screens/base_page.dart'; import 'package:hash_wallet/src/screens/new_wallet/widgets/grouped_wallet_expansion_tile.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/primary_button.dart'; import 'package:hash_wallet/themes/core/material_base_theme.dart'; import 'package:hash_wallet/view_model/wallet_groups_display_view_model.dart'; @@ -94,7 +94,7 @@ class WalletGroupsDisplayBody extends StatelessWidget { title: wallet.name, isSelected: walletGroupsDisplayViewModel.selectedSingleWallet == wallet, - leadingWidget: CakeImageWidget( + leadingWidget: HashImageWidget( imageUrl: getCryptoCurrencyIconForWalletListItem(wallet.type), width: 32, height: 32, @@ -168,7 +168,7 @@ class WalletGroupEmptyStateWidget extends StatelessWidget { Widget build(BuildContext context) { return Column( children: [ - CakeImageWidget( + HashImageWidget( imageUrl: currentTheme.isDark ? 'assets/new-ui/hero/wallet_group_empty_dark.svg' : 'assets/new-ui/hero/wallet_group_empty_light.svg', diff --git a/lib/src/screens/new_wallet/wallet_group_existing_seed_description_page.dart b/lib/src/screens/new_wallet/wallet_group_existing_seed_description_page.dart index 89f1af32a..9bf128245 100644 --- a/lib/src/screens/new_wallet/wallet_group_existing_seed_description_page.dart +++ b/lib/src/screens/new_wallet/wallet_group_existing_seed_description_page.dart @@ -1,7 +1,7 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/routes.dart'; import 'package:hash_wallet/src/screens/base_page.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/gradient_background.dart'; import 'package:hash_wallet/src/widgets/primary_button.dart'; import 'package:flutter/material.dart'; @@ -33,7 +33,7 @@ class WalletGroupExistingSeedDescriptionPage extends BasePage { padding: EdgeInsets.all(24), child: Column( children: [ - CakeImageWidget( + HashImageWidget( imageUrl: currentTheme.isDark ? walletGroupConfirmedImageDark : walletGroupConfirmedImageLight, height: 200 ), diff --git a/lib/src/screens/new_wallet/widgets/grouped_wallet_expansion_tile.dart b/lib/src/screens/new_wallet/widgets/grouped_wallet_expansion_tile.dart index 2856630d3..9c8e2bdb5 100644 --- a/lib/src/screens/new_wallet/widgets/grouped_wallet_expansion_tile.dart +++ b/lib/src/screens/new_wallet/widgets/grouped_wallet_expansion_tile.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:cw_core/currency_for_wallet_type.dart'; import 'package:flutter/material.dart'; import 'package:hash_wallet/view_model/wallet_list/wallet_list_item.dart'; @@ -129,7 +129,7 @@ class GroupedWalletExpansionTile extends StatelessWidget { ) : SizedBox(width: 7), SizedBox(width: 24), - CakeImageWidget( + HashImageWidget( imageUrl: getCryptoCurrencyIconForWalletListItem(item.type), width: 32, height: 32, diff --git a/lib/src/screens/nodes/node_create_or_edit_page.dart b/lib/src/screens/nodes/node_create_or_edit_page.dart index ce7f740f7..95078ac28 100644 --- a/lib/src/screens/nodes/node_create_or_edit_page.dart +++ b/lib/src/screens/nodes/node_create_or_edit_page.dart @@ -5,7 +5,7 @@ import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; import 'package:hash_wallet/src/screens/nodes/widgets/node_form.dart'; import 'package:hash_wallet/src/widgets/alert_with_one_action.dart'; import 'package:hash_wallet/src/widgets/alert_with_two_actions.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/primary_button.dart'; import 'package:hash_wallet/src/widgets/scrollable_with_bottom_section.dart'; import 'package:hash_wallet/utils/show_pop_up.dart'; @@ -90,7 +90,7 @@ class _NodeCreateOrEditPageState extends State { title: widget.editingNode != null ? S.current.edit_node : S.current.node_new, leadingIcon: Icon(Icons.arrow_back_ios_new), onLeadingPressed: Navigator.of(context).pop, - trailingIcon: CakeImageWidget(imageUrl: + trailingIcon: HashImageWidget(imageUrl: "assets/new-ui/scan.svg",width:24,height:24, colorFilter: ColorFilter.mode(Theme.of(context).colorScheme.primary, BlendMode.srcIn), ), diff --git a/lib/src/screens/nodes/pow_node_create_or_edit_page.dart b/lib/src/screens/nodes/pow_node_create_or_edit_page.dart index b11b877f1..b34fa8a3a 100644 --- a/lib/src/screens/nodes/pow_node_create_or_edit_page.dart +++ b/lib/src/screens/nodes/pow_node_create_or_edit_page.dart @@ -4,7 +4,7 @@ import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; import 'package:hash_wallet/src/screens/nodes/widgets/node_form.dart'; import 'package:hash_wallet/src/widgets/alert_with_one_action.dart'; import 'package:hash_wallet/src/widgets/alert_with_two_actions.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/utils/show_pop_up.dart'; import 'package:hash_wallet/view_model/node_list/node_create_or_edit_view_model.dart'; import 'package:cw_core/node.dart'; @@ -82,7 +82,7 @@ class _PowNodeCreateOrEditPageState extends State { title: widget.editingNode != null ? S.current.edit_node : S.current.node_new, leadingIcon: Icon(Icons.arrow_back_ios_new), onLeadingPressed: Navigator.of(context).pop, - trailingIcon: CakeImageWidget(imageUrl: + trailingIcon: HashImageWidget(imageUrl: "assets/new-ui/scan.svg",width:24,height:24, colorFilter: ColorFilter.mode(Theme.of(context).colorScheme.primary, BlendMode.srcIn), ), diff --git a/lib/src/screens/receive/widgets/qr_image.dart b/lib/src/screens/receive/widgets/qr_image.dart index 55eafac4f..22b6b8110 100644 --- a/lib/src/screens/receive/widgets/qr_image.dart +++ b/lib/src/screens/receive/widgets/qr_image.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:cw_core/utils/print_verbose.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -25,7 +25,7 @@ class QrImage extends StatelessWidget { @override Widget build(BuildContext context) { - final imagePath = embeddedImagePath ?? 'assets/images/qr-cake.png'; + final imagePath = embeddedImagePath ?? 'assets/images/qr-hashbag.png'; final isSvg = imagePath.endsWith('.svg'); if (isSvg) { @@ -44,7 +44,7 @@ class QrImage extends StatelessWidget { backgroundColor: backgroundColor, padding: const EdgeInsets.all(12.0), ), - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: imagePath, width: logoSize * 0.8, height: logoSize * 0.8, diff --git a/lib/src/screens/restore/restore_options_page.dart b/lib/src/screens/restore/restore_options_page.dart index b96d465fb..ac1558f0a 100644 --- a/lib/src/screens/restore/restore_options_page.dart +++ b/lib/src/screens/restore/restore_options_page.dart @@ -46,8 +46,8 @@ class _RestoreOptionsBodyState extends State<_RestoreOptionsBody> { : 'assets/images/restore_hw.png'; String get imageRestoreCupcakePath => widget.themeType == ThemeType.dark - ? 'assets/images/restore_cupcake_dark.png' - : 'assets/images/restore_cupcake.png'; + ? 'assets/images/restore_hashbag.png' + : 'assets/images/restore_hashbag.png'; String get imageRestoreQRPath => widget.themeType == ThemeType.dark ? 'assets/images/restore_qr_dark.png' diff --git a/lib/src/screens/seed/seed_verification/seed_verification_success_view.dart b/lib/src/screens/seed/seed_verification/seed_verification_success_view.dart index 372e0181c..d42da3627 100644 --- a/lib/src/screens/seed/seed_verification/seed_verification_success_view.dart +++ b/lib/src/screens/seed/seed_verification/seed_verification_success_view.dart @@ -1,6 +1,6 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/routes.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/primary_button.dart'; import 'package:hash_wallet/themes/core/material_base_theme.dart'; import 'package:cw_core/wallet_type.dart'; @@ -21,7 +21,7 @@ class SeedVerificationSuccessView extends StatelessWidget { children: [ ConstrainedBox( constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.3), - child: CakeImageWidget( + child: HashImageWidget( height: 128, imageUrl: currentTheme.isDark ? 'assets/images/seed_verified_dark.png' diff --git a/lib/src/screens/send/send_page.dart b/lib/src/screens/send/send_page.dart index bfee080a1..7affcc881 100644 --- a/lib/src/screens/send/send_page.dart +++ b/lib/src/screens/send/send_page.dart @@ -684,7 +684,7 @@ class SendPage extends BasePage { : InfoBottomSheet( footerType: FooterType.singleActionButton, titleText: S.of(bottomSheetContext).transaction_sent, - contentImage: 'assets/images/birthday_cake.png', + contentImage: 'assets/images/hash_bag.png', singleActionButtonText: S.of(bottomSheetContext).close, singleActionButtonKey: ValueKey('send_page_transaction_sent_button_key'), onSingleActionButtonPressed: () { diff --git a/lib/src/screens/send/transaction_success_info_page.dart b/lib/src/screens/send/transaction_success_info_page.dart index e0343470c..f3f0123e0 100644 --- a/lib/src/screens/send/transaction_success_info_page.dart +++ b/lib/src/screens/send/transaction_success_info_page.dart @@ -1,16 +1,21 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/src/screens/Info_page.dart'; +import 'package:hash_wallet/src/widgets/hash_bag_success_animation.dart'; import 'package:flutter/cupertino.dart'; class TransactionSuccessPage extends InfoPage { TransactionSuccessPage({required this.content}) : super( - imageLightPath: 'assets/images/birthday_cake.png', - imageDarkPath: 'assets/images/birthday_cake.png', + imageLightPath: 'assets/images/hash_bag.png', + imageDarkPath: 'assets/images/hash_bag.png', ); final String content; + @override + Widget buildIllustration(BuildContext context, String image) => + const HashBagSuccessAnimation(); + @override bool get onWillPop => false; diff --git a/lib/src/screens/settings/widgets/settings_theme_choice.dart b/lib/src/screens/settings/widgets/settings_theme_choice.dart index 924406fba..8046f2421 100644 --- a/lib/src/screens/settings/widgets/settings_theme_choice.dart +++ b/lib/src/screens/settings/widgets/settings_theme_choice.dart @@ -1,6 +1,6 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/src/screens/settings/widgets/settings_switcher_cell.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/themes/core/material_base_theme.dart'; import 'package:hash_wallet/themes/theme_classes/black_theme.dart'; import 'package:hash_wallet/view_model/settings/display_settings_view_model.dart'; @@ -65,7 +65,7 @@ class SettingsThemeChoicesCell extends StatelessWidget { )), child: ClipRRect( borderRadius: BorderRadius.circular(cellRadius), - child: CakeImageWidget( + child: HashImageWidget( imageUrl: _displaySettingsViewModel.getImageForTheme(theme), fit: BoxFit.cover, height: previewHeight, diff --git a/lib/src/screens/setup_2fa/setup_2fa.dart b/lib/src/screens/setup_2fa/setup_2fa.dart index b63ad2b1e..78b8b2a04 100644 --- a/lib/src/screens/setup_2fa/setup_2fa.dart +++ b/lib/src/screens/setup_2fa/setup_2fa.dart @@ -2,7 +2,7 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/routes.dart'; import 'package:hash_wallet/src/screens/base_page.dart'; import 'package:hash_wallet/src/screens/settings/widgets/settings_cell_with_arrow.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/section_divider.dart'; import 'package:hash_wallet/src/widgets/standard_list.dart'; import 'package:hash_wallet/view_model/set_up_2fa_viewmodel.dart'; @@ -31,7 +31,7 @@ class Setup2FAPage extends BasePage { constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.3), child: AspectRatio( aspectRatio: 0.764, - child: CakeImageWidget(imageUrl: 'assets/images/2fa.png'), + child: HashImageWidget(imageUrl: 'assets/images/2fa.png'), ), ), ), diff --git a/lib/src/screens/support/support_page.dart b/lib/src/screens/support/support_page.dart index 2bdacae2c..46d3995c0 100644 --- a/lib/src/screens/support/support_page.dart +++ b/lib/src/screens/support/support_page.dart @@ -1,7 +1,7 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/routes.dart'; import 'package:hash_wallet/src/screens/base_page.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/option_tile.dart'; import 'package:hash_wallet/utils/device_info.dart'; import 'package:hash_wallet/view_model/support_view_model.dart'; @@ -40,19 +40,19 @@ class SupportPage extends BasePage { spacing: 16, children: [ OptionTile( - image: CakeImageWidget(imageUrl: _imageSupportChat, width: 55, height: 55), + image: HashImageWidget(imageUrl: _imageSupportChat, width: 55, height: 55), title: S.of(context).support_title_live_chat, description: S.of(context).support_description_live_chat, onPressed: () => _onPressedSupportChat(context), ), OptionTile( - image: CakeImageWidget(imageUrl: _imageSupportDocs, width: 55, height: 55), + image: HashImageWidget(imageUrl: _imageSupportDocs, width: 55, height: 55), title: S.of(context).support_title_guides, description: S.of(context).support_description_guides, onPressed: () => _launchUrl(supportViewModel.docsUrl), ), OptionTile( - image: CakeImageWidget(imageUrl: _imageSupportLinks, width: 55, height: 55), + image: HashImageWidget(imageUrl: _imageSupportLinks, width: 55, height: 55), title: S.of(context).support_title_other_links, description: S.of(context).support_description_other_links, onPressed: () => Navigator.pushNamed(context, Routes.supportOtherLinks), diff --git a/lib/src/screens/wallet_connect/widgets/wc_pairing_item_widget.dart b/lib/src/screens/wallet_connect/widgets/wc_pairing_item_widget.dart index ec3462c60..23185d082 100644 --- a/lib/src/screens/wallet_connect/widgets/wc_pairing_item_widget.dart +++ b/lib/src/screens/wallet_connect/widgets/wc_pairing_item_widget.dart @@ -1,5 +1,5 @@ import 'package:hash_wallet/generated/i18n.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:reown_walletkit/reown_walletkit.dart'; @@ -30,7 +30,7 @@ class WCPairingItemWidget extends StatelessWidget { leading: SizedBox( width: 60, height: 60, - child: CakeImageWidget( + child: HashImageWidget( borderRadius: 8, width: 60, height: 60, diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart index c2d2c3ecd..c669c59dc 100644 --- a/lib/src/screens/wallet_list/wallet_list_page.dart +++ b/lib/src/screens/wallet_list/wallet_list_page.dart @@ -17,7 +17,7 @@ import 'package:hash_wallet/src/screens/wallet_list/edit_wallet_button_widget.da import 'package:hash_wallet/src/screens/wallet_list/filtered_list.dart'; import 'package:hash_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart'; import 'package:hash_wallet/src/widgets/alert_with_one_action.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/gradient_background.dart'; import 'package:hash_wallet/src/widgets/primary_button.dart'; import 'package:hash_wallet/store/settings_store.dart'; @@ -195,7 +195,7 @@ class WalletListBodyState extends State { borderRadius: BorderRadius.all(Radius.circular(18)), title: groupName, tileKey: ValueKey('group_wallets_expansion_tile_widget_$index'), - leadingWidget: CakeImageWidget( + leadingWidget: HashImageWidget( imageUrl: "assets/new-ui/navbar/wallets.svg", width: 28, color: Theme.of(context).colorScheme.onSurfaceVariant, @@ -296,7 +296,7 @@ class WalletListBodyState extends State { ), ) : SizedBox(width: 6), - CakeImageWidget( + HashImageWidget( imageUrl: getCryptoCurrencyIconForWalletListItem( wallet.type, ), diff --git a/lib/src/screens/welcome/create_pin_welcome_page.dart b/lib/src/screens/welcome/create_pin_welcome_page.dart index 12c8bb0b6..b4f177574 100644 --- a/lib/src/screens/welcome/create_pin_welcome_page.dart +++ b/lib/src/screens/welcome/create_pin_welcome_page.dart @@ -1,6 +1,6 @@ import 'dart:io'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/scrollable_with_bottom_section.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; @@ -104,7 +104,7 @@ class CreatePinWelcomePage extends BasePage { AspectRatio( aspectRatio: imageAspectRatio, child: FittedBox( - child: CakeImageWidget( + child: HashImageWidget( imageUrl: welcomeImage, fit: BoxFit.contain, ), @@ -137,7 +137,7 @@ class CreatePinWelcomePage extends BasePage { SizedBox(width: 8), if (!isMoneroOnly) ...[ SizedBox(width: 8), - CakeImageWidget( + HashImageWidget( height: 40, imageUrl: cakeLogoThemed, fit: BoxFit.contain, diff --git a/lib/src/screens/welcome/welcome_page.dart b/lib/src/screens/welcome/welcome_page.dart index 56205e7cd..2ba394abd 100644 --- a/lib/src/screens/welcome/welcome_page.dart +++ b/lib/src/screens/welcome/welcome_page.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/scrollable_with_bottom_section.dart'; import 'package:hash_wallet/utils/responsive_layout_util.dart'; import 'package:flutter/material.dart'; @@ -59,7 +59,7 @@ class WelcomePage extends BasePage { aspectRatio: aspectRatioImage, child: FittedBox( fit: BoxFit.contain, - child: CakeImageWidget(imageUrl: welcomeImage), + child: HashImageWidget(imageUrl: welcomeImage), ), ), Padding( diff --git a/lib/src/widgets/bottom_sheet/add_passphrase_bottom_sheet_widget.dart b/lib/src/widgets/bottom_sheet/add_passphrase_bottom_sheet_widget.dart index 94adcc907..6622956be 100644 --- a/lib/src/widgets/bottom_sheet/add_passphrase_bottom_sheet_widget.dart +++ b/lib/src/widgets/bottom_sheet/add_passphrase_bottom_sheet_widget.dart @@ -1,6 +1,6 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/src/widgets/base_text_form_field.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/primary_button.dart'; import 'package:hash_wallet/themes/core/theme_extension.dart'; import 'package:flutter/material.dart'; @@ -81,7 +81,7 @@ class _AddPassphraseBottomSheetState extends State { ), ), SizedBox(height: 20), - CakeImageWidget(imageUrl: passphraseImage, height: 85), + HashImageWidget(imageUrl: passphraseImage, height: 85), SizedBox(height: 20), Padding( padding: const EdgeInsets.symmetric(horizontal: 16), diff --git a/lib/src/widgets/bottom_sheet/swap_confirmation_bottom_sheet.dart b/lib/src/widgets/bottom_sheet/swap_confirmation_bottom_sheet.dart index ee6a21651..dc35f75e0 100644 --- a/lib/src/widgets/bottom_sheet/swap_confirmation_bottom_sheet.dart +++ b/lib/src/widgets/bottom_sheet/swap_confirmation_bottom_sheet.dart @@ -7,7 +7,7 @@ import 'package:hash_wallet/reactions/wallet_connect.dart'; import 'package:hash_wallet/src/screens/exchange/widgets/present_provider_picker.dart'; import 'package:hash_wallet/src/widgets/base_text_form_field.dart'; import 'package:hash_wallet/src/widgets/bottom_sheet/swap_details_bottom_sheet.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/utils/address_formatter.dart'; import 'package:hash_wallet/utils/debounce.dart'; import 'package:cw_core/currency_for_wallet_type.dart'; @@ -151,7 +151,7 @@ class SwapConfirmationContentState extends State { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: widget.exchangeViewModel.depositCurrency.iconPath!, width: 32, height: 32, @@ -162,7 +162,7 @@ class SwapConfirmationContentState extends State { Stack( clipBehavior: Clip.none, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: detectedCurrency.iconPath ?? '', width: 32, height: 32, @@ -171,7 +171,7 @@ class SwapConfirmationContentState extends State { Positioned( bottom: -4, right: -4, - child: CakeImageWidget( + child: HashImageWidget( imageUrl: getCryptoCurrencyIconForWalletListItem( widget.paymentFlowResult.walletType!, chainId: widget.paymentFlowResult.chainId, diff --git a/lib/src/widgets/bottom_sheet/swap_details_bottom_sheet.dart b/lib/src/widgets/bottom_sheet/swap_details_bottom_sheet.dart index 73ec7a047..959c6ceea 100644 --- a/lib/src/widgets/bottom_sheet/swap_details_bottom_sheet.dart +++ b/lib/src/widgets/bottom_sheet/swap_details_bottom_sheet.dart @@ -1,5 +1,5 @@ import 'package:hash_wallet/exchange/trade.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/utils/address_formatter.dart'; import 'package:hash_wallet/utils/show_bar.dart'; import 'package:flutter/material.dart'; @@ -169,7 +169,7 @@ class _SwapDetailsBottomSheetState extends State { return InfoBottomSheet( footerType: FooterType.singleActionButton, titleText: S.of(bottomSheetContext).transaction_sent, - contentImage: 'assets/images/birthday_cake.png', + contentImage: 'assets/images/hash_bag.png', singleActionButtonText: S.of(bottomSheetContext).close, singleActionButtonKey: ValueKey('swap_details_sent_dialog_ok_button_key'), onSingleActionButtonPressed: () { @@ -373,7 +373,7 @@ class _SwapDetailsContent extends StatelessWidget { children: [ Row( children: [ - CakeImageWidget( + HashImageWidget( imageUrl: trade.provider.image, width: 36, height: 36, diff --git a/lib/src/widgets/bottom_sheet/token_selection_bottom_sheet.dart b/lib/src/widgets/bottom_sheet/token_selection_bottom_sheet.dart index 507a97a00..6a607e3b7 100644 --- a/lib/src/widgets/bottom_sheet/token_selection_bottom_sheet.dart +++ b/lib/src/widgets/bottom_sheet/token_selection_bottom_sheet.dart @@ -3,7 +3,7 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/reactions/wallet_connect.dart'; import 'package:hash_wallet/src/screens/exchange/widgets/currency_picker.dart'; import 'package:hash_wallet/src/widgets/bottom_sheet/base_bottom_sheet_widget.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/picker.dart'; import 'package:hash_wallet/src/widgets/primary_button.dart'; import 'package:hash_wallet/utils/payment_request.dart'; @@ -148,7 +148,7 @@ class _TokenSelectionContentState extends State<_TokenSelectionContent> { child: Column( mainAxisSize: MainAxisSize.min, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: _getNetworkIcon(), width: 50, height: 50, @@ -240,7 +240,7 @@ class _TokenSelectionContentState extends State<_TokenSelectionContent> { closeOnItemSelected: true, hasTitleSpacing: true, images: evmNetworks - .map((network) => CakeImageWidget( + .map((network) => HashImageWidget( imageUrl: getChainMonoImage(network), width: 20, height: 20, @@ -381,7 +381,7 @@ class TokenSelectionTileWidget extends StatelessWidget { child: Row( children: [ if (imagePath != null) ...[ - CakeImageWidget( + HashImageWidget( imageUrl: imagePath!, color: color, width: 20, diff --git a/lib/src/widgets/evm_switcher_row.dart b/lib/src/widgets/evm_switcher_row.dart index bb1f6d5a3..4080a752e 100644 --- a/lib/src/widgets/evm_switcher_row.dart +++ b/lib/src/widgets/evm_switcher_row.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/evm_switcher.dart'; import 'package:hash_wallet/src/widgets/standard_switch.dart'; import 'package:flutter/material.dart'; @@ -45,7 +45,7 @@ class EvmSwitcherRow extends StatelessWidget { Row( spacing: 8.0, children: [ - CakeImageWidget( + HashImageWidget( imageUrl: data.svgPath, width: 16, height: 16, @@ -55,7 +55,7 @@ class EvmSwitcherRow extends StatelessWidget { style: TextStyle(color: resolvedForegroundColor, fontSize: 14), ), if (selected && !editMode) - CakeImageWidget( + HashImageWidget( imageUrl: "assets/images/evm_switcher_checkmark.svg", width: 18, height: 18, diff --git a/lib/src/widgets/hash_bag_success_animation.dart b/lib/src/widgets/hash_bag_success_animation.dart new file mode 100644 index 000000000..f7f8d08bd --- /dev/null +++ b/lib/src/widgets/hash_bag_success_animation.dart @@ -0,0 +1,124 @@ +import 'package:flutter/material.dart'; + +/// "Transaction sent" celebration: the Hash Bags money sack sits at the bottom +/// and money glyphs (#, $, ₿) erupt from its mouth, rising and fading on a loop. +/// +/// The glyphs are image assets (not text) because the app doesn't bundle a font +/// containing a bitcoin glyph — rendering them as PNGs keeps them consistent +/// across platforms. +class HashBagSuccessAnimation extends StatefulWidget { + const HashBagSuccessAnimation({super.key}); + + @override + State createState() => _HashBagSuccessAnimationState(); +} + +class _Particle { + final String asset; + final double dx; // horizontal fan, fraction of width + final double phase; // stagger, 0..1 + final double size; // fraction of width + const _Particle(this.asset, this.dx, this.phase, this.size); +} + +class _HashBagSuccessAnimationState extends State + with SingleTickerProviderStateMixin { + late final AnimationController _controller; + + static const String _hash = 'assets/images/hashbag_sym_hash.png'; + static const String _dollar = 'assets/images/hashbag_sym_dollar.png'; + static const String _btc = 'assets/images/hashbag_sym_btc.png'; + + static const List<_Particle> _particles = <_Particle>[ + _Particle(_btc, 0.00, 0.00, 0.20), + _Particle(_hash, -0.18, 0.13, 0.16), + _Particle(_dollar, 0.19, 0.24, 0.16), + _Particle(_hash, 0.11, 0.40, 0.12), + _Particle(_dollar, -0.13, 0.54, 0.11), + _Particle(_btc, 0.06, 0.68, 0.12), + _Particle(_hash, -0.07, 0.83, 0.10), + ]; + + @override + void initState() { + super.initState(); + _controller = AnimationController( + vsync: this, + duration: const Duration(milliseconds: 2800), + )..repeat(); + } + + @override + void dispose() { + _controller.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (BuildContext context, BoxConstraints constraints) { + final double w = constraints.maxWidth; + final double h = constraints.maxHeight; + // Sack anchored at the bottom (~62% of the height); mouth ≈ its top. + final double bagH = h * 0.62; + final double bagW = bagH * 0.825; // hash_bag_base.png aspect (w/h) + final double bagLeft = (w - bagW) / 2; + final double bagTop = h - bagH; + final double mouthX = w / 2; + final double mouthY = bagTop + bagH * 0.06; + + return AnimatedBuilder( + animation: _controller, + builder: (BuildContext context, Widget? _) { + final List children = [ + Positioned( + left: bagLeft, + top: bagTop, + width: bagW, + height: bagH, + child: Image.asset( + 'assets/images/hash_bag_base.png', + fit: BoxFit.contain, + ), + ), + ]; + + for (final _Particle p in _particles) { + final double t = (_controller.value + p.phase) % 1.0; + final double sz = w * p.size; + final double rise = h * 0.52 * t; + final double spread = w * p.dx * (0.35 + t); + final double x = mouthX + spread - sz / 2; + final double y = mouthY - rise - sz / 2; + final double opacity = (t < 0.15 + ? t / 0.15 + : (t > 0.78 ? (1.0 - t) / 0.22 : 1.0)) + .clamp(0.0, 1.0) + .toDouble(); + final double scale = 0.55 + 0.45 * (t < 0.3 ? t / 0.3 : 1.0); + + children.add( + Positioned( + left: x, + top: y, + width: sz, + height: sz, + child: Opacity( + opacity: opacity, + child: Transform.scale( + scale: scale, + child: Image.asset(p.asset, fit: BoxFit.contain), + ), + ), + ), + ); + } + + return Stack(clipBehavior: Clip.none, children: children); + }, + ); + }, + ); + } +} diff --git a/lib/src/widgets/cake_image_widget.dart b/lib/src/widgets/hash_image_widget.dart similarity index 98% rename from lib/src/widgets/cake_image_widget.dart rename to lib/src/widgets/hash_image_widget.dart index 8df0a7bc6..10a394933 100644 --- a/lib/src/widgets/cake_image_widget.dart +++ b/lib/src/widgets/hash_image_widget.dart @@ -4,8 +4,8 @@ import 'package:flutter/services.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:vector_graphics/vector_graphics.dart'; -class CakeImageWidget extends StatelessWidget { - const CakeImageWidget({ +class HashImageWidget extends StatelessWidget { + const HashImageWidget({ super.key, this.imageUrl, this.height, diff --git a/lib/src/widgets/new_list_row/list_item_checkbox_widget.dart b/lib/src/widgets/new_list_row/list_item_checkbox_widget.dart index 33db50972..0bddee405 100644 --- a/lib/src/widgets/new_list_row/list_item_checkbox_widget.dart +++ b/lib/src/widgets/new_list_row/list_item_checkbox_widget.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/new_list_row/list_Item_style_wrapper.dart'; import 'package:hash_wallet/src/widgets/new_list_row/new_simple_checkbox.dart'; import 'package:flutter/material.dart'; @@ -54,7 +54,7 @@ class _ListItemCheckboxWidgetState extends State { children: [ if (widget.iconPath != null) widget.iconPath!.toLowerCase().endsWith("svg") - ? CakeImageWidget(imageUrl:widget.iconPath!, height: 26, width: 26) + ? HashImageWidget(imageUrl:widget.iconPath!, height: 26, width: 26) : Image.asset( widget.iconPath!, width: 26, diff --git a/lib/src/widgets/new_list_row/list_item_regular_row_widget.dart b/lib/src/widgets/new_list_row/list_item_regular_row_widget.dart index 23c75d780..7088382b6 100644 --- a/lib/src/widgets/new_list_row/list_item_regular_row_widget.dart +++ b/lib/src/widgets/new_list_row/list_item_regular_row_widget.dart @@ -1,6 +1,6 @@ import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/new-ui/widgets/copy_wrapper.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/new_list_row/list_Item_style_wrapper.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -76,7 +76,7 @@ class ListItemRegularRowWidget extends StatelessWidget { if (iconPath != null) Padding( padding: const EdgeInsets.only(right: 12.0), - child: CakeImageWidget( + child: HashImageWidget( imageUrl: iconPath!, width: 24, height: 24, @@ -121,7 +121,7 @@ class ListItemRegularRowWidget extends StatelessWidget { if (trailingWidget != null) trailingWidget! else if (trailingIconPath != null) - CakeImageWidget( + HashImageWidget( imageUrl: trailingIconPath!, height: trailingIconSize ?? 18, width: trailingIconSize ?? 18, @@ -132,7 +132,7 @@ class ListItemRegularRowWidget extends StatelessWidget { else if (showArrow) Padding( padding: const EdgeInsets.symmetric(vertical: 7.0), - child: CakeImageWidget(imageUrl: + child: HashImageWidget(imageUrl: "assets/new-ui/arrow_forward.svg", height: 14, color: theme.colorScheme.onSurfaceVariant diff --git a/lib/src/widgets/new_list_row/list_item_selector_widget.dart b/lib/src/widgets/new_list_row/list_item_selector_widget.dart index 28e07a497..90e216371 100644 --- a/lib/src/widgets/new_list_row/list_item_selector_widget.dart +++ b/lib/src/widgets/new_list_row/list_item_selector_widget.dart @@ -1,4 +1,4 @@ -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/new_list_row/list_Item_style_wrapper.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -45,7 +45,7 @@ class ListItemSelectorWidget extends StatelessWidget { options[selectedIndex], style: labelStyle, ), - CakeImageWidget(imageUrl: + HashImageWidget(imageUrl: "assets/new-ui/chooser.svg", colorFilter: ColorFilter.mode(theme.colorScheme.onSurfaceVariant, BlendMode.srcIn), diff --git a/lib/src/widgets/picker.dart b/lib/src/widgets/picker.dart index a0565fff5..d965ff956 100644 --- a/lib/src/widgets/picker.dart +++ b/lib/src/widgets/picker.dart @@ -3,7 +3,7 @@ import 'dart:math'; import 'package:hash_wallet/entities/seed_type.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/search_bar_widget.dart'; import 'package:hash_wallet/themes/core/theme_extension.dart'; import 'package:hash_wallet/utils/responsive_layout_util.dart'; @@ -498,7 +498,7 @@ class _PickerState extends State> { Widget? _getItemIcon(Item item) { if (item is Currency) { if (item.iconPath != null) { - return CakeImageWidget( + return HashImageWidget( imageUrl: item.iconPath!, height: 20.0, width: 20.0, diff --git a/lib/src/widgets/services_updates_widget.dart b/lib/src/widgets/services_updates_widget.dart index 69511b2a6..25dd95ff2 100644 --- a/lib/src/widgets/services_updates_widget.dart +++ b/lib/src/widgets/services_updates_widget.dart @@ -3,7 +3,7 @@ import 'package:hash_wallet/entities/preferences_key.dart'; import 'package:hash_wallet/entities/service_status.dart'; import 'package:hash_wallet/generated/i18n.dart'; import 'package:hash_wallet/src/widgets/alert_with_one_action.dart'; -import 'package:hash_wallet/src/widgets/cake_image_widget.dart'; +import 'package:hash_wallet/src/widgets/hash_image_widget.dart'; import 'package:hash_wallet/src/widgets/primary_button.dart'; import 'package:hash_wallet/src/widgets/service_status_tile.dart'; import 'package:hash_wallet/utils/device_info.dart'; @@ -41,7 +41,7 @@ class _ServicesUpdatesWidgetState extends State { ); }); }, - child: CakeImageWidget( + child: HashImageWidget( imageUrl: "assets/images/notif.svg", color: Theme.of(context).colorScheme.primary, width: DeviceInfo.instance.isDesktop ? 30 : 20, @@ -133,7 +133,7 @@ class _ServicesUpdatesWidgetState extends State { : null, child: Stack( children: [ - CakeImageWidget( + HashImageWidget( imageUrl: "assets/images/notif.svg", color: Theme.of(context).colorScheme.primary, width: DeviceInfo.instance.isDesktop ? 30 : 20, diff --git a/lib/typography.dart b/lib/typography.dart index ec2ca4bc6..f8a7f8683 100644 --- a/lib/typography.dart +++ b/lib/typography.dart @@ -4,47 +4,47 @@ import 'package:flutter/material.dart'; const latoFont = "Lato"; const wixFont = "Wix Madefor Text"; -TextStyle textXxSmall({Color? color}) => _cakeRegular(10, color); +TextStyle textXxSmall({Color? color}) => _hashRegular(10, color); -TextStyle textXxSmallSemiBold({Color? color}) => _cakeSemiBold(10, color); +TextStyle textXxSmallSemiBold({Color? color}) => _hashSemiBold(10, color); -TextStyle textXSmall({Color? color}) => _cakeRegular(12, color); +TextStyle textXSmall({Color? color}) => _hashRegular(12, color); -TextStyle textXSmallSemiBold({Color? color}) => _cakeSemiBold(12, color); +TextStyle textXSmallSemiBold({Color? color}) => _hashSemiBold(12, color); -TextStyle textSmall({Color? color}) => _cakeRegular(14, color); +TextStyle textSmall({Color? color}) => _hashRegular(14, color); -TextStyle textSmallSemiBold({Color? color}) => _cakeSemiBold(14, color); +TextStyle textSmallSemiBold({Color? color}) => _hashSemiBold(14, color); -TextStyle textMedium({Color? color}) => _cakeRegular(16, color); +TextStyle textMedium({Color? color}) => _hashRegular(16, color); -TextStyle textMediumBold({Color? color}) => _cakeBold(16, color); +TextStyle textMediumBold({Color? color}) => _hashBold(16, color); -TextStyle textMediumSemiBold({Color? color}) => _cakeSemiBold(22, color); +TextStyle textMediumSemiBold({Color? color}) => _hashSemiBold(22, color); -TextStyle textLarge({Color? color}) => _cakeRegular(18, color); +TextStyle textLarge({Color? color}) => _hashRegular(18, color); -TextStyle textLargeBold({Color? color}) => _cakeBold(18, color); +TextStyle textLargeBold({Color? color}) => _hashBold(18, color); -TextStyle textLargeSemiBold({Color? color}) => _cakeSemiBold(24, color); +TextStyle textLargeSemiBold({Color? color}) => _hashSemiBold(24, color); -TextStyle textXLarge({Color? color}) => _cakeRegular(32, color); +TextStyle textXLarge({Color? color}) => _hashRegular(32, color); -TextStyle textXLargeSemiBold({Color? color}) => _cakeSemiBold(32, color); +TextStyle textXLargeSemiBold({Color? color}) => _hashSemiBold(32, color); -TextStyle _cakeRegular(double size, Color? color) => _textStyle( +TextStyle _hashRegular(double size, Color? color) => _textStyle( size: size, fontWeight: FontWeight.normal, color: color, ); -TextStyle _cakeBold(double size, Color? color) => _textStyle( +TextStyle _hashBold(double size, Color? color) => _textStyle( size: size, fontWeight: FontWeight.w900, color: color, ); -TextStyle _cakeSemiBold(double size, Color? color) => _textStyle( +TextStyle _hashSemiBold(double size, Color? color) => _textStyle( size: size, fontWeight: FontWeight.w700, color: color, diff --git a/lib/utils/qr_util.dart b/lib/utils/qr_util.dart index 4fca84fbb..36c3ac187 100644 --- a/lib/utils/qr_util.dart +++ b/lib/utils/qr_util.dart @@ -28,7 +28,7 @@ String getQrImage(WalletType type) { return 'assets/images/doge_chain_qr.svg'; case WalletType.banano: case WalletType.none: - return 'assets/images/qr-cake.png'; + return 'assets/images/qr-hashbag.png'; } } diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index 2151c66f0..5836c686f 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -120,84 +120,22 @@ abstract class DashboardViewModelBase with Store { // caption: S.current.transactions_by_date, // onChanged: null), ], - 'Orders': [ - FilterItem( - value: () => orderFilterStore.displayCakePay, - caption: 'Cake Pay', - onChanged: () => - orderFilterStore.toggleDisplayOrder(OrderProviderDescription.cakePay)), - ], + // Orders (Cake Pay) section removed — Hash Bags does not integrate + // Cake Pay. MoonPay buy orders are source:buy and have no filter row. S.current.trades: [ FilterItem( value: () => tradeFilterStore.displayAllTrades, caption: S.current.all_trades, onChanged: () => tradeFilterStore.toggleDisplayExchange(ExchangeProviderDescription.all)), - FilterItem( - value: () => tradeFilterStore.displayChangeNow, - caption: ExchangeProviderDescription.changeNow.title, - onChanged: () => - tradeFilterStore.toggleDisplayExchange(ExchangeProviderDescription.changeNow)), - FilterItem( - value: () => tradeFilterStore.displaySideShift, - caption: ExchangeProviderDescription.sideShift.title, - onChanged: () => - tradeFilterStore.toggleDisplayExchange(ExchangeProviderDescription.sideShift)), - FilterItem( - value: () => tradeFilterStore.displaySimpleSwap, - caption: ExchangeProviderDescription.simpleSwap.title, - onChanged: () => - tradeFilterStore.toggleDisplayExchange(ExchangeProviderDescription.simpleSwap)), + // Only Trocador is enabled as a swap provider (see + // exchange_view_model.dart _allProviders); other providers are + // disabled pending affiliate keys, so they are omitted here too. FilterItem( value: () => tradeFilterStore.displayTrocador, caption: ExchangeProviderDescription.trocador.title, onChanged: () => tradeFilterStore.toggleDisplayExchange(ExchangeProviderDescription.trocador)), - FilterItem( - value: () => tradeFilterStore.displayExolix, - caption: ExchangeProviderDescription.exolix.title, - onChanged: () => - tradeFilterStore.toggleDisplayExchange(ExchangeProviderDescription.exolix)), - FilterItem( - value: () => tradeFilterStore.displayChainflip, - caption: ExchangeProviderDescription.chainflip.title, - onChanged: () => - tradeFilterStore.toggleDisplayExchange(ExchangeProviderDescription.chainflip)), - FilterItem( - value: () => tradeFilterStore.displayThorChain, - caption: ExchangeProviderDescription.thorChain.title, - onChanged: () => - tradeFilterStore.toggleDisplayExchange(ExchangeProviderDescription.thorChain)), - FilterItem( - value: () => tradeFilterStore.displayLetsExchange, - caption: ExchangeProviderDescription.letsExchange.title, - onChanged: () => tradeFilterStore - .toggleDisplayExchange(ExchangeProviderDescription.letsExchange)), - FilterItem( - value: () => tradeFilterStore.displayStealthEx, - caption: ExchangeProviderDescription.stealthEx.title, - onChanged: () => - tradeFilterStore.toggleDisplayExchange(ExchangeProviderDescription.stealthEx)), - FilterItem( - value: () => tradeFilterStore.displayXOSwap, - caption: ExchangeProviderDescription.xoSwap.title, - onChanged: () => - tradeFilterStore.toggleDisplayExchange(ExchangeProviderDescription.xoSwap)), - FilterItem( - value: () => tradeFilterStore.displaySwapTrade, - caption: ExchangeProviderDescription.swapTrade.title, - onChanged: () => - tradeFilterStore.toggleDisplayExchange(ExchangeProviderDescription.swapTrade)), - FilterItem( - value: () => tradeFilterStore.displaySwapXyz, - caption: ExchangeProviderDescription.swapsXyz.title, - onChanged: () => - tradeFilterStore.toggleDisplayExchange(ExchangeProviderDescription.swapsXyz)), - FilterItem( - value: () => tradeFilterStore.displayNearIntents, - caption: ExchangeProviderDescription.nearIntents.title, - onChanged: () => tradeFilterStore - .toggleDisplayExchange(ExchangeProviderDescription.nearIntents)), ] }, subname = '', diff --git a/pubspec_description.yaml b/pubspec_description.yaml index 8e599f390..be8beccc7 100644 --- a/pubspec_description.yaml +++ b/pubspec_description.yaml @@ -1,6 +1,6 @@ name: hash_wallet description: Hash Bags — a noncustodial multi-currency wallet by Such Software LLC. -version: 1.0.0+9 +version: 1.0.0+10 publish_to: none environment: diff --git a/res/pictures/by-cakelabs.svg b/res/pictures/by-cakelabs.svg deleted file mode 100644 index 004e534aa..000000000 --- a/res/pictures/by-cakelabs.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/res/pictures/cakelabs-icon.svg b/res/pictures/cakelabs-icon.svg deleted file mode 100644 index 21b6c2a5e..000000000 --- a/res/pictures/cakelabs-icon.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/res/pictures/cake-setting.svg b/res/pictures/hash-setting.svg similarity index 100% rename from res/pictures/cake-setting.svg rename to res/pictures/hash-setting.svg diff --git a/res/pictures/cakewallet-wordmark-light.svg b/res/pictures/hash-wordmark-light.svg similarity index 100% rename from res/pictures/cakewallet-wordmark-light.svg rename to res/pictures/hash-wordmark-light.svg diff --git a/res/pictures/cakewallet-wordmark.svg b/res/pictures/hash-wordmark.svg similarity index 100% rename from res/pictures/cakewallet-wordmark.svg rename to res/pictures/hash-wordmark.svg diff --git a/res/pictures/cake_squircle_icon.svg b/res/pictures/hash_squircle_icon.svg similarity index 100% rename from res/pictures/cake_squircle_icon.svg rename to res/pictures/hash_squircle_icon.svg diff --git a/tools/demo/storeshots.py b/tools/demo/storeshots.py new file mode 100644 index 000000000..4d243ea23 --- /dev/null +++ b/tools/demo/storeshots.py @@ -0,0 +1,182 @@ +#!/usr/bin/env python3 +""" +storeshots.py -- compose App Store-ready screenshots from raw app captures. + +Takes the 1080x1920 captures from the demo harness, crops the mobile status +bar, frames each on a Hash Bags brand gradient with rounded corners + a soft +shadow, and burns a headline + subhead. Output is 1290x2796 (Apple's 6.9" +iPhone size), drop-in for App Store Connect. + +Copy is deliberately factual and benefit-driven -- no price talk, no return or +"investment" claims, no guarantees -- so it stays inside App Store Review +guideline 3.1.5 (crypto) and the general "no misleading claims" rules. + +Needs Pillow (pip install pillow). Reads brand colors/fonts from +packs/hash/pack.json. Edit SHOTS[] to change sources or copy. + +Usage: + python3 tools/demo/storeshots.py \ + --srcdir ~/Build/hash-wallet/demo/screenshots-funded \ + --outdir ~/Build/hash-wallet/demo/appstore +""" +from __future__ import annotations + +import argparse +import json +import os +from pathlib import Path + +from PIL import Image, ImageDraw, ImageFont, ImageFilter + +HERE = Path(__file__).resolve().parent +PACK = json.loads((HERE / "packs" / "hash" / "pack.json").read_text()) +PAL = PACK["palette"] + +# App Store 6.9" iPhone (16 Pro Max class). Also an accepted 6.9" size is +# 1320x2868; 1290x2796 is the widely-accepted one. +W, H = 1290, 2796 + +FONT_DIR = "/usr/share/fonts/opentype/inter" +F_HEAD = f"{FONT_DIR}/InterDisplay-Bold.otf" +F_SUB = f"{FONT_DIR}/Inter-SemiBold.otf" + +# Pixels to crop off the top of the 1080-wide capture. Full-screen pages +# (dashboard) only need the status bar gone (~66). Bottom-sheet modals +# (receive/send/swap) also carry a dark scrim above the sheet, so they crop +# deeper (~128) to start cleanly at the sheet's rounded top. +CROP_FULLSCREEN = 66 +CROP_MODAL = 128 + +# (source filename, headline [(text, is_accent), ...], subhead, top_crop) +SHOTS = [ + ("01-dashboard.png", + [("Your bags.", False), ("Your keys.", True)], + "Wownero · Monero · Bitcoin & more", CROP_FULLSCREEN), + ("02-receive.png", + [("Get paid", False), ("in a tap.", True)], + "Scan, share, done", CROP_MODAL), + ("03-send.png", + [("Send anywhere,", False), ("ask no one.", True)], + "Non-custodial by design", CROP_MODAL), + ("04-swap.png", + [("Swap coins,", False), ("skip the signup.", True)], + "No account required", CROP_MODAL), +] + +FOOTER = "Open-source · Non-custodial" + + +def rgb(h: str) -> tuple[int, int, int]: + h = h.lstrip("#") + return tuple(int(h[i:i + 2], 16) for i in (0, 2, 4)) + + +# Website (hash.boats) theme: near-black background, mint-green accents, a soft +# green glow. Overrides the app pack's dark-green so all marketing (icon, +# feature graphic, screenshots) reads as one system with the site. +WEB_BG = "#0a0b0c" # near-black +WEB_BG_EDGE = "#050708" # darker vignette edge +WEB_GLOW = "#1f7d4d" # green glow +WEB_INK = "#e8efe9" # headline line 1 +WEB_MINT = "#86d3a6" # headline accent line (matches site wordmark) +WEB_GREY = "#9aa3a0" # subhead +WEB_FOOT = "#6f7a75" # footer + + +def gradient_bg() -> Image.Image: + """Near-black website background with a soft vignette and a green glow + behind where the phone sits.""" + bg = Image.new("RGB", (W, H), rgb(WEB_BG)) + # vignette: darken toward the edges + vig = Image.new("L", (W, H), 0) + ImageDraw.Draw(vig).ellipse( + [-W * 0.25, -H * 0.15, W * 1.25, H * 1.05], fill=255) + vig = vig.filter(ImageFilter.GaussianBlur(240)) + bg = Image.composite(bg, Image.new("RGB", (W, H), rgb(WEB_BG_EDGE)), vig) + # soft green glow centered where the framed phone will sit + glow = Image.new("L", (W, H), 0) + cx, cy, r = int(W * 0.5), int(H * 0.52), int(W * 0.62) + ImageDraw.Draw(glow).ellipse([cx - r, cy - r, cx + r, cy + r], fill=48) + glow = glow.filter(ImageFilter.GaussianBlur(260)) + return Image.composite(Image.new("RGB", (W, H), rgb(WEB_GLOW)), bg, glow) + + +def rounded(im: Image.Image, rad: int) -> Image.Image: + mask = Image.new("L", im.size, 0) + ImageDraw.Draw(mask).rounded_rectangle( + [0, 0, im.size[0], im.size[1]], rad, fill=255) + out = Image.new("RGBA", im.size, (0, 0, 0, 0)) + out.paste(im, (0, 0), mask) + return out + + +def build(srcdir: Path, src: str, headline, subhead: str, top_crop: int, + out: Path) -> None: + bg = gradient_bg().convert("RGBA") + d = ImageDraw.Draw(bg) + + # ---- headline ---- + fh = ImageFont.truetype(F_HEAD, 112) + y = 170 + for text, accent in headline: + col = rgb(WEB_MINT) if accent else rgb(WEB_INK) + w = d.textlength(text, font=fh) + d.text(((W - w) / 2, y), text, font=fh, fill=col) + y += 128 + + # ---- subhead ---- + fs = ImageFont.truetype(F_SUB, 46) + w = d.textlength(subhead, font=fs) + d.text(((W - w) / 2, y + 22), subhead, font=fs, fill=rgb(WEB_GREY)) + + # ---- framed app screenshot ---- + im = Image.open(srcdir / src).convert("RGB") + im = im.crop((0, top_crop, im.width, im.height)) + sw = 1040 + sh = int(im.height * sw / im.width) + im = im.resize((sw, sh), Image.LANCZOS) + im = rounded(im, 54) + ImageDraw.Draw(im).rounded_rectangle( + [1, 1, sw - 2, sh - 2], 54, outline=rgb(PAL["accent"]) + (235,), width=3) + + px_x = (W - sw) // 2 + px_y = 650 + + # soft drop shadow + shadow = Image.new("RGBA", (sw + 120, sh + 120), (0, 0, 0, 0)) + ImageDraw.Draw(shadow).rounded_rectangle( + [60, 60, sw + 60, sh + 60], 70, fill=(0, 0, 0, 150)) + shadow = shadow.filter(ImageFilter.GaussianBlur(46)) + sh_layer = Image.new("RGBA", bg.size, (0, 0, 0, 0)) + sh_layer.paste(shadow, (px_x - 60, px_y - 40), shadow) + bg = Image.alpha_composite(bg, sh_layer) + + bg.paste(im, (px_x, px_y), im) + + # ---- footer ---- + d = ImageDraw.Draw(bg) + w = d.textlength(FOOTER, font=fs) + d.text(((W - w) / 2, H - 130), FOOTER, font=fs, fill=rgb(WEB_MINT)) + + out.parent.mkdir(parents=True, exist_ok=True) + bg.convert("RGB").save(out) + print(f"wrote {out} ({W}x{H})") + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter) + ap.add_argument("--srcdir", required=True) + ap.add_argument("--outdir", required=True) + args = ap.parse_args() + srcdir = Path(os.path.expanduser(args.srcdir)) + outdir = Path(os.path.expanduser(args.outdir)) + for i, (src, headline, subhead, top_crop) in enumerate(SHOTS, 1): + if not (srcdir / src).exists(): + print(f"skip {src}: not found in {srcdir}") + continue + build(srcdir, src, headline, subhead, top_crop, outdir / f"appstore-{i:02d}.png") + + +if __name__ == "__main__": + main() diff --git a/tools/demo/storeshots_ipad.py b/tools/demo/storeshots_ipad.py new file mode 100644 index 000000000..d0e29f080 --- /dev/null +++ b/tools/demo/storeshots_ipad.py @@ -0,0 +1,146 @@ +#!/usr/bin/env python3 +""" +storeshots_ipad.py -- 13-inch iPad App Store screenshots (2048x2732). + +App Store Connect requires at least one 13" iPad screenshot when the app +declares iPad support. This composes the same funded phone captures onto the +website-dark brand background at iPad dimensions, so the iPad set matches the +phone set (tools/demo/storeshots.py) visually. + +2048x2732 is the classic 12.9"/13" iPad Pro portrait size; App Store Connect +accepts it for the "13-inch iPad" slot (2064x2752 is also accepted). + +Usage: + python3 tools/demo/storeshots_ipad.py \ + --srcdir ~/Build/hash-wallet/demo/screenshots-funded \ + --outdir ~/Build/hash-wallet/demo/appstore-ipad +""" +from __future__ import annotations + +import argparse +import os +from pathlib import Path + +from PIL import Image, ImageDraw, ImageFont, ImageFilter + +W, H = 2048, 2732 + +FONT_DIR = "/usr/share/fonts/opentype/inter" +F_HEAD = f"{FONT_DIR}/InterDisplay-Bold.otf" +F_SUB = f"{FONT_DIR}/Inter-SemiBold.otf" + +CROP_FULLSCREEN = 66 +CROP_MODAL = 128 + +# Same copy + accents as the phone set. +SHOTS = [ + ("01-dashboard.png", + [("Your bags.", False), ("Your keys.", True)], + "Wownero · Monero · Bitcoin & more", CROP_FULLSCREEN), + ("02-receive.png", + [("Get paid", False), ("in a tap.", True)], + "Scan, share, done", CROP_MODAL), + ("03-send.png", + [("Send anywhere,", False), ("ask no one.", True)], + "Non-custodial by design", CROP_MODAL), + ("04-swap.png", + [("Swap coins,", False), ("skip the signup.", True)], + "No account required", CROP_MODAL), +] +FOOTER = "Open-source · Non-custodial" + +WEB_BG = "#0a0b0c" +WEB_BG_EDGE = "#050708" +WEB_GLOW = "#1f7d4d" +WEB_INK = "#e8efe9" +WEB_MINT = "#86d3a6" +WEB_GREY = "#9aa3a0" + + +def rgb(h: str) -> tuple[int, int, int]: + h = h.lstrip("#") + return tuple(int(h[i:i + 2], 16) for i in (0, 2, 4)) + + +def gradient_bg() -> Image.Image: + bg = Image.new("RGB", (W, H), rgb(WEB_BG)) + vig = Image.new("L", (W, H), 0) + ImageDraw.Draw(vig).ellipse([-W * 0.25, -H * 0.15, W * 1.25, H * 1.05], fill=255) + vig = vig.filter(ImageFilter.GaussianBlur(300)) + bg = Image.composite(bg, Image.new("RGB", (W, H), rgb(WEB_BG_EDGE)), vig) + glow = Image.new("L", (W, H), 0) + cx, cy, r = int(W * 0.5), int(H * 0.55), int(W * 0.7) + ImageDraw.Draw(glow).ellipse([cx - r, cy - r, cx + r, cy + r], fill=44) + glow = glow.filter(ImageFilter.GaussianBlur(320)) + return Image.composite(Image.new("RGB", (W, H), rgb(WEB_GLOW)), bg, glow) + + +def rounded(im: Image.Image, rad: int) -> Image.Image: + mask = Image.new("L", im.size, 0) + ImageDraw.Draw(mask).rounded_rectangle([0, 0, im.size[0], im.size[1]], rad, fill=255) + out = Image.new("RGBA", im.size, (0, 0, 0, 0)) + out.paste(im, (0, 0), mask) + return out + + +def build(srcdir: Path, src: str, headline, subhead: str, top_crop: int, out: Path) -> None: + bg = gradient_bg().convert("RGBA") + d = ImageDraw.Draw(bg) + + fh = ImageFont.truetype(F_HEAD, 150) + y = 200 + for text, accent in headline: + col = rgb(WEB_MINT) if accent else rgb(WEB_INK) + w = d.textlength(text, font=fh) + d.text(((W - w) / 2, y), text, font=fh, fill=col) + y += 170 + + fs = ImageFont.truetype(F_SUB, 62) + w = d.textlength(subhead, font=fs) + d.text(((W - w) / 2, y + 20), subhead, font=fs, fill=rgb(WEB_GREY)) + + im = Image.open(srcdir / src).convert("RGB") + im = im.crop((0, top_crop, im.width, im.height)) + sw = 1000 + sh = int(im.height * sw / im.width) + im = im.resize((sw, sh), Image.LANCZOS) + im = rounded(im, 60) + ImageDraw.Draw(im).rounded_rectangle([1, 1, sw - 2, sh - 2], 60, + outline=rgb(WEB_MINT) + (235,), width=3) + + px_x = (W - sw) // 2 + px_y = 760 + + shadow = Image.new("RGBA", (sw + 160, sh + 160), (0, 0, 0, 0)) + ImageDraw.Draw(shadow).rounded_rectangle([80, 80, sw + 80, sh + 80], 90, fill=(0, 0, 0, 150)) + shadow = shadow.filter(ImageFilter.GaussianBlur(60)) + sh_layer = Image.new("RGBA", bg.size, (0, 0, 0, 0)) + sh_layer.paste(shadow, (px_x - 80, px_y - 56), shadow) + bg = Image.alpha_composite(bg, sh_layer) + bg.paste(im, (px_x, px_y), im) + + d = ImageDraw.Draw(bg) + w = d.textlength(FOOTER, font=fs) + d.text(((W - w) / 2, H - 150), FOOTER, font=fs, fill=rgb(WEB_MINT)) + + out.parent.mkdir(parents=True, exist_ok=True) + bg.convert("RGB").save(out) + print(f"wrote {out} ({W}x{H})") + + +def main() -> None: + ap = argparse.ArgumentParser() + ap.add_argument("--srcdir", required=True) + ap.add_argument("--outdir", required=True) + args = ap.parse_args() + srcdir = Path(os.path.expanduser(args.srcdir)) + outdir = Path(os.path.expanduser(args.outdir)) + for i, (src, headline, subhead, top_crop) in enumerate(SHOTS, 1): + if not (srcdir / src).exists(): + print(f"skip {src}: not found") + continue + build(srcdir, src, headline, subhead, top_crop, outdir / f"appstore-ipad-{i:02d}.png") + + +if __name__ == "__main__": + main() diff --git a/tools/demo/storeshots_play.py b/tools/demo/storeshots_play.py new file mode 100644 index 000000000..13965e500 --- /dev/null +++ b/tools/demo/storeshots_play.py @@ -0,0 +1,141 @@ +#!/usr/bin/env python3 +""" +storeshots_play.py -- Google Play phone screenshots (1290x2580, exactly 2:1). + +Play caps phone screenshots at a 2:1 aspect ratio; the App Store set (1290x2796, +~2.17:1) is too tall. This composes the same funded captures onto the website-dark +brand background at a Play-legal 2:1 canvas, matching storeshots.py visually. + +Usage: + python3 tools/demo/storeshots_play.py \ + --srcdir ~/Build/hash-wallet/demo/screenshots-funded \ + --outdir ~/Build/hash-wallet/demo/play-phone +""" +from __future__ import annotations + +import argparse +import os +from pathlib import Path + +from PIL import Image, ImageDraw, ImageFont, ImageFilter + +W, H = 1290, 2580 # exactly 2:1 + +FONT_DIR = "/usr/share/fonts/opentype/inter" +F_HEAD = f"{FONT_DIR}/InterDisplay-Bold.otf" +F_SUB = f"{FONT_DIR}/Inter-SemiBold.otf" + +CROP_FULLSCREEN = 66 +CROP_MODAL = 128 + +SHOTS = [ + ("01-dashboard.png", + [("Your bags.", False), ("Your keys.", True)], + "Wownero · Monero · Bitcoin & more", CROP_FULLSCREEN), + ("02-receive.png", + [("Get paid", False), ("in a tap.", True)], + "Scan, share, done", CROP_MODAL), + ("03-send.png", + [("Send anywhere,", False), ("ask no one.", True)], + "Non-custodial by design", CROP_MODAL), + ("04-swap.png", + [("Swap coins,", False), ("skip the signup.", True)], + "No account required", CROP_MODAL), +] +FOOTER = "Open-source · Non-custodial" + +WEB_BG = "#0a0b0c" +WEB_BG_EDGE = "#050708" +WEB_GLOW = "#1f7d4d" +WEB_INK = "#e8efe9" +WEB_MINT = "#86d3a6" +WEB_GREY = "#9aa3a0" + + +def rgb(h: str) -> tuple[int, int, int]: + h = h.lstrip("#") + return tuple(int(h[i:i + 2], 16) for i in (0, 2, 4)) + + +def gradient_bg() -> Image.Image: + bg = Image.new("RGB", (W, H), rgb(WEB_BG)) + vig = Image.new("L", (W, H), 0) + ImageDraw.Draw(vig).ellipse([-W * 0.25, -H * 0.15, W * 1.25, H * 1.05], fill=255) + vig = vig.filter(ImageFilter.GaussianBlur(230)) + bg = Image.composite(bg, Image.new("RGB", (W, H), rgb(WEB_BG_EDGE)), vig) + glow = Image.new("L", (W, H), 0) + cx, cy, r = int(W * 0.5), int(H * 0.52), int(W * 0.62) + ImageDraw.Draw(glow).ellipse([cx - r, cy - r, cx + r, cy + r], fill=48) + glow = glow.filter(ImageFilter.GaussianBlur(250)) + return Image.composite(Image.new("RGB", (W, H), rgb(WEB_GLOW)), bg, glow) + + +def rounded(im: Image.Image, rad: int) -> Image.Image: + mask = Image.new("L", im.size, 0) + ImageDraw.Draw(mask).rounded_rectangle([0, 0, im.size[0], im.size[1]], rad, fill=255) + out = Image.new("RGBA", im.size, (0, 0, 0, 0)) + out.paste(im, (0, 0), mask) + return out + + +def build(srcdir: Path, src: str, headline, subhead: str, top_crop: int, out: Path) -> None: + bg = gradient_bg().convert("RGBA") + d = ImageDraw.Draw(bg) + + fh = ImageFont.truetype(F_HEAD, 108) + y = 150 + for text, accent in headline: + col = rgb(WEB_MINT) if accent else rgb(WEB_INK) + w = d.textlength(text, font=fh) + d.text(((W - w) / 2, y), text, font=fh, fill=col) + y += 124 + + fs = ImageFont.truetype(F_SUB, 44) + w = d.textlength(subhead, font=fs) + d.text(((W - w) / 2, y + 18), subhead, font=fs, fill=rgb(WEB_GREY)) + + im = Image.open(srcdir / src).convert("RGB") + im = im.crop((0, top_crop, im.width, im.height)) + sw = 980 + sh = int(im.height * sw / im.width) + im = im.resize((sw, sh), Image.LANCZOS) + im = rounded(im, 52) + ImageDraw.Draw(im).rounded_rectangle([1, 1, sw - 2, sh - 2], 52, + outline=rgb(WEB_MINT) + (235,), width=3) + + px_x = (W - sw) // 2 + px_y = 600 + + shadow = Image.new("RGBA", (sw + 120, sh + 120), (0, 0, 0, 0)) + ImageDraw.Draw(shadow).rounded_rectangle([60, 60, sw + 60, sh + 60], 66, fill=(0, 0, 0, 150)) + shadow = shadow.filter(ImageFilter.GaussianBlur(46)) + sh_layer = Image.new("RGBA", bg.size, (0, 0, 0, 0)) + sh_layer.paste(shadow, (px_x - 60, px_y - 40), shadow) + bg = Image.alpha_composite(bg, sh_layer) + bg.paste(im, (px_x, px_y), im) + + d = ImageDraw.Draw(bg) + w = d.textlength(FOOTER, font=fs) + d.text(((W - w) / 2, H - 120), FOOTER, font=fs, fill=rgb(WEB_MINT)) + + out.parent.mkdir(parents=True, exist_ok=True) + bg.convert("RGB").save(out) + print(f"wrote {out} ({W}x{H})") + + +def main() -> None: + ap = argparse.ArgumentParser() + ap.add_argument("--srcdir", required=True) + ap.add_argument("--outdir", required=True) + args = ap.parse_args() + srcdir = Path(os.path.expanduser(args.srcdir)) + outdir = Path(os.path.expanduser(args.outdir)) + for i, (src, headline, subhead, top_crop) in enumerate(SHOTS, 1): + if not (srcdir / src).exists(): + print(f"skip {src}: not found") + continue + build(srcdir, src, headline, subhead, top_crop, outdir / f"play-{i:02d}.png") + + +if __name__ == "__main__": + main()