flutter_image_cropper icon indicating copy to clipboard operation
flutter_image_cropper copied to clipboard

An croppie error

Open Kmak1234 opened this issue 1 year ago • 4 comments

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

Kmak1234 avatar Jun 28 '23 08:06 Kmak1234

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

forkear avatar Aug 29 '23 02:08 forkear

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

flodaniel avatar Jun 13 '24 08:06 flodaniel

I have added the two lines but im still getting the error, I run in console Croppie is not defined, but Cropper its defined

lucas-sesti avatar Jun 21 '24 15:06 lucas-sesti

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

lucas-sesti avatar Jun 21 '24 15:06 lucas-sesti