Refactoring chatBubble.dart to stateful widget

This commit is contained in:
2023-05-06 20:48:22 +02:00
parent 290295b26a
commit ac88f84321
3 changed files with 106 additions and 61 deletions

View File

@ -18,7 +18,7 @@ class FileElement extends StatefulWidget {
final List<String> path;
const FileElement(this.file, this.path, {Key? key}) : super(key: key);
static void download(String remotePath, String name, Function(double) onProgress, Function(OpenResult) onDone) async {
static Future<DownloaderCore> download(String remotePath, String name, Function(double) onProgress, Function(OpenResult) onDone) async {
Directory paths = await getApplicationDocumentsDirectory();
String local = paths.path + Platform.pathSeparator + name;
@ -40,7 +40,7 @@ class FileElement extends StatefulWidget {
},
);
await Flowder.download(
return await Flowder.download(
"${await WebdavApi.webdavConnectString}$remotePath",
options,
);