Home > Back-end >  'CroppedFile?' can't be assigned to the parameter type 'File', Flutter
'CroppedFile?' can't be assigned to the parameter type 'File', Flutter

Time:06-18

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?

CodePudding user response:

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

  • Related