Added "open with" option after Download
This commit is contained in:
parent
f13d47a9e9
commit
cbcae3a7a1
@ -1,6 +1,7 @@
|
||||
import 'dart:developer';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:better_open_file/better_open_file.dart';
|
||||
import 'package:flowder/flowder.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -35,15 +36,22 @@ class _FileDownloadState extends State<FileDownload> {
|
||||
progress: ProgressImplementation(),
|
||||
deleteOnCancel: true,
|
||||
onDone: () {
|
||||
// OpenFile.open(local).then((value) => () {
|
||||
// log("Result: ${value.toString()}");
|
||||
// });
|
||||
Navigator.of(context).pop();
|
||||
showDialog(context: context, builder: (context) {
|
||||
return AlertDialog(
|
||||
icon: const Icon(Icons.link),
|
||||
title: const Text("Dateipfad"),
|
||||
content: Text(local),
|
||||
actions: [
|
||||
TextButton(
|
||||
child: Text("Öffnen mit"),
|
||||
onPressed: () {
|
||||
OpenFile.open(local).then((value) => () {
|
||||
log("Result: ${value.toString()}");
|
||||
});
|
||||
},
|
||||
)
|
||||
],
|
||||
);
|
||||
});
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user