Merge pull request #810 from cypherstack/add-frost-mascot

Add frost mascot
This commit is contained in:
Diego Salazar 2024-03-18 11:11:56 -06:00 committed by GitHub
commit 721d1cf132
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 176 additions and 72 deletions

BIN
assets/images/mascot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

View file

@ -0,0 +1,65 @@
/*
* 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/utilities/text_styles.dart';
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
import 'package:stackwallet/widgets/stack_dialog.dart';
class FrostStepExplanationDialog extends StatelessWidget {
final String title;
final String body;
const FrostStepExplanationDialog({super.key, required this.title, required this.body});
@override
Widget build(BuildContext context) {
return StackDialogBase(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: STextStyles.titleBold12(context),
),
const SizedBox(
height: 12,
),
Text(
body,
style: STextStyles.baseXS(context),
),
],
),
),
),
const SizedBox(
height: 24,
),
Row(
children: [
const Spacer(),
Expanded(
child: SecondaryButton(
label: "Close",
onPressed: Navigator.of(context).pop,
),
),
],
),
],
),
);
}
}

View file

@ -4,10 +4,10 @@ import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:stackwallet/notifications/show_flush_bar.dart';
import 'package:stackwallet/pages/frost_mascot.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_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/frost_wallet/frost_wallet_providers.dart';
import 'package:stackwallet/providers/global/node_service_provider.dart';
@ -34,7 +34,7 @@ import 'package:stackwallet/widgets/detail_item.dart';
import 'package:stackwallet/widgets/dialogs/frost_interruption_dialog.dart';
import 'package:stackwallet/widgets/loading_indicator.dart';
import '../../../../wallets/isar/models/wallet_info.dart';
import 'package:stackwallet/wallets/isar/models/wallet_info.dart';
class ConfirmNewFrostMSWalletCreationView extends ConsumerStatefulWidget {
const ConfirmNewFrostMSWalletCreationView({
@ -103,16 +103,9 @@ class _ConfirmNewFrostMSWalletCreationViewState
);
},
),
trailing: ExitToMyStackButton(
onPressed: () async {
await showDialog<void>(
context: context,
builder: (_) => const FrostInterruptionDialog(
type: FrostInterruptionDialogType.walletCreation,
popUntilOnYesRouteName: DesktopHomeView.routeName,
),
);
},
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
),
),
body: SizedBox(

View file

@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:stackwallet/pages/frost_mascot.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/services/frost.dart';
import 'package:stackwallet/themes/stack_colors.dart';
@ -118,10 +118,13 @@ class _NewFrostMsWalletViewState
condition: Util.isDesktop,
builder: (child) => DesktopScaffold(
background: Theme.of(context).extension<StackColors>()!.background,
appBar: const DesktopAppBar(
appBar: DesktopAppBar(
isCompactHeight: false,
leading: AppBarBackButton(),
trailing: ExitToMyStackButton(),
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
),
),
body: SizedBox(
width: 480,

View file

@ -3,11 +3,11 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:stackwallet/pages/frost_mascot.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/wallet_view/transaction_views/transaction_details_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/services/frost.dart';
import 'package:stackwallet/themes/stack_colors.dart';
@ -121,16 +121,9 @@ class _FrostShareCommitmentsViewState
);
},
),
trailing: ExitToMyStackButton(
onPressed: () async {
await showDialog<void>(
context: context,
builder: (_) => const FrostInterruptionDialog(
type: FrostInterruptionDialogType.walletCreation,
popUntilOnYesRouteName: DesktopHomeView.routeName,
),
);
},
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
),
),
body: SizedBox(

View file

@ -3,11 +3,11 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:stackwallet/pages/frost_mascot.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/wallet_view/transaction_views/transaction_details_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/services/frost.dart';
import 'package:stackwallet/themes/stack_colors.dart';
@ -120,16 +120,9 @@ class _FrostShareSharesViewState extends ConsumerState<FrostShareSharesView> {
);
},
),
trailing: ExitToMyStackButton(
onPressed: () async {
await showDialog<void>(
context: context,
builder: (_) => const FrostInterruptionDialog(
type: FrostInterruptionDialogType.walletCreation,
popUntilOnYesRouteName: DesktopHomeView.routeName,
),
);
},
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
),
),
body: SizedBox(

View file

@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/frost_share_commitments_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/services/frost.dart';
import 'package:stackwallet/themes/stack_colors.dart';
@ -25,6 +24,8 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/pages/frost_mascot.dart';
class ImportNewFrostMsWalletView extends ConsumerStatefulWidget {
const ImportNewFrostMsWalletView({
super.key,
@ -73,10 +74,13 @@ class _ImportNewFrostMsWalletViewState
condition: Util.isDesktop,
builder: (child) => DesktopScaffold(
background: Theme.of(context).extension<StackColors>()!.background,
appBar: const DesktopAppBar(
appBar: DesktopAppBar(
isCompactHeight: false,
leading: AppBarBackButton(),
trailing: ExitToMyStackButton(),
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
),
),
body: SizedBox(
width: 480,

View file

@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:stackwallet/pages/frost_mascot.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_desktop_specific/my_stack_view/exit_to_my_stack_button.dart';
import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart';
import 'package:stackwallet/services/frost.dart';
import 'package:stackwallet/themes/stack_colors.dart';
@ -44,10 +44,13 @@ class _ShareNewMultisigConfigViewState
condition: Util.isDesktop,
builder: (child) => DesktopScaffold(
background: Theme.of(context).extension<StackColors>()!.background,
appBar: const DesktopAppBar(
appBar: DesktopAppBar(
isCompactHeight: false,
leading: AppBarBackButton(),
trailing: ExitToMyStackButton(),
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
),
),
body: SizedBox(
width: 480,

View file

@ -40,6 +40,8 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/pages/frost_mascot.dart';
class RestoreFrostMsWalletView extends ConsumerStatefulWidget {
const RestoreFrostMsWalletView({
super.key,
@ -212,10 +214,13 @@ class _RestoreFrostMsWalletViewState
condition: Util.isDesktop,
builder: (child) => DesktopScaffold(
background: Theme.of(context).extension<StackColors>()!.background,
appBar: const DesktopAppBar(
appBar: DesktopAppBar(
isCompactHeight: false,
leading: AppBarBackButton(),
trailing: ExitToMyStackButton(),
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
)
),
body: SizedBox(
width: 480,

View file

@ -0,0 +1,47 @@
/*
* 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/add_wallet_views/frost_ms/frost_step_explanation_dialog.dart';
import 'package:stackwallet/utilities/assets.dart';
class FrostMascot extends StatelessWidget {
final String title;
final String body;
FrostMascot({
super.key,
this.onPressed, required this.title, required this.body,
});
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) =>
FrostStepExplanationDialog(title: title, body: body),
);
},
child: Image(
image: AssetImage(
Assets.png.mascot,
),
),
),
);
}
}

View file

@ -8,7 +8,6 @@ import 'package:qr_flutter/qr_flutter.dart';
import 'package:stackwallet/pages/settings_views/wallet_settings_view/frost_ms/resharing/verify_updated_wallet_view.dart';
import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_details_view.dart';
import 'package:stackwallet/pages/wallet_view/wallet_view.dart';
import 'package:stackwallet/pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart';
import 'package:stackwallet/pages_desktop_specific/my_stack_view/wallet_view/desktop_wallet_view.dart';
import 'package:stackwallet/providers/db/main_db_provider.dart';
import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart';
@ -34,6 +33,8 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/pages/frost_mascot.dart';
class FinishResharingView extends ConsumerStatefulWidget {
const FinishResharingView({
super.key,
@ -180,10 +181,13 @@ class _FinishResharingViewState extends ConsumerState<FinishResharingView> {
condition: Util.isDesktop,
builder: (child) => DesktopScaffold(
background: Theme.of(context).extension<StackColors>()!.background,
appBar: const DesktopAppBar(
appBar: DesktopAppBar(
isCompactHeight: false,
leading: AppBarBackButton(),
trailing: ExitToMyStackButton(),
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
),
),
body: SizedBox(
width: 480,

View file

@ -5,7 +5,6 @@ import 'package:stackwallet/pages/home_view/home_view.dart';
import 'package:stackwallet/pages/settings_views/wallet_settings_view/frost_ms/resharing/finish_resharing_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/my_stack_view/exit_to_my_stack_button.dart';
import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart';
import 'package:stackwallet/themes/stack_colors.dart';
import 'package:stackwallet/utilities/text_styles.dart';
@ -20,6 +19,8 @@ import 'package:stackwallet/widgets/desktop/primary_button.dart';
import 'package:stackwallet/widgets/detail_item.dart';
import 'package:stackwallet/widgets/dialogs/frost_interruption_dialog.dart';
import 'package:stackwallet/pages/frost_mascot.dart';
class NewContinueSharingView extends ConsumerStatefulWidget {
const NewContinueSharingView({
super.key,
@ -68,16 +69,9 @@ class _NewContinueSharingViewState
);
},
),
trailing: ExitToMyStackButton(
onPressed: () async {
await showDialog<void>(
context: context,
builder: (_) => const FrostInterruptionDialog(
type: FrostInterruptionDialogType.resharing,
popUntilOnYesRouteName: DesktopHomeView.routeName,
),
);
},
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
),
),
body: SizedBox(

View file

@ -27,6 +27,8 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/pages/frost_mascot.dart';
class NewImportResharerConfigView extends ConsumerStatefulWidget {
const NewImportResharerConfigView({
super.key,
@ -89,10 +91,13 @@ class _NewImportResharerConfigViewState
condition: Util.isDesktop,
builder: (child) => DesktopScaffold(
background: Theme.of(context).extension<StackColors>()!.background,
appBar: const DesktopAppBar(
appBar: DesktopAppBar(
isCompactHeight: false,
leading: AppBarBackButton(),
trailing: ExitToMyStackButton(),
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
),
),
body: SizedBox(
width: 480,

View file

@ -5,7 +5,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:stackwallet/pages/home_view/home_view.dart';
import 'package:stackwallet/pages/settings_views/wallet_settings_view/frost_ms/resharing/new/new_continue_sharing_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/services/frost.dart';
import 'package:stackwallet/themes/stack_colors.dart';
@ -27,6 +26,8 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
import 'package:stackwallet/widgets/stack_text_field.dart';
import 'package:stackwallet/widgets/textfield_icon_button.dart';
import 'package:stackwallet/pages/frost_mascot.dart';
class NewStartResharingView extends ConsumerStatefulWidget {
const NewStartResharingView({
super.key,
@ -146,16 +147,9 @@ class _NewStartResharingViewState extends ConsumerState<NewStartResharingView> {
);
},
),
trailing: ExitToMyStackButton(
onPressed: () async {
await showDialog<void>(
context: context,
builder: (_) => const FrostInterruptionDialog(
type: FrostInterruptionDialogType.resharing,
popUntilOnYesRouteName: DesktopHomeView.routeName,
),
);
},
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
),
),
body: SizedBox(

View file

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