mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-03 12:24:19 +01:00
Some another fixes for Android. Never ask us about that.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:cake_wallet/core/backup_service.dart';
|
||||
import 'package:cake_wallet/core/execution_state.dart';
|
||||
import 'package:cake_wallet/entities/secret_store_key.dart';
|
||||
@@ -66,4 +68,12 @@ abstract class BackupViewModelBase with Store {
|
||||
|
||||
@action
|
||||
void showMasterPassword() => isBackupPasswordVisible = true;
|
||||
|
||||
@action
|
||||
Future<void> saveToDownload(String name, List<int> content) async {
|
||||
const downloadDirPath = '/storage/emulated/0/Download'; // For Android
|
||||
final filePath = '$downloadDirPath/${name}';
|
||||
final file = File(filePath);
|
||||
await file.writeAsBytes(content);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user