mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-25 04:49:36 +00:00
WIP: showing textfields for backups
This commit is contained in:
parent
a6c380592e
commit
2c935d65b6
1 changed files with 179 additions and 162 deletions
|
@ -2,6 +2,8 @@ import 'package:flutter/gestures.dart';
|
||||||
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:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:stackwallet/pages/settings_views/global_settings_view/stack_backup_views/create_backup_view.dart';
|
||||||
|
import 'package:stackwallet/pages/settings_views/global_settings_view/stack_backup_views/restore_from_file_view.dart';
|
||||||
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/backup_and_restore/enable_backup_dialog.dart';
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/backup_and_restore/enable_backup_dialog.dart';
|
||||||
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/backup_and_restore/restore_backup_dialog.dart';
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/backup_and_restore/restore_backup_dialog.dart';
|
||||||
import 'package:stackwallet/utilities/assets.dart';
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
|
@ -24,193 +26,208 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
debugPrint("BUILD: $runtimeType");
|
debugPrint("BUILD: $runtimeType");
|
||||||
return ListView(
|
|
||||||
shrinkWrap: true,
|
return LayoutBuilder(builder: (context, constraints) {
|
||||||
scrollDirection: Axis.vertical,
|
return SingleChildScrollView(
|
||||||
children: [
|
scrollDirection: Axis.vertical,
|
||||||
Padding(
|
child: ConstrainedBox(
|
||||||
padding: const EdgeInsets.only(
|
constraints: BoxConstraints(
|
||||||
right: 30,
|
minHeight: constraints.maxHeight,
|
||||||
),
|
),
|
||||||
child: RoundedWhiteContainer(
|
child: IntrinsicHeight(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
children: [
|
Padding(
|
||||||
SvgPicture.asset(
|
padding: const EdgeInsets.only(
|
||||||
Assets.svg.backupAuto,
|
right: 30,
|
||||||
width: 48,
|
),
|
||||||
height: 48,
|
child: RoundedWhiteContainer(
|
||||||
),
|
child: Column(
|
||||||
Center(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(10),
|
|
||||||
child: RichText(
|
|
||||||
textAlign: TextAlign.start,
|
|
||||||
text: TextSpan(
|
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
SvgPicture.asset(
|
||||||
text: "Auto Backup",
|
Assets.svg.backupAuto,
|
||||||
style: STextStyles.desktopTextSmall(context),
|
width: 48,
|
||||||
|
height: 48,
|
||||||
),
|
),
|
||||||
TextSpan(
|
Center(
|
||||||
text:
|
child: Padding(
|
||||||
"\n\nAuto backup is a custom Stack Wallet feature that offers a convenient backup of your data."
|
padding: const EdgeInsets.all(10),
|
||||||
"To ensure maximum security, we recommend using a unique password that you haven't used anywhere "
|
child: RichText(
|
||||||
"else on the internet before. Your password is not stored.",
|
textAlign: TextAlign.start,
|
||||||
style:
|
text: TextSpan(
|
||||||
STextStyles.desktopTextExtraExtraSmall(context),
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "Auto Backup",
|
||||||
|
style:
|
||||||
|
STextStyles.desktopTextSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"\n\nAuto backup is a custom Stack Wallet feature that offers a convenient backup of your data."
|
||||||
|
"To ensure maximum security, we recommend using a unique password that you haven't used anywhere "
|
||||||
|
"else on the internet before. Your password is not stored.",
|
||||||
|
style: STextStyles
|
||||||
|
.desktopTextExtraExtraSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"\n\nFor more information, please see our website ",
|
||||||
|
style: STextStyles
|
||||||
|
.desktopTextExtraExtraSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: "stackwallet.com",
|
||||||
|
style: STextStyles.richLink(context)
|
||||||
|
.copyWith(fontSize: 14),
|
||||||
|
recognizer: TapGestureRecognizer()
|
||||||
|
..onTap = () {
|
||||||
|
launchUrl(
|
||||||
|
Uri.parse(
|
||||||
|
"https://stackwallet.com/"),
|
||||||
|
mode:
|
||||||
|
LaunchMode.externalApplication,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
Column(
|
||||||
text:
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
"\n\nFor more information, please see our website ",
|
children: const [
|
||||||
style:
|
Padding(
|
||||||
STextStyles.desktopTextExtraExtraSmall(context),
|
padding: EdgeInsets.all(
|
||||||
),
|
10,
|
||||||
TextSpan(
|
),
|
||||||
text: "stackwallet.com",
|
child: AutoBackupButton(),
|
||||||
style: STextStyles.richLink(context)
|
),
|
||||||
.copyWith(fontSize: 14),
|
],
|
||||||
recognizer: TapGestureRecognizer()
|
|
||||||
..onTap = () {
|
|
||||||
launchUrl(
|
|
||||||
Uri.parse("https://stackwallet.com/"),
|
|
||||||
mode: LaunchMode.externalApplication,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(
|
||||||
Column(
|
height: 25,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
),
|
||||||
children: const [
|
Padding(
|
||||||
Padding(
|
padding: const EdgeInsets.only(
|
||||||
padding: EdgeInsets.all(
|
right: 30,
|
||||||
10,
|
|
||||||
),
|
|
||||||
child: AutoBackupButton(),
|
|
||||||
),
|
),
|
||||||
],
|
child: RoundedWhiteContainer(
|
||||||
),
|
child: Column(
|
||||||
],
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: 25,
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(
|
|
||||||
right: 30,
|
|
||||||
),
|
|
||||||
child: RoundedWhiteContainer(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
SvgPicture.asset(
|
|
||||||
Assets.svg.backupAdd,
|
|
||||||
width: 48,
|
|
||||||
height: 48,
|
|
||||||
alignment: Alignment.topLeft,
|
|
||||||
),
|
|
||||||
Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(10),
|
|
||||||
child: RichText(
|
|
||||||
textAlign: TextAlign.start,
|
|
||||||
text: TextSpan(
|
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
SvgPicture.asset(
|
||||||
text: "Manual Backup",
|
Assets.svg.backupAdd,
|
||||||
style: STextStyles.desktopTextSmall(context),
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
),
|
),
|
||||||
TextSpan(
|
Center(
|
||||||
text:
|
child: Padding(
|
||||||
"\n\nCreate manual backup to easily transfer your data between devices. "
|
padding: const EdgeInsets.all(10),
|
||||||
"You will create a backup file that can be later used in the Restore option. "
|
child: RichText(
|
||||||
"Use a strong password to encrypt your data.",
|
textAlign: TextAlign.start,
|
||||||
style:
|
text: TextSpan(
|
||||||
STextStyles.desktopTextExtraExtraSmall(context),
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "Manual Backup",
|
||||||
|
style:
|
||||||
|
STextStyles.desktopTextSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"\n\nCreate manual backup to easily transfer your data between devices. "
|
||||||
|
"You will create a backup file that can be later used in the Restore option. "
|
||||||
|
"Use a strong password to encrypt your data.",
|
||||||
|
style: STextStyles
|
||||||
|
.desktopTextExtraExtraSmall(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: const [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(
|
||||||
|
10,
|
||||||
|
),
|
||||||
|
child: CreateBackupView(),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(
|
||||||
Column(
|
height: 25,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
),
|
||||||
children: const [
|
Padding(
|
||||||
Padding(
|
padding: const EdgeInsets.only(
|
||||||
padding: EdgeInsets.all(
|
right: 30,
|
||||||
10,
|
|
||||||
),
|
|
||||||
child: ManualBackupButton(),
|
|
||||||
),
|
),
|
||||||
],
|
child: RoundedWhiteContainer(
|
||||||
),
|
child: Column(
|
||||||
],
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: 25,
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(
|
|
||||||
right: 30,
|
|
||||||
),
|
|
||||||
child: RoundedWhiteContainer(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
SvgPicture.asset(
|
|
||||||
Assets.svg.backupRestore,
|
|
||||||
width: 48,
|
|
||||||
height: 48,
|
|
||||||
alignment: Alignment.topLeft,
|
|
||||||
),
|
|
||||||
Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(10),
|
|
||||||
child: RichText(
|
|
||||||
textAlign: TextAlign.start,
|
|
||||||
text: TextSpan(
|
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
SvgPicture.asset(
|
||||||
text: "Restore Backup",
|
Assets.svg.backupRestore,
|
||||||
style: STextStyles.desktopTextSmall(context),
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
),
|
),
|
||||||
TextSpan(
|
Center(
|
||||||
text:
|
child: Padding(
|
||||||
"\n\nUse your Stack Wallet backup file to restore your wallets, address book "
|
padding: const EdgeInsets.all(10),
|
||||||
"and wallet preferences.",
|
child: RichText(
|
||||||
style:
|
textAlign: TextAlign.start,
|
||||||
STextStyles.desktopTextExtraExtraSmall(context),
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "Restore Backup",
|
||||||
|
style:
|
||||||
|
STextStyles.desktopTextSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"\n\nUse your Stack Wallet backup file to restore your wallets, address book "
|
||||||
|
"and wallet preferences.",
|
||||||
|
style: STextStyles
|
||||||
|
.desktopTextExtraExtraSmall(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: const [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(
|
||||||
|
10,
|
||||||
|
),
|
||||||
|
child: RestoreFromFileView(),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
Column(
|
),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: const [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.all(
|
|
||||||
10,
|
|
||||||
),
|
|
||||||
child: RestoreBackupButton(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
));
|
||||||
),
|
});
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue