Please share your pubspec.yaml
file so we can take a closer look. The test package is normally used for writing and running Dart tests, so if you’re not explicitly using it, the issue may be related to your Flutter/Dart setup rather than your project dependencies.
Make sure that Dart is correctly configured with your Flutter SDK (sometimes the system-installed Dart can conflict with Flutter’s bundled Dart). If everything looks fine and the issue persists, try uninstalling and reinstalling Flutter to reset any corrupted caches or misconfigurations.