After I do pub upgrade, The error says "The argument type 'File?' can't be assigned to the parameter type 'File'."
Maybe it is because
<await imagesMedia! .where((element) => element.id == id) .first .getFile()> is type 'File?'
But I'm not sure how can I change this.
await Future.forEach(selectedImagesIDs!,
(String id) async {
selectedFiles.add(await imagesMedia!
.where((element) => element.id == id)
.first
.getFile());
please help me