pickMultiFile method

Future<List<XFile>> pickMultiFile({
  1. String? dialogTitle,
  2. String? initialDirectory,
  3. FileType type = FileType.any,
  4. List<String>? allowedExtensions,
  5. OnFileLoading? onFileLoading,
  6. bool allowCompression = false,
  7. bool allowWebStream = false,
  8. bool lockParentWindow = false,
})

See FilePicker.pickFiles. Pick multiple files. On desktop and mobile platforms, this function uses the path to read the file. allowWebStream enables reading of streamed web files but only once.

Implementation

Future<List<XFile>> pickMultiFile({
  String? dialogTitle,
  String? initialDirectory,
  FileType type = FileType.any,
  List<String>? allowedExtensions,
  OnFileLoading? onFileLoading,
  bool allowCompression = false,
  bool allowWebStream = false,
  bool lockParentWindow = false,
}) async {
  return await _pick(
    dialogTitle: dialogTitle,
    initialDirectory: initialDirectory,
    type: type,
    allowedExtensions: allowedExtensions,
    onFileLoading: onFileLoading,
    allowCompression: allowCompression,
    allowMultiple: true,
    allowWebStream: allowWebStream,
    lockParentWindow: lockParentWindow,
  );
}