testApp function
Runs the callback
inside the Flutter test environment.
This function is the same as flutter_test.testWidgets with the addition to apply the test values from the Flutterware GUI (selected locale, screen sizes, accessibility settings etc...).
Sample code
testApp('MyWidget', (tester) async {
await tester.pumpWidget(MyWidget());
await tester.screenshot();
await tester.tap(find.text('Save'));
expect(find.text('Success'), findsOneWidget);
await tester.screenshot(name: 'Success');
});
Implementation
@isTest
void testApp(String description,
Future<void> Function(flutter_test.WidgetTester tester) body) {
flutter_test.testWidgets(description, withTestValues(body));
}