Syed A.R
Syed A.R

Reputation: 237

'CroppedFile?' can't be assigned to the parameter type 'File', Flutter

After using the Image Cropper plugin in flutter, I want to convert the image to type File to be able to display it in the next screen. I am unable to figure a way to display the Cropped Image. Can I get some help with this?

Upvotes: 5

Views: 2513

Answers (1)

Giraffe
Giraffe

Reputation: 131

You can just create a new File like this

final File imageFile = File(croppedFile.path);

I guess you could also do the same thing reading the bytes but I don't think there is any difference and this seems more straight forward

Upvotes: 8

Related Questions