mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-25 08:38:45 +00:00
ios disable select location to save swb and default to Docs dir
This commit is contained in:
parent
bc4d3d7381
commit
81a4d2f1eb
6 changed files with 27 additions and 22 deletions
|
@ -88,7 +88,7 @@ class _EnableAutoBackupViewState extends ConsumerState<CreateAutoBackupView> {
|
||||||
passwordFocusNode = FocusNode();
|
passwordFocusNode = FocusNode();
|
||||||
passwordRepeatFocusNode = FocusNode();
|
passwordRepeatFocusNode = FocusNode();
|
||||||
|
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid || Platform.isIOS) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
|
WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
|
||||||
final dir = await stackFileSystem.prepareStorage();
|
final dir = await stackFileSystem.prepareStorage();
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
|
@ -151,11 +151,11 @@ class _EnableAutoBackupViewState extends ConsumerState<CreateAutoBackupView> {
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
if (!Platform.isAndroid)
|
if (!Platform.isAndroid && !Platform.isIOS)
|
||||||
TextField(
|
TextField(
|
||||||
autocorrect: Util.isDesktop ? false : true,
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
enableSuggestions: Util.isDesktop ? false : true,
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
onTap: Platform.isAndroid
|
onTap: Platform.isAndroid || Platform.isIOS
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
try {
|
try {
|
||||||
|
@ -213,7 +213,7 @@ class _EnableAutoBackupViewState extends ConsumerState<CreateAutoBackupView> {
|
||||||
),
|
),
|
||||||
onChanged: (newValue) {},
|
onChanged: (newValue) {},
|
||||||
),
|
),
|
||||||
if (!Platform.isAndroid)
|
if (!Platform.isAndroid && !Platform.isIOS)
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
|
|
|
@ -80,7 +80,7 @@ class _RestoreFromFileViewState extends State<CreateBackupView> {
|
||||||
passwordFocusNode = FocusNode();
|
passwordFocusNode = FocusNode();
|
||||||
passwordRepeatFocusNode = FocusNode();
|
passwordRepeatFocusNode = FocusNode();
|
||||||
|
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid || Platform.isIOS) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
|
WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
|
||||||
final dir = await stackFileSystem.prepareStorage();
|
final dir = await stackFileSystem.prepareStorage();
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
|
@ -179,14 +179,14 @@ class _RestoreFromFileViewState extends State<CreateBackupView> {
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
if (!Platform.isAndroid)
|
if (!Platform.isAndroid && !Platform.isIOS)
|
||||||
Consumer(builder: (context, ref, __) {
|
Consumer(builder: (context, ref, __) {
|
||||||
return Container(
|
return Container(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
autocorrect: Util.isDesktop ? false : true,
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
enableSuggestions: Util.isDesktop ? false : true,
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
onTap: Platform.isAndroid
|
onTap: Platform.isAndroid || Platform.isIOS
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
try {
|
try {
|
||||||
|
@ -248,7 +248,7 @@ class _RestoreFromFileViewState extends State<CreateBackupView> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
if (!Platform.isAndroid)
|
if (!Platform.isAndroid && !Platform.isIOS)
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: !isDesktop ? 8 : 24,
|
height: !isDesktop ? 8 : 24,
|
||||||
),
|
),
|
||||||
|
|
|
@ -260,7 +260,7 @@ class _EditAutoBackupViewState extends ConsumerState<EditAutoBackupView> {
|
||||||
passwordFocusNode = FocusNode();
|
passwordFocusNode = FocusNode();
|
||||||
passwordRepeatFocusNode = FocusNode();
|
passwordRepeatFocusNode = FocusNode();
|
||||||
|
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid || Platform.isIOS) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
|
WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
|
||||||
final dir = await stackFileSystem.prepareStorage();
|
final dir = await stackFileSystem.prepareStorage();
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
|
@ -346,11 +346,11 @@ class _EditAutoBackupViewState extends ConsumerState<EditAutoBackupView> {
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
if (!Platform.isAndroid)
|
if (!Platform.isAndroid && !Platform.isIOS)
|
||||||
TextField(
|
TextField(
|
||||||
autocorrect: Util.isDesktop ? false : true,
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
enableSuggestions: Util.isDesktop ? false : true,
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
onTap: Platform.isAndroid
|
onTap: Platform.isAndroid || Platform.isIOS
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
try {
|
try {
|
||||||
|
@ -418,7 +418,7 @@ class _EditAutoBackupViewState extends ConsumerState<EditAutoBackupView> {
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
),
|
),
|
||||||
if (!Platform.isAndroid)
|
if (!Platform.isAndroid && !Platform.isIOS)
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
|
|
|
@ -79,11 +79,16 @@ class SWBFileSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> pickDir(BuildContext context) async {
|
Future<void> pickDir(BuildContext context) async {
|
||||||
final String? path = await FilePicker.platform.getDirectoryPath(
|
final String? path;
|
||||||
dialogTitle: "Choose Backup location",
|
if (Platform.isIOS) {
|
||||||
initialDirectory: startPath!.path,
|
path = startPath?.path;
|
||||||
lockParentWindow: true,
|
} else {
|
||||||
);
|
path = await FilePicker.platform.getDirectoryPath(
|
||||||
|
dialogTitle: "Choose Backup location",
|
||||||
|
initialDirectory: startPath!.path,
|
||||||
|
lockParentWindow: true,
|
||||||
|
);
|
||||||
|
}
|
||||||
dirPath = path;
|
dirPath = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ class _CreateAutoBackup extends ConsumerState<CreateAutoBackup> {
|
||||||
passphraseFocusNode = FocusNode();
|
passphraseFocusNode = FocusNode();
|
||||||
passphraseRepeatFocusNode = FocusNode();
|
passphraseRepeatFocusNode = FocusNode();
|
||||||
|
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid || Platform.isIOS) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
|
WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
|
||||||
final dir = await stackFileSystem.prepareStorage();
|
final dir = await stackFileSystem.prepareStorage();
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
|
@ -174,14 +174,14 @@ class _CreateAutoBackup extends ConsumerState<CreateAutoBackup> {
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
if (!Platform.isAndroid)
|
if (!Platform.isAndroid && !Platform.isIOS)
|
||||||
Consumer(builder: (context, ref, __) {
|
Consumer(builder: (context, ref, __) {
|
||||||
return Container(
|
return Container(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
autocorrect: false,
|
autocorrect: false,
|
||||||
enableSuggestions: false,
|
enableSuggestions: false,
|
||||||
onTap: Platform.isAndroid
|
onTap: Platform.isAndroid || Platform.isIOS
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
try {
|
try {
|
||||||
|
@ -241,7 +241,7 @@ class _CreateAutoBackup extends ConsumerState<CreateAutoBackup> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
if (!Platform.isAndroid)
|
if (!Platform.isAndroid && !Platform.isIOS)
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 24,
|
height: 24,
|
||||||
),
|
),
|
||||||
|
|
|
@ -140,7 +140,7 @@ dependencies:
|
||||||
pointycastle: ^3.6.0
|
pointycastle: ^3.6.0
|
||||||
package_info_plus: ^4.0.2
|
package_info_plus: ^4.0.2
|
||||||
lottie: ^2.3.2
|
lottie: ^2.3.2
|
||||||
file_picker: ^5.5.0
|
file_picker: ^8.0.3
|
||||||
connectivity_plus: ^4.0.1
|
connectivity_plus: ^4.0.1
|
||||||
isar: 3.0.5
|
isar: 3.0.5
|
||||||
isar_flutter_libs: 3.0.5 # contains the binaries
|
isar_flutter_libs: 3.0.5 # contains the binaries
|
||||||
|
|
Loading…
Reference in a new issue