flutter_image_cropper
flutter_image_cropper copied to clipboard
An croppie error
Hi , im using your package in my web project.
There is a weird error that is says "TypeError: dart.global.Croppie is not a constructor",
Can you elaborate more? Thank you very much
Hello There,
Add following codes inside
tag in file web/index.html:<head>
....
<!-- Croppie -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/croppie/2.6.5/croppie.css" />
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/exif-js/2.3.0/exif.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/croppie/2.6.5/croppie.min.js"></script>
....
</head>
copy from the page: https://pub.dev/packages/image_cropper
/salute
I have added the two lines but still see the error. I also confirmed that the script and CSS are downloaded through the network tab in the developer tools
I have added the two lines but im still getting the error, I run in console Croppie is not defined, but Cropper its defined
I found a workaround, I downloaded the files that is necessary to run the croppie, and added in my web/ folder in flutter, and imported locally instead from url, and work it