Skip to content

Commit

Permalink
refactor: using types instead of var
Browse files Browse the repository at this point in the history
  • Loading branch information
amrgetment committed Apr 17, 2024
1 parent 2e15033 commit f63f787
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/_internal/file_picker_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ class FilePickerWeb extends FilePicker {
Completer<List<PlatformFile>?>();

String accept = _fileType(type, allowedExtensions);
HTMLInputElement uploadInput =
document.createElement('input') as HTMLInputElement;
HTMLInputElement uploadInput = HTMLInputElement();
uploadInput.type = 'file';
uploadInput.draggable = true;
uploadInput.multiple = allowMultiple;
Expand Down Expand Up @@ -105,7 +104,7 @@ class FilePickerWeb extends FilePicker {
}
}

for (var i = 0; i < files.length; i++) {
for (int i = 0; i < files.length; i++) {
final File? file = files.item(i);
if (file == null) {
continue;
Expand Down Expand Up @@ -162,7 +161,7 @@ class FilePickerWeb extends FilePicker {
window.addEventListener('focus', cancelledEventListener.toJS);

//Add input element to the page body
var firstChild = _target.firstChild;
Node? firstChild = _target.firstChild;
while (firstChild != null) {
_target.removeChild(firstChild);
firstChild = _target.firstChild;
Expand Down

0 comments on commit f63f787

Please sign in to comment.