Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Simplify
  • Loading branch information
Amir-P committed Dec 14, 2023
commit 1cd98cb005e255da54584b8bd06ca79c863a7ebe
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class ImagePickerPlugin extends ImagePickerPlatform {
) as html.FileUploadInputElement;
_injectAndActivate(input);

return _getSelectedXFiles(input).whenComplete(() => _remove(input));
return _getSelectedXFiles(input).whenComplete(input.remove);
}

// Deprecated methods follow...
Expand Down Expand Up @@ -320,9 +320,6 @@ class ImagePickerPlugin extends ImagePickerPlatform {
// TODO(dit): Reimplement this with the showPicker() API, https://github.com/flutter/flutter/issues/130365
element.click();
}

/// Removes the file input element
void _remove(html.Element element) => _target.children.clear();
}

// Some tools to override behavior for unit-testing
Expand Down