updated libs, fixed transaction form
This commit is contained in:
@@ -20,11 +20,17 @@ class JsonStorageClient {
|
||||
}
|
||||
|
||||
Future<File> _getJson(String filename) async {
|
||||
final dir = await getApplicationDocumentsDirectory();
|
||||
final file = File('${dir.path}/$filename');
|
||||
if (!file.existsSync()) {
|
||||
file.createSync();
|
||||
final rootDirectory = Platform.isAndroid ? await getExternalStorageDirectory() : await getApplicationDocumentsDirectory();
|
||||
|
||||
final appDirectory = Directory('${rootDirectory!.path}/krezus');
|
||||
if (!appDirectory.existsSync()) {
|
||||
appDirectory.createSync();
|
||||
}
|
||||
return file;
|
||||
|
||||
final targetFile = File('${rootDirectory.path}/krezus/$filename');
|
||||
if (!targetFile.existsSync()) {
|
||||
targetFile.createSync();
|
||||
}
|
||||
return targetFile;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user