Want to do integration testing in Flutter? You have to add this code inside the test_driver/app.dart file.
1 2 3 4 5 6 7 8 9 10 11 | import 'package:flutter_driver/driver_extension.dart'; import 'package:[YOUR_APP]/main.dart' as app; void main() { // This line enables the extension enableFlutterDriverExtension(); // Call the `main()` function of your app or call `runApp` with any widget you // are interested in testing. app.main(); } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.