An error about `WidgetStateColor` when running debug mode on the web
Closed this issue · 4 comments
KalaliEhsan commented
I wanna run the web debug mode for test this package:
flutter run -d web-server --web-hostname=my-host --web-port=my-port
But an error occurred like this:
../../../.pub-cache/hosted/pub.dev/image_cropper_for_web-6.0.1/lib/src/cropper_actionbar.dart:34:21: Error: The getter 'WidgetStateColor' isn't defined for the class '_CropperActionBarState'.
- '_CropperActionBarState' is from 'package:image_cropper_for_web/src/cropper_actionbar.dart' ('../../../.pub-cache/hosted/pub.dev/image_cropper_for_web-6.0.1/lib/src/cropper_actionbar.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'WidgetStateColor'.
WidgetStateColor.resolveWith((states) => iconColor),
The current version of this package:
image_cropper: ^8.0.1
And content of its folder in the .pub-cache
like this photo:
hnvn commented
which flutter version are you using?
KalaliEhsan commented
flutter doctor:
[✓] Flutter (Channel stable, 3.19.4, on macOS 14.2 23C64 darwin-arm64, locale en-IR)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.85.1)
[✓] Connected device (2 available)
! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources
• No issues found!
ndrsrc commented
Same error here
hnvn commented
oh, WidgetSateColor is only available from Flutter v3.22, please upgrade your flutter environment, I will increase flutter version constraints in next package release