I am learning more about testing and i want to use Mockito Package and Build Runner Packate then i have my class Cat inside lib/models/cat.dart
then i have my lib/test/cat_test.dart file to test cat class
this is my pubspec.yaml (part of it)
The problem is thrown when i want to run the next command :
dart run build_runner build
and the problem is the next:
Resolving dependencies in /Users/adm/Documents/Things of david/PRACTICAS/Flutter/testing_app... The current Dart SDK version is 2.15.1. Because testing_app requires SDK version >=2.16.1 <3.0.0, version solving failed.
Flutter doctor:
thank you so much for your help.





The answer is in the error message:
It means that the project needs Dart SDK in version 2.16.1 (at least), and your version is 2.15.1.
You should upgrade your Flutter version with
flutter upgrade. For more info see the documentation.