Add frost mascot and dialog

This commit is contained in:
likho 2024-03-15 13:26:50 +02:00
parent ec51f95449
commit d8e5b8e305
13 changed files with 139 additions and 56 deletions

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,7 +4,7 @@ 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/FrostMascot.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';
@ -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,7 +103,10 @@ class _ConfirmNewFrostMSWalletCreationViewState
);
},
),
trailing: const FrostMascot(),
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
),
),
body: SizedBox(
width: 480,

View file

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:stackwallet/pages/FrostMascot.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/providers/frost_wallet/frost_wallet_providers.dart';
import 'package:stackwallet/services/frost.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: FrostMascot(),
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
),
),
body: SizedBox(
width: 480,

View file

@ -3,7 +3,7 @@ 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/FrostMascot.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';
@ -121,7 +121,10 @@ class _FrostShareCommitmentsViewState
);
},
),
trailing: const FrostMascot(),
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
),
),
body: SizedBox(
width: 480,

View file

@ -3,12 +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/FrostMascot.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';
@ -121,7 +120,10 @@ class _FrostShareSharesViewState extends ConsumerState<FrostShareSharesView> {
);
},
),
trailing: const FrostMascot(),
trailing: FrostMascot(
title: 'Lorem ipsum',
body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
),
),
body: SizedBox(
width: 480,

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,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:stackwallet/pages/FrostMascot.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/providers/frost_wallet/frost_wallet_providers.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: FrostMascot(),
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

@ -9,18 +9,16 @@
*/
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/pages/add_wallet_views/frost_ms/frost_step_explanation_dialog.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 String title;
final String body;
FrostMascot({
super.key,
this.onPressed, required this.title, required this.body,
});
final VoidCallback? onPressed;
@ -35,7 +33,7 @@ class FrostMascot extends StatelessWidget {
await showDialog<void>(
context: context,
builder: (context) =>
const RecoveryPhraseExplanationDialog(),
FrostStepExplanationDialog(title: title, body: body),
);
},
child: Image(

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(