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

1

5

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?

Impressible answered 17/6, 2022 at 10:25 Comment(1)
Can you provide your source code to better help your problem?Lateral
B
8

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

Baronetcy answered 17/6, 2022 at 10:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.