I cloned a project that uses awesome_extensions package version 2.0.5
but the problem is whenever I run the flutter pub get
and run the app. It gives the following error that shows the version 2.0.8
is installed.
../../../.pub-cache/hosted/pub.dev/awesome_extensions-2.0.8/lib/widget_extensions/padding_extension.dart:44:29: Error: Member not found: 'EdgeInsets.fromViewPadding'.
padding: EdgeInsets.fromViewPadding(padding, devicePixelRatio),
2
Answers
What is the dependency pinned to in your pubspec.yaml? If it’s
awesome_extensions: ^2.0.0
, that would explain the issue. If it’sawesome_extensions: 2.0.5
, it should use precisely that version.Without further information, it’s hard to say exactly what’s happening. Some basic troubleshooting you can do is clear the packages cache (
dart pub cache clean
followed byflutter pub get
). Try posting your pubspec.yaml to see if there’s any additional information we can glean from it.Something else you can do is run
flutter pub deps
to view the dependency tree. Perhaps something in there is of use?try calling, flutter clean, flutter clean cache, go to the folders of /.pub-cache/ and delete everything under /pub.dev/ delete also your pubspec.lock and try again flutter pub get