I just wanted to share something, perhaps for the docs? It wasn't super hard to find out why but I couldn't manage to get flutter test driver to work with the splash screen, it just wouldn't show up and the tests would eventually time out. A bit of sleuthing turned up that I had to manually rely on the underlying flare_flutter package and set it up for testing. The resulting test_driver/main.dart is as follows.
import 'package:flare_flutter/flare_testing.dart';
import 'package:flutter_driver/driver_extension.dart';
import 'package:my_package/main_test.dart' as app;
void main() {
enableFlutterDriverExtension();
FlareTesting.setup(); // <-- This here line
app.main();
}
Just sharing in case anyone else has the same problem or in case it needs to make it into the docs.
I just wanted to share something, perhaps for the docs? It wasn't super hard to find out why but I couldn't manage to get flutter test driver to work with the splash screen, it just wouldn't show up and the tests would eventually time out. A bit of sleuthing turned up that I had to manually rely on the underlying
flare_flutter
package and set it up for testing. The resultingtest_driver/main.dart
is as follows.Just sharing in case anyone else has the same problem or in case it needs to make it into the docs.