WIP: Add frost mascot

This commit is contained in:
likho 2024-03-14 20:23:41 +02:00
parent f68c0f4839
commit ec51f95449
8 changed files with 60 additions and 39 deletions

BIN
assets/images/mascot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

View file

@ -0,0 +1,49 @@
/*
* This file is part of Stack Wallet.
*
* Copyright (c) 2023 Cypher Stack
* All Rights Reserved.
* The code is distributed under GPLv3 license, see LICENSE file for details.
* Generated by Cypher Stack on 2023-05-26
*
*/
import 'package:flutter/material.dart';
import 'package:stackwallet/pages_desktop_specific/desktop_home_view.dart';
import 'package:stackwallet/themes/stack_colors.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'add_wallet_views/new_wallet_recovery_phrase_warning_view/recovery_phrase_explanation_dialog.dart';
class FrostMascot extends StatelessWidget {
const FrostMascot({
Key? key,
this.onPressed,
}) : super(key: key);
final VoidCallback? onPressed;
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(
right: 24,
),
child: GestureDetector(
onTap: () async {
await showDialog<void>(
context: context,
builder: (context) =>
const RecoveryPhraseExplanationDialog(),
);
},
child: Image(
image: AssetImage(
Assets.png.mascot,
),
),
),
);
}
}

View file

@ -4,10 +4,10 @@ import 'dart:typed_data';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:stackwallet/notifications/show_flush_bar.dart'; import 'package:stackwallet/notifications/show_flush_bar.dart';
import 'package:stackwallet/pages/FrostMascot.dart';
import 'package:stackwallet/pages/home_view/home_view.dart'; import 'package:stackwallet/pages/home_view/home_view.dart';
import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_details_view.dart'; import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_details_view.dart';
import 'package:stackwallet/pages_desktop_specific/desktop_home_view.dart'; import 'package:stackwallet/pages_desktop_specific/desktop_home_view.dart';
import 'package:stackwallet/pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart';
import 'package:stackwallet/providers/db/main_db_provider.dart'; import 'package:stackwallet/providers/db/main_db_provider.dart';
import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart'; import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart';
import 'package:stackwallet/providers/global/node_service_provider.dart'; import 'package:stackwallet/providers/global/node_service_provider.dart';
@ -103,17 +103,7 @@ class _ConfirmNewFrostMSWalletCreationViewState
); );
}, },
), ),
trailing: ExitToMyStackButton( trailing: const FrostMascot(),
onPressed: () async {
await showDialog<void>(
context: context,
builder: (_) => const FrostInterruptionDialog(
type: FrostInterruptionDialogType.walletCreation,
popUntilOnYesRouteName: DesktopHomeView.routeName,
),
);
},
),
), ),
body: SizedBox( body: SizedBox(
width: 480, width: 480,

View file

@ -1,8 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:stackwallet/pages/FrostMascot.dart';
import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/share_new_multisig_config_view.dart'; import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/share_new_multisig_config_view.dart';
import 'package:stackwallet/pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart';
import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart'; import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart';
import 'package:stackwallet/services/frost.dart'; import 'package:stackwallet/services/frost.dart';
import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/stack_colors.dart';
@ -121,7 +121,7 @@ class _NewFrostMsWalletViewState
appBar: const DesktopAppBar( appBar: const DesktopAppBar(
isCompactHeight: false, isCompactHeight: false,
leading: AppBarBackButton(), leading: AppBarBackButton(),
trailing: ExitToMyStackButton(), trailing: FrostMascot(),
), ),
body: SizedBox( body: SizedBox(
width: 480, width: 480,

View file

@ -3,11 +3,11 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:qr_flutter/qr_flutter.dart'; import 'package:qr_flutter/qr_flutter.dart';
import 'package:stackwallet/pages/FrostMascot.dart';
import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/frost_share_shares_view.dart'; import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/frost_share_shares_view.dart';
import 'package:stackwallet/pages/home_view/home_view.dart'; import 'package:stackwallet/pages/home_view/home_view.dart';
import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_details_view.dart'; import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_details_view.dart';
import 'package:stackwallet/pages_desktop_specific/desktop_home_view.dart'; import 'package:stackwallet/pages_desktop_specific/desktop_home_view.dart';
import 'package:stackwallet/pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart';
import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart'; import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart';
import 'package:stackwallet/services/frost.dart'; import 'package:stackwallet/services/frost.dart';
import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/stack_colors.dart';
@ -121,17 +121,7 @@ class _FrostShareCommitmentsViewState
); );
}, },
), ),
trailing: ExitToMyStackButton( trailing: const FrostMascot(),
onPressed: () async {
await showDialog<void>(
context: context,
builder: (_) => const FrostInterruptionDialog(
type: FrostInterruptionDialogType.walletCreation,
popUntilOnYesRouteName: DesktopHomeView.routeName,
),
);
},
),
), ),
body: SizedBox( body: SizedBox(
width: 480, width: 480,

View file

@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:qr_flutter/qr_flutter.dart'; import 'package:qr_flutter/qr_flutter.dart';
import 'package:stackwallet/pages/FrostMascot.dart';
import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/confirm_new_frost_ms_wallet_creation_view.dart'; import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/confirm_new_frost_ms_wallet_creation_view.dart';
import 'package:stackwallet/pages/home_view/home_view.dart'; import 'package:stackwallet/pages/home_view/home_view.dart';
import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_details_view.dart'; import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_details_view.dart';
@ -120,17 +121,7 @@ class _FrostShareSharesViewState extends ConsumerState<FrostShareSharesView> {
); );
}, },
), ),
trailing: ExitToMyStackButton( trailing: const FrostMascot(),
onPressed: () async {
await showDialog<void>(
context: context,
builder: (_) => const FrostInterruptionDialog(
type: FrostInterruptionDialogType.walletCreation,
popUntilOnYesRouteName: DesktopHomeView.routeName,
),
);
},
),
), ),
body: SizedBox( body: SizedBox(
width: 480, width: 480,

View file

@ -1,9 +1,9 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:qr_flutter/qr_flutter.dart'; import 'package:qr_flutter/qr_flutter.dart';
import 'package:stackwallet/pages/FrostMascot.dart';
import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/frost_share_commitments_view.dart'; import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/frost_share_commitments_view.dart';
import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_details_view.dart'; import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_details_view.dart';
import 'package:stackwallet/pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart';
import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart'; import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart';
import 'package:stackwallet/services/frost.dart'; import 'package:stackwallet/services/frost.dart';
import 'package:stackwallet/themes/stack_colors.dart'; import 'package:stackwallet/themes/stack_colors.dart';
@ -47,7 +47,7 @@ class _ShareNewMultisigConfigViewState
appBar: const DesktopAppBar( appBar: const DesktopAppBar(
isCompactHeight: false, isCompactHeight: false,
leading: AppBarBackButton(), leading: AppBarBackButton(),
trailing: ExitToMyStackButton(), trailing: FrostMascot(),
), ),
body: SizedBox( body: SizedBox(
width: 480, width: 480,

View file

@ -257,6 +257,7 @@ class _PNG {
String get glasses => "assets/images/glasses.png"; String get glasses => "assets/images/glasses.png";
String get glassesHidden => "assets/images/glasses-hidden.png"; String get glassesHidden => "assets/images/glasses-hidden.png";
String get mascot => "assets/images/mascot.png";
} }
class _ANIMATIONS { class _ANIMATIONS {