Target of URI doesn't exist: 'package:badges/badges.dart'

35 Views Asked by At

This is highly unusual, but after adding the badges package to my Flutter project's pubspec.yaml library, I am unable to import the badges package into a file for use.

To add the package I have tried (1) "flutter pub add badges" within my project's root directory, and also (2) "badges: ^3.1.2" and later "badges: ^2.0.3" beneath other package-titles within the pubspec.yaml file, followed by the "pub get button".

badges package added

Despite Flutter's confirmation of the package being added, the package cannot be added to a file of the project.

To complicate things further, I tried adding the package to a different Flutter project, and there the "badges" package can be added to files.

It seems that within a particular project the badges package isn't working properly. My question is how can this issue be resolved?

0

There are 0 best solutions below