pickFiles method
Returns the FilePickerResult of the file picking of the provided type.
Implementation
Future<FilePickerResult?> pickFiles({
  FileType type = FileType.any,
  int compressionQuality = 30,
  bool allowMultiple = false,
  bool withData = false,
  bool withReadStream = false,
  bool lockParentWindow = false,
  List<String>? allowedExtensions,
}) async {
  try {
    FileType accounted = type;
    if (type == FileType.custom && isMobile) {
      if (allowedExtensions == NativeFile.images) {
        accounted = FileType.image;
        allowedExtensions = null;
      }
    }
    return await FilePicker.platform.pickFiles(
      type: accounted,
      compressionQuality: compressionQuality,
      allowMultiple: allowMultiple,
      withData: withData,
      withReadStream: withReadStream,
      lockParentWindow: lockParentWindow,
      allowedExtensions: accounted == FileType.custom
          ? allowedExtensions
          : null,
    );
  } on PlatformException catch (e) {
    if (e.code == 'already_active') {
      return null;
    } else {
      rethrow;
    }
  }
}