feat: Add a proper file saver

This commit is contained in:
Sorunome 2021-07-11 17:12:56 +02:00
commit c96486e9a0
8 changed files with 73 additions and 63 deletions

View file

@ -6,12 +6,13 @@ import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'matrix_file_extension.dart';
extension LocalizedBody on Event {
void openFile(BuildContext context) async {
void saveFile(BuildContext context) async {
final matrixFile = await showFutureLoadingDialog(
context: context,
future: () => downloadAndDecryptAttachmentCached(),
);
matrixFile.result?.open();
matrixFile.result?.save(context);
}
IconData get statusIcon {