feat: support xdp selector for linux
use xdp selector
This commit is contained in:
parent
871da6c6a6
commit
b020c90ac5
4 changed files with 20 additions and 41 deletions
|
|
@ -3,7 +3,6 @@ import 'dart:io';
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
import 'package:file_selector/file_selector.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:universal_html/html.dart' as html;
|
||||
|
|
@ -20,18 +19,12 @@ extension MatrixFileExtension on MatrixFile {
|
|||
return;
|
||||
}
|
||||
|
||||
final downloadPath = !PlatformInfos.isMobile
|
||||
? (await getSaveLocation(
|
||||
suggestedName: name,
|
||||
confirmButtonText: L10n.of(context).saveFile,
|
||||
))
|
||||
?.path
|
||||
: await FilePicker.platform.saveFile(
|
||||
dialogTitle: L10n.of(context).saveFile,
|
||||
fileName: name,
|
||||
type: filePickerFileType,
|
||||
bytes: bytes,
|
||||
);
|
||||
final downloadPath = await FilePicker.platform.saveFile(
|
||||
dialogTitle: L10n.of(context).saveFile,
|
||||
fileName: name,
|
||||
type: filePickerFileType,
|
||||
bytes: bytes,
|
||||
);
|
||||
if (downloadPath == null) return;
|
||||
|
||||
if (PlatformInfos.isDesktop) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue