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,9 +26,16 @@ 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) {
|
||||||
|
return SingleChildScrollView(
|
||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
|
child: ConstrainedBox(
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minHeight: constraints.maxHeight,
|
||||||
|
),
|
||||||
|
child: IntrinsicHeight(
|
||||||
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
|
@ -50,21 +59,22 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "Auto Backup",
|
text: "Auto Backup",
|
||||||
style: STextStyles.desktopTextSmall(context),
|
style:
|
||||||
|
STextStyles.desktopTextSmall(context),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:
|
text:
|
||||||
"\n\nAuto backup is a custom Stack Wallet feature that offers a convenient backup of your data."
|
"\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 "
|
"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.",
|
"else on the internet before. Your password is not stored.",
|
||||||
style:
|
style: STextStyles
|
||||||
STextStyles.desktopTextExtraExtraSmall(context),
|
.desktopTextExtraExtraSmall(context),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:
|
text:
|
||||||
"\n\nFor more information, please see our website ",
|
"\n\nFor more information, please see our website ",
|
||||||
style:
|
style: STextStyles
|
||||||
STextStyles.desktopTextExtraExtraSmall(context),
|
.desktopTextExtraExtraSmall(context),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "stackwallet.com",
|
text: "stackwallet.com",
|
||||||
|
@ -73,8 +83,10 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
|
||||||
recognizer: TapGestureRecognizer()
|
recognizer: TapGestureRecognizer()
|
||||||
..onTap = () {
|
..onTap = () {
|
||||||
launchUrl(
|
launchUrl(
|
||||||
Uri.parse("https://stackwallet.com/"),
|
Uri.parse(
|
||||||
mode: LaunchMode.externalApplication,
|
"https://stackwallet.com/"),
|
||||||
|
mode:
|
||||||
|
LaunchMode.externalApplication,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -124,15 +136,16 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "Manual Backup",
|
text: "Manual Backup",
|
||||||
style: STextStyles.desktopTextSmall(context),
|
style:
|
||||||
|
STextStyles.desktopTextSmall(context),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:
|
text:
|
||||||
"\n\nCreate manual backup to easily transfer your data between devices. "
|
"\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. "
|
"You will create a backup file that can be later used in the Restore option. "
|
||||||
"Use a strong password to encrypt your data.",
|
"Use a strong password to encrypt your data.",
|
||||||
style:
|
style: STextStyles
|
||||||
STextStyles.desktopTextExtraExtraSmall(context),
|
.desktopTextExtraExtraSmall(context),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -146,7 +159,7 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
|
||||||
padding: EdgeInsets.all(
|
padding: EdgeInsets.all(
|
||||||
10,
|
10,
|
||||||
),
|
),
|
||||||
child: ManualBackupButton(),
|
child: CreateBackupView(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -180,14 +193,15 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "Restore Backup",
|
text: "Restore Backup",
|
||||||
style: STextStyles.desktopTextSmall(context),
|
style:
|
||||||
|
STextStyles.desktopTextSmall(context),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:
|
text:
|
||||||
"\n\nUse your Stack Wallet backup file to restore your wallets, address book "
|
"\n\nUse your Stack Wallet backup file to restore your wallets, address book "
|
||||||
"and wallet preferences.",
|
"and wallet preferences.",
|
||||||
style:
|
style: STextStyles
|
||||||
STextStyles.desktopTextExtraExtraSmall(context),
|
.desktopTextExtraExtraSmall(context),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -201,7 +215,7 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
|
||||||
padding: EdgeInsets.all(
|
padding: EdgeInsets.all(
|
||||||
10,
|
10,
|
||||||
),
|
),
|
||||||
child: RestoreBackupButton(),
|
child: RestoreFromFileView(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -210,7 +224,10 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue