To be able to use TestFairy Flutter Plugin 2.+, you must have the environment specified below and upgrade your project code base to Dart 2 using this guide.
environment:
sdk: ">=2.10.0 <3.0.0"
flutter: ">=1.22.0 <2.0.0"
Make sure your project root has an analysis_options.yaml that looks similar to this. The important part is the enabled experiment in the top declaration.
You also have to enable the same experiment in your run and test commands:
flutter run --enable-experiment=non-nullable --no-sound-null-safety
flutter drive --enable-experiment=non-nullable --no-sound-null-safety -v --target=test_driver/app.dart
If this transition is not suitable for your project, you can stay in TestFairy plugin 1.0.25 but that requires an upper limit on your Dart and Flutter version specified like this:
environment:
sdk: ">=2.0.0 <2.1.0"
flutter: ">=1.0.0 <1.12.0"