Refactoring chatBubble.dart to stateful widget
This commit is contained in:
@ -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,
|
||||
);
|
||||
|
Reference in New Issue
Block a user