-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Closed
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/
Description
This is a very simple issue:
/// Before a test file is executed, the Flutter test framework will scan up the
/// directory hierarchy, starting from the directory in which the test file
/// resides, looking for a file named `flutter_test_config.dart`. If it finds
/// such a configuration file, the file will be assumed to have a `main` method
/// with the following signature:
///
/// ```dart
/// Future<void> main(FutureOr<void> testMain());
/// ```This is what the flutter_test documentation says.
When I try to write the following code using Dart 2.12.0 (build 2.12.0-29.10.beta):
Future<void> main(FutureOr<void> Function() testMain) async {
await testMain();
}I receive the following error:
The type of the first positional parameter of the 'main' function must be a supertype of List.
It seems like what flutter_test used for configuration is now impossible.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/