Image_cropper_platform_interface-7.2.0 Error: The method 'toARGB32' isn't defined for the class 'Color'.
Image_cropper_platform_interface-7.2.0 getting below error
.pub-cache/hosted/pub.dev/image_cropper_platform_interface-7.2.0/lib/src/models/settings.dart:244:59: Error: The method 'toARGB32' isn't defined for the class 'Color'.
stuck over here from last week need to provide import update but due to this error unable to do.
let me know if any one have alternative solution
Workaround for Flutter + image_cropper_platform_interface bug
If you get the error:
with image_cropper_platform_interface 7.x and Flutter stable (September 2025), you can temporarily fix it by replacing all .toARGB32() calls with .value in:
.pub-cache/hosted/pub.dev/image_cropper_platform_interface-7.2.0/lib/src/models/settings.dart
This is a temporary patch until the package is updated.
Pls fix this asap
Is there any resolution for this?
pls fix it
Image_cropper_platform_interface-7.2.0 getting below error
.pub-cache/hosted/pub.dev/image_cropper_platform_interface-7.2.0/lib/src/models/settings.dart:244:59: Error: The method 'toARGB32' isn't defined for the class 'Color'.
stuck over here from last week need to provide import update but due to this error unable to do.
let me know if any one have alternative solution
add this dependency .it works for me
flutter pub add image_cropper:8.1.0
Image_cropper_platform_interface-7.2.0 getting below error .pub-cache/hosted/pub.dev/image_cropper_platform_interface-7.2.0/lib/src/models/settings.dart:244:59: Error: The method 'toARGB32' isn't defined for the class 'Color'. stuck over here from last week need to provide import update but due to this error unable to do. let me know if any one have alternative solution
add this dependency .it works for me
flutter pub add image_cropper:8.1.0
Already done remove cap sign and same version but in pub.cache hosted yaml platform interface is ^7.0.0 and that will contain error so this will not work and i don't find this is best approach
A fix for this would be nice:
EDIT: image_cropper_platform_interface: 7.1.0
Forcing 7.1.0 seems to work now as well.(Note I am on Flutter 3.27.4)
A fix for this would be nice:
EDIT: image_cropper_platform_interface: 7.1.0
Forcing 7.1.0 seems to work now as well.(Note I am on Flutter 3.27.4)
better to be follow @shinesoftware approach at least. and hopefully owner will fix this ASAP soon
A fix for this would be nice:
EDIT: image_cropper_platform_interface: 7.1.0
Forcing 7.1.0 seems to work now as well.(Note I am on Flutter 3.27.4)
This worked for me too, even though I never imported this package, forcing the dependency version in the pubspec.yaml
dependency_overrides:
image_cropper: 9.0.0
image_cropper_platform_interface: 7.1.0
I'm also on Flutter 3.27.4.