Skip to content

Commit 7d1bc70

Browse files
committed
Clean up cast
1 parent 9aa536f commit 7d1bc70

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/src/react_client/synthetic_data_transfer.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,8 @@ SyntheticDataTransfer syntheticDataTransferFactory(Object dt) {
104104
}
105105

106106
// Copy these lists and ensure they're typed properly.
107-
final files = [].cast<File>();
108-
final types = [].cast<String>();
109-
rawFiles?.forEach(files.add);
110-
rawTypes?.forEach(types.add);
107+
final files = <File>[...?rawFiles];
108+
final types = <String>[...?rawTypes];
111109

112110
return new SyntheticDataTransfer(dropEffect, effectAllowed, files, types);
113111
}

0 commit comments

Comments
 (0)