mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 11:29:23 +00:00
in app logo icon override option added so the stack wallet logo in the standard themes can be replaced specifically for duo but possibly other options as well
This commit is contained in:
parent
1a51661d72
commit
9398a09533
21 changed files with 168 additions and 161 deletions
|
@ -0,0 +1 @@
|
|||
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m256.77 256c0 30.12-20.56 55.43-48.4 62.67-10.43-18.52-16.38-39.9-16.38-62.67s5.95-44.15 16.38-62.67c27.84 7.24 48.4 32.55 48.4 62.67z"/><path d="m447.99 256c0 70.69-57.31 128-128 128-23.31 0-45.16-6.23-63.99-17.12 38.26-22.13 64.01-63.5 64.01-110.88s-25.75-88.75-64.01-110.88c18.83-10.89 40.68-17.12 63.99-17.12 70.69 0 128 57.31 128 128z"/><path d="m208.37 318.67c-5.22 1.37-10.71 2.09-16.36 2.09-35.77 0-64.77-28.99-64.77-64.76s29-64.76 64.77-64.76c5.65 0 11.14.72 16.36 2.09 11.26-20.03 27.76-36.72 47.63-48.21-18.83-10.89-40.68-17.12-63.99-17.12-70.7 0-128 57.31-128 128s57.3 128 128 128c23.31 0 45.16-6.23 63.99-17.12-19.87-11.49-36.37-28.18-47.63-48.21z" fill="#b3b3b3"/><path d="m320.01 256c0 47.38-25.75 88.75-64.01 110.88-19.87-11.49-36.37-28.18-47.63-48.21 27.84-7.24 48.4-32.55 48.4-62.67s-20.56-55.43-48.4-62.67c11.26-20.03 27.76-36.72 47.63-48.21 38.26 22.13 64.01 63.5 64.01 110.88z" fill="#666"/></svg>
|
After Width: | Height: | Size: 989 B |
|
@ -0,0 +1 @@
|
|||
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m256.77 256c0 30.12-20.56 55.43-48.4 62.67-10.43-18.52-16.38-39.9-16.38-62.67s5.95-44.15 16.38-62.67c27.84 7.24 48.4 32.55 48.4 62.67z"/><path d="m447.99 256c0 70.69-57.31 128-128 128-23.31 0-45.16-6.23-63.99-17.12 38.26-22.13 64.01-63.5 64.01-110.88s-25.75-88.75-64.01-110.88c18.83-10.89 40.68-17.12 63.99-17.12 70.69 0 128 57.31 128 128z"/><path d="m208.37 318.67c-5.22 1.37-10.71 2.09-16.36 2.09-35.77 0-64.77-28.99-64.77-64.76s29-64.76 64.77-64.76c5.65 0 11.14.72 16.36 2.09 11.26-20.03 27.76-36.72 47.63-48.21-18.83-10.89-40.68-17.12-63.99-17.12-70.7 0-128 57.31-128 128s57.3 128 128 128c23.31 0 45.16-6.23 63.99-17.12-19.87-11.49-36.37-28.18-47.63-48.21z" fill="#b3b3b3"/><path d="m320.01 256c0 47.38-25.75 88.75-64.01 110.88-19.87-11.49-36.37-28.18-47.63-48.21 27.84-7.24 48.4-32.55 48.4-62.67s-20.56-55.43-48.4-62.67c11.26-20.03 27.76-36.72 47.63-48.21 38.26 22.13 64.01 63.5 64.01 110.88z" fill="#666"/></svg>
|
After Width: | Height: | Size: 989 B |
1
asset_sources/in_app_logo_icons/stack_wallet/dummy
Normal file
1
asset_sources/in_app_logo_icons/stack_wallet/dummy
Normal file
|
@ -0,0 +1 @@
|
|||
Dummy file to ensure dir structure is preserved. Stack app icon is in standard themes.
|
|
@ -11,6 +11,8 @@ abstract class AppConfig {
|
|||
|
||||
static String get appDefaultDataDirName => _appDataDirName;
|
||||
|
||||
static ({String light, String dark})? get appIconAsset => _appIconAsset;
|
||||
|
||||
static List<CryptoCurrency> get coins => _supportedCoins;
|
||||
|
||||
static CryptoCurrency? getCryptoCurrencyFor(String coinIdentifier) {
|
||||
|
|
|
@ -8,21 +8,20 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
|
||||
import '../../../../models/isar/exchange_cache/currency.dart';
|
||||
import '../../../../models/isar/models/ethereum/eth_contract.dart';
|
||||
import '../../../../services/exchange/change_now/change_now_exchange.dart';
|
||||
import '../../../../services/exchange/exchange_data_loading_service.dart';
|
||||
import '../../../../themes/stack_colors.dart';
|
||||
import '../../../../themes/theme_providers.dart';
|
||||
import '../../../../utilities/assets.dart';
|
||||
import '../../../../utilities/text_styles.dart';
|
||||
import '../../../../utilities/util.dart';
|
||||
import '../../../../widgets/app_icon.dart';
|
||||
import '../../../../widgets/conditional_parent.dart';
|
||||
import '../../../../widgets/custom_buttons/draggable_switch_button.dart';
|
||||
import '../../../../widgets/rounded_white_container.dart';
|
||||
|
@ -35,7 +34,7 @@ class AddTokenListElementData {
|
|||
}
|
||||
|
||||
class AddTokenListElement extends ConsumerStatefulWidget {
|
||||
const AddTokenListElement({Key? key, required this.data}) : super(key: key);
|
||||
const AddTokenListElement({super.key, required this.data});
|
||||
|
||||
final AddTokenListElementData data;
|
||||
|
||||
|
@ -79,14 +78,7 @@ class _AddTokenListElementState extends ConsumerState<AddTokenListElement> {
|
|||
currency.image,
|
||||
width: iconSize,
|
||||
height: iconSize,
|
||||
placeholderBuilder: (_) => SvgPicture.file(
|
||||
File(
|
||||
ref.watch(
|
||||
themeAssetsProvider.select(
|
||||
(value) => value.stackIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
placeholderBuilder: (_) => AppIcon(
|
||||
width: iconSize,
|
||||
height: iconSize,
|
||||
),
|
||||
|
|
|
@ -14,25 +14,26 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
|
||||
import '../../../models/send_view_auto_fill_data.dart';
|
||||
import '../../../notifications/show_flush_bar.dart';
|
||||
import 'contact_details_view.dart';
|
||||
import '../../exchange_view/exchange_step_views/step_2_view.dart';
|
||||
import '../../send_view/send_view.dart';
|
||||
import '../../../providers/global/active_wallet_provider.dart';
|
||||
import '../../../providers/global/address_book_service_provider.dart';
|
||||
import '../../../providers/providers.dart';
|
||||
import '../../../themes/coin_icon_provider.dart';
|
||||
import '../../../themes/stack_colors.dart';
|
||||
import '../../../themes/theme_providers.dart';
|
||||
import '../../../utilities/assets.dart';
|
||||
import '../../../utilities/clipboard_interface.dart';
|
||||
import '../../../utilities/text_styles.dart';
|
||||
import '../../../utilities/util.dart';
|
||||
import '../../../wallets/isar/providers/wallet_info_provider.dart';
|
||||
import '../../../widgets/app_icon.dart';
|
||||
import '../../../widgets/rounded_container.dart';
|
||||
import '../../../widgets/rounded_white_container.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
import '../../exchange_view/exchange_step_views/step_2_view.dart';
|
||||
import '../../send_view/send_view.dart';
|
||||
import 'contact_details_view.dart';
|
||||
|
||||
final exchangeFromAddressBookAddressStateProvider =
|
||||
StateProvider<String>((ref) => "");
|
||||
|
@ -117,16 +118,8 @@ class ContactPopUp extends ConsumerWidget {
|
|||
borderRadius: BorderRadius.circular(32),
|
||||
),
|
||||
child: contact.customId == "default"
|
||||
? Center(
|
||||
child: SvgPicture.file(
|
||||
File(
|
||||
ref.watch(
|
||||
themeProvider.select(
|
||||
(value) => value
|
||||
.assets.stackIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
? const Center(
|
||||
child: AppIcon(
|
||||
width: 20,
|
||||
),
|
||||
)
|
||||
|
|
|
@ -14,14 +14,8 @@ import 'dart:io';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
import '../../app_config.dart';
|
||||
import '../buy_view/buy_view.dart';
|
||||
import '../exchange_view/exchange_view.dart';
|
||||
import 'sub_widgets/home_view_button_bar.dart';
|
||||
import '../notification_views/notifications_view.dart';
|
||||
import '../settings_views/global_settings_view/global_settings_view.dart';
|
||||
import '../settings_views/global_settings_view/hidden_settings.dart';
|
||||
import '../wallets_view/wallets_view.dart';
|
||||
import '../../providers/global/notifications_provider.dart';
|
||||
import '../../providers/ui/home_view_index_provider.dart';
|
||||
import '../../providers/ui/unread_notifications_provider.dart';
|
||||
|
@ -32,13 +26,21 @@ import '../../utilities/assets.dart';
|
|||
import '../../utilities/constants.dart';
|
||||
import '../../utilities/text_styles.dart';
|
||||
import '../../widgets/animated_widgets/rotate_icon.dart';
|
||||
import '../../widgets/app_icon.dart';
|
||||
import '../../widgets/background.dart';
|
||||
import '../../widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
import '../../widgets/small_tor_icon.dart';
|
||||
import '../../widgets/stack_dialog.dart';
|
||||
import '../buy_view/buy_view.dart';
|
||||
import '../exchange_view/exchange_view.dart';
|
||||
import '../notification_views/notifications_view.dart';
|
||||
import '../settings_views/global_settings_view/global_settings_view.dart';
|
||||
import '../settings_views/global_settings_view/hidden_settings.dart';
|
||||
import '../wallets_view/wallets_view.dart';
|
||||
import 'sub_widgets/home_view_button_bar.dart';
|
||||
|
||||
class HomeView extends ConsumerStatefulWidget {
|
||||
const HomeView({Key? key}) : super(key: key);
|
||||
const HomeView({super.key});
|
||||
|
||||
static const routeName = "/home";
|
||||
|
||||
|
@ -183,14 +185,7 @@ class _HomeViewState extends ConsumerState<HomeView> {
|
|||
GestureDetector(
|
||||
onTap: _hiddenOptions,
|
||||
child: RotateIcon(
|
||||
icon: SvgPicture.file(
|
||||
File(
|
||||
ref.watch(
|
||||
themeProvider.select(
|
||||
(value) => value.assets.stackIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
icon: const AppIcon(
|
||||
width: 24,
|
||||
height: 24,
|
||||
),
|
||||
|
|
|
@ -14,20 +14,22 @@ import 'package:flutter/gestures.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../app_config.dart';
|
||||
import 'stack_privacy_calls.dart';
|
||||
import '../pages_desktop_specific/password/create_password_view.dart';
|
||||
import '../themes/stack_colors.dart';
|
||||
import '../themes/theme_providers.dart';
|
||||
import '../utilities/prefs.dart';
|
||||
import '../utilities/text_styles.dart';
|
||||
import '../utilities/util.dart';
|
||||
import '../widgets/app_icon.dart';
|
||||
import '../widgets/background.dart';
|
||||
import '../widgets/desktop/secondary_button.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'stack_privacy_calls.dart';
|
||||
|
||||
class IntroView extends ConsumerStatefulWidget {
|
||||
const IntroView({Key? key}) : super(key: key);
|
||||
const IntroView({super.key});
|
||||
|
||||
static const String routeName = "/introView";
|
||||
|
||||
|
@ -132,18 +134,10 @@ class _IntroViewState extends ConsumerState<IntroView> {
|
|||
const Spacer(
|
||||
flex: 2,
|
||||
),
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
width: 130,
|
||||
height: 130,
|
||||
child: SvgPicture.file(
|
||||
File(
|
||||
ref.watch(
|
||||
themeProvider.select(
|
||||
(value) => value.assets.stackIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: AppIcon(),
|
||||
),
|
||||
const Spacer(
|
||||
flex: 42,
|
||||
|
|
|
@ -8,24 +8,22 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
|
||||
import '../../../models/isar/models/contact_entry.dart';
|
||||
import '../../../models/isar/models/isar_models.dart';
|
||||
import '../../../pages/address_book_views/subviews/add_new_contact_address_view.dart';
|
||||
import 'desktop_address_card.dart';
|
||||
import 'desktop_contact_options_menu_popup.dart';
|
||||
import '../../../providers/db/main_db_provider.dart';
|
||||
import '../../../providers/global/address_book_service_provider.dart';
|
||||
import '../../../providers/ui/address_book_providers/address_entry_data_provider.dart';
|
||||
import '../../../themes/stack_colors.dart';
|
||||
import '../../../themes/theme_providers.dart';
|
||||
import '../../../utilities/assets.dart';
|
||||
import '../../../utilities/text_styles.dart';
|
||||
import '../../../widgets/app_icon.dart';
|
||||
import '../../../widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
import '../../../widgets/custom_buttons/blue_text_button.dart';
|
||||
import '../../../widgets/desktop/desktop_dialog.dart';
|
||||
|
@ -33,13 +31,14 @@ import '../../../widgets/desktop/secondary_button.dart';
|
|||
import '../../../widgets/loading_indicator.dart';
|
||||
import '../../../widgets/rounded_white_container.dart';
|
||||
import '../../../widgets/transaction_card.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
import 'desktop_address_card.dart';
|
||||
import 'desktop_contact_options_menu_popup.dart';
|
||||
|
||||
class DesktopContactDetails extends ConsumerStatefulWidget {
|
||||
const DesktopContactDetails({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.contactId,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final String contactId;
|
||||
|
||||
|
@ -120,15 +119,8 @@ class _DesktopContactDetailsState extends ConsumerState<DesktopContactDetails> {
|
|||
borderRadius: BorderRadius.circular(32),
|
||||
),
|
||||
child: contact.customId == "default"
|
||||
? Center(
|
||||
child: SvgPicture.file(
|
||||
File(
|
||||
ref.watch(
|
||||
themeProvider.select(
|
||||
(value) => value.assets.stackIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
? const Center(
|
||||
child: AppIcon(
|
||||
width: 32,
|
||||
),
|
||||
)
|
||||
|
|
|
@ -8,24 +8,22 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
import '../../app_config.dart';
|
||||
import '../../pages/settings_views/global_settings_view/hidden_settings.dart';
|
||||
import '../../pages/wallets_view/sub_widgets/empty_wallets.dart';
|
||||
import 'my_wallets.dart';
|
||||
import '../../themes/theme_providers.dart';
|
||||
import '../../utilities/text_styles.dart';
|
||||
import '../../wallets/isar/providers/all_wallets_info_provider.dart';
|
||||
import '../../widgets/animated_widgets/rotate_icon.dart';
|
||||
import '../../widgets/app_icon.dart';
|
||||
import '../../widgets/background.dart';
|
||||
import '../../widgets/desktop/desktop_app_bar.dart';
|
||||
import 'my_wallets.dart';
|
||||
|
||||
class MyStackView extends ConsumerStatefulWidget {
|
||||
const MyStackView({Key? key}) : super(key: key);
|
||||
const MyStackView({super.key});
|
||||
|
||||
static const String routeName = "/myStackDesktop";
|
||||
|
||||
|
@ -110,18 +108,10 @@ class _DesktopMyStackTitleState extends ConsumerState<DesktopMyStackTitle> {
|
|||
GestureDetector(
|
||||
onTap: _hiddenOptions,
|
||||
child: RotateIcon(
|
||||
icon: SizedBox(
|
||||
icon: const SizedBox(
|
||||
width: 32,
|
||||
height: 32,
|
||||
child: SvgPicture.file(
|
||||
File(
|
||||
ref.watch(
|
||||
themeProvider.select(
|
||||
(value) => value.assets.stackIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: AppIcon(),
|
||||
),
|
||||
curve: Curves.easeInOutCubic,
|
||||
rotationPercent: 1.0,
|
||||
|
|
|
@ -13,16 +13,16 @@ import 'dart:io';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
|
||||
import '../../db/hive/db.dart';
|
||||
import '../../notifications/show_flush_bar.dart';
|
||||
import '../../pages/intro_view.dart';
|
||||
import '../../themes/theme_providers.dart';
|
||||
import '../../utilities/logger.dart';
|
||||
import '../../utilities/stack_file_system.dart';
|
||||
import '../../utilities/text_styles.dart';
|
||||
import '../../widgets/app_icon.dart';
|
||||
import '../../widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
import '../../widgets/desktop/desktop_app_bar.dart';
|
||||
import '../../widgets/desktop/desktop_scaffold.dart';
|
||||
|
@ -31,9 +31,9 @@ import '../../widgets/desktop/secondary_button.dart';
|
|||
|
||||
class DeletePasswordWarningView extends ConsumerStatefulWidget {
|
||||
const DeletePasswordWarningView({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.shouldCreateNew,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
static const String routeName = "/deletePasswordWarning";
|
||||
|
||||
|
@ -119,14 +119,7 @@ class _ForgotPasswordDesktopViewState
|
|||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
SvgPicture.file(
|
||||
File(
|
||||
ref.watch(
|
||||
themeProvider.select(
|
||||
(value) => value.assets.stackIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
const AppIcon(
|
||||
width: 100,
|
||||
),
|
||||
const SizedBox(
|
||||
|
|
|
@ -9,40 +9,40 @@
|
|||
*/
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
import '../../app_config.dart';
|
||||
import '../../db/db_version_migration.dart';
|
||||
import '../../db/hive/db.dart';
|
||||
import '../../notifications/show_flush_bar.dart';
|
||||
import '../desktop_home_view.dart';
|
||||
import 'forgot_password_desktop_view.dart';
|
||||
import '../../providers/desktop/storage_crypto_handler_provider.dart';
|
||||
import '../../providers/global/secure_store_provider.dart';
|
||||
import '../../themes/stack_colors.dart';
|
||||
import '../../themes/theme_providers.dart';
|
||||
import '../../utilities/assets.dart';
|
||||
import '../../utilities/constants.dart';
|
||||
import '../../utilities/flutter_secure_storage_interface.dart';
|
||||
import '../../utilities/logger.dart';
|
||||
import '../../utilities/text_styles.dart';
|
||||
import '../../utilities/util.dart';
|
||||
import '../../widgets/app_icon.dart';
|
||||
import '../../widgets/custom_buttons/blue_text_button.dart';
|
||||
import '../../widgets/desktop/desktop_scaffold.dart';
|
||||
import '../../widgets/desktop/primary_button.dart';
|
||||
import '../../widgets/loading_indicator.dart';
|
||||
import '../../widgets/rounded_container.dart';
|
||||
import '../../widgets/stack_text_field.dart';
|
||||
import '../desktop_home_view.dart';
|
||||
import 'forgot_password_desktop_view.dart';
|
||||
|
||||
class DesktopLoginView extends ConsumerStatefulWidget {
|
||||
const DesktopLoginView({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.startupWalletId,
|
||||
this.load,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
static const String routeName = "/desktopLogin";
|
||||
|
||||
|
@ -187,14 +187,7 @@ class _DesktopLoginViewState extends ConsumerState<DesktopLoginView> {
|
|||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
SvgPicture.file(
|
||||
File(
|
||||
ref.watch(
|
||||
themeProvider.select(
|
||||
(value) => value.assets.stackIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
const AppIcon(
|
||||
width: 100,
|
||||
),
|
||||
const SizedBox(
|
||||
|
|
|
@ -8,26 +8,24 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
import '../../app_config.dart';
|
||||
import 'delete_password_warning_view.dart';
|
||||
import '../../themes/stack_colors.dart';
|
||||
import '../../themes/theme_providers.dart';
|
||||
import '../../utilities/text_styles.dart';
|
||||
import '../../widgets/app_icon.dart';
|
||||
import '../../widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
import '../../widgets/desktop/desktop_app_bar.dart';
|
||||
import '../../widgets/desktop/desktop_scaffold.dart';
|
||||
import '../../widgets/desktop/primary_button.dart';
|
||||
import '../../widgets/desktop/secondary_button.dart';
|
||||
import 'delete_password_warning_view.dart';
|
||||
|
||||
class ForgotPasswordDesktopView extends ConsumerStatefulWidget {
|
||||
const ForgotPasswordDesktopView({
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
super.key,
|
||||
});
|
||||
|
||||
static const String routeName = "/forgotPasswordDesktop";
|
||||
|
||||
|
@ -60,14 +58,7 @@ class _ForgotPasswordDesktopViewState
|
|||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
SvgPicture.file(
|
||||
File(
|
||||
ref.watch(
|
||||
themeProvider.select(
|
||||
(value) => value.assets.stackIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
const AppIcon(
|
||||
width: 100,
|
||||
),
|
||||
const SizedBox(
|
||||
|
|
|
@ -10,10 +10,11 @@
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../models/isar/stack_theme.dart';
|
||||
import '../wallets/crypto_currency/crypto_currency.dart';
|
||||
import 'stack_colors.dart';
|
||||
import 'theme_service.dart';
|
||||
import '../wallets/crypto_currency/crypto_currency.dart';
|
||||
|
||||
final applicationThemesDirectoryPathProvider = StateProvider((ref) => "");
|
||||
|
||||
|
|
|
@ -8,33 +8,32 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
import '../app_config.dart';
|
||||
import '../models/isar/models/contact_entry.dart';
|
||||
import '../pages/address_book_views/subviews/contact_popup.dart';
|
||||
import '../providers/global/address_book_service_provider.dart';
|
||||
import '../app_config.dart';
|
||||
import '../themes/stack_colors.dart';
|
||||
import '../themes/theme_providers.dart';
|
||||
import '../utilities/assets.dart';
|
||||
import '../utilities/constants.dart';
|
||||
import '../utilities/text_styles.dart';
|
||||
import '../utilities/util.dart';
|
||||
import '../wallets/crypto_currency/crypto_currency.dart';
|
||||
import 'app_icon.dart';
|
||||
import 'conditional_parent.dart';
|
||||
import 'expandable.dart';
|
||||
import 'rounded_white_container.dart';
|
||||
|
||||
class AddressBookCard extends ConsumerStatefulWidget {
|
||||
const AddressBookCard({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.contactId,
|
||||
this.indicatorDown,
|
||||
this.desktopSendFrom = true,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final String contactId;
|
||||
final ExpandableState? indicatorDown;
|
||||
|
@ -104,15 +103,8 @@ class _AddressBookCardState extends ConsumerState<AddressBookCard> {
|
|||
borderRadius: BorderRadius.circular(32),
|
||||
),
|
||||
child: contact.customId == "default"
|
||||
? Center(
|
||||
child: SvgPicture.file(
|
||||
File(
|
||||
ref.watch(
|
||||
themeProvider.select(
|
||||
(value) => value.assets.stackIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
? const Center(
|
||||
child: AppIcon(
|
||||
width: 20,
|
||||
),
|
||||
)
|
||||
|
|
75
lib/widgets/app_icon.dart
Normal file
75
lib/widgets/app_icon.dart
Normal file
|
@ -0,0 +1,75 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
import '../app_config.dart';
|
||||
import '../themes/theme_providers.dart';
|
||||
|
||||
enum _SvgType {
|
||||
file,
|
||||
asset;
|
||||
}
|
||||
|
||||
final _pAppIcon = Provider.autoDispose<({_SvgType svgType, String svg})>((ref) {
|
||||
if (AppConfig.appIconAsset != null) {
|
||||
final brightness = ref.watch(
|
||||
themeProvider.select(
|
||||
(value) => value.brightness,
|
||||
),
|
||||
);
|
||||
final String asset;
|
||||
|
||||
switch (brightness) {
|
||||
case Brightness.dark:
|
||||
asset = AppConfig.appIconAsset!.dark;
|
||||
break;
|
||||
|
||||
case Brightness.light:
|
||||
asset = AppConfig.appIconAsset!.light;
|
||||
break;
|
||||
}
|
||||
|
||||
return (svgType: _SvgType.asset, svg: asset);
|
||||
} else {
|
||||
final file = ref.watch(
|
||||
themeAssetsProvider.select(
|
||||
(value) => value.stackIcon,
|
||||
),
|
||||
);
|
||||
return (svgType: _SvgType.file, svg: file);
|
||||
}
|
||||
});
|
||||
|
||||
class AppIcon extends ConsumerWidget {
|
||||
const AppIcon({
|
||||
super.key,
|
||||
this.width,
|
||||
this.height,
|
||||
});
|
||||
|
||||
final double? width;
|
||||
final double? height;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final iconInfo = ref.watch(_pAppIcon);
|
||||
switch (iconInfo.svgType) {
|
||||
case _SvgType.file:
|
||||
return SvgPicture.file(
|
||||
File(
|
||||
iconInfo.svg,
|
||||
),
|
||||
width: width,
|
||||
height: height,
|
||||
);
|
||||
case _SvgType.asset:
|
||||
return SvgPicture.asset(
|
||||
iconInfo.svg,
|
||||
width: width,
|
||||
height: height,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,18 +8,16 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import '../../themes/theme_providers.dart';
|
||||
|
||||
import '../app_icon.dart';
|
||||
|
||||
class LivingStackIcon extends ConsumerStatefulWidget {
|
||||
const LivingStackIcon({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.onPressed,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final VoidCallback? onPressed;
|
||||
|
||||
|
@ -59,15 +57,7 @@ class _LivingStackIconState extends ConsumerState<LivingStackIcon> {
|
|||
child: AnimatedScale(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
scale: _hovering ? 1.2 : 1,
|
||||
child: SvgPicture.file(
|
||||
File(
|
||||
ref.watch(
|
||||
themeProvider.select(
|
||||
(value) => value.assets.stackIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: const AppIcon(),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -254,6 +254,7 @@ flutter:
|
|||
# - images/a_dot_burr.jpeg
|
||||
# - images/a_dot_ham.jpeg
|
||||
assets:
|
||||
- assets/in_app_logo_icons/
|
||||
- assets/images/
|
||||
- assets/icon/
|
||||
- google_fonts/
|
||||
|
|
|
@ -35,6 +35,11 @@ const _separator = " ";
|
|||
const _suffix = "Duo";
|
||||
const _appDataDirName = "stackduo";
|
||||
|
||||
const ({String light, String dark})? _appIconAsset = (
|
||||
light: "assets/in_app_logo_icons/stack-duo-icon_light.svg",
|
||||
dark: "assets/in_app_logo_icons/stack-duo-icon_dark.svg",
|
||||
);
|
||||
|
||||
final List<CryptoCurrency> _supportedCoins = List.unmodifiable([
|
||||
Bitcoin(CryptoCurrencyNetwork.main),
|
||||
Monero(CryptoCurrencyNetwork.main),
|
||||
|
|
|
@ -37,6 +37,8 @@ const _separator = " ";
|
|||
const _suffix = "Wallet";
|
||||
const _appDataDirName = "stackwallet";
|
||||
|
||||
const ({String light, String dark})? _appIconAsset = null;
|
||||
|
||||
final List<CryptoCurrency> _supportedCoins = List.unmodifiable([
|
||||
Bitcoin(CryptoCurrencyNetwork.main),
|
||||
BitcoinFrost(CryptoCurrencyNetwork.main),
|
||||
|
|
|
@ -24,3 +24,6 @@ ln -s "${ASSET_SOURCES_DIR}/icon/${SELECT_ASSETS_DIR}" "${ASSETS_DIR}/icon"
|
|||
|
||||
rm -f "${ASSETS_DIR}/lottie"
|
||||
ln -s "${ASSET_SOURCES_DIR}/lottie/${SELECT_ASSETS_DIR}" "${ASSETS_DIR}/lottie"
|
||||
|
||||
rm -f "${ASSETS_DIR}/in_app_logo_icons"
|
||||
ln -s "${ASSET_SOURCES_DIR}/in_app_logo_icons/${SELECT_ASSETS_DIR}" "${ASSETS_DIR}/in_app_logo_icons"
|
||||
|
|
Loading…
Reference in a new issue