Upgraded to Flutter 3.0 from 2.8.1, getting: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null error
It's on binding.dart
- a file I don't touch at all.
() => PaintingBinding.instance?.imageCache?.evict(key),
^
Any chance you guys know how I can fix it?
Don't know if related, but also seeing this a lot:
Class 'kotlin.Unit' was compiled with an incompatible version
Used the guide here to migrate: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
CodePudding user response:
remove "?" at () => PaintingBinding.instance?.imageCache?.evict(key),
CodePudding user response:
So, something which helped me:
- remove the next folder /Users/your-user/.pub-cache/hosted/pub.dartlang.org
- hit
flutter pub upgrade
and then try to run your project