mirror of
https://github.com/foss42/apidash.git
synced 2025-05-31 22:33:59 +08:00
refactor file picker
This commit is contained in:
@ -4,6 +4,7 @@ import 'package:path/path.dart' as p;
|
||||
import 'package:mime_dart/mime_dart.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
|
||||
const uuid = Uuid();
|
||||
|
||||
@ -50,3 +51,8 @@ String getShortPath(String path) {
|
||||
String getTempFileName() {
|
||||
return uuid.v1();
|
||||
}
|
||||
|
||||
Future<FilePickerResult?> pickFile() async {
|
||||
FilePickerResult? pickedResult = await FilePicker.platform.pickFiles();
|
||||
return pickedResult;
|
||||
}
|
||||
|
Reference in New Issue
Block a user