0

How do I fix it? Changed the variables and it still shows an error. As before, there is a line on getimage, how do I change it? The argument type 'File?' can't be assigned to the parameter type 'File'.enter image description here

I hope you guys can help me fix the problem. Thanks.

1 Answers1

0

Image.file(file) is flagged as an error because file is nullable and most likely of type File?. You already handled the null case hence Image.file(file!) is the not-null case and fixes your issue.

Codefarmer
  • 684
  • 4
  • 8