runTestableWidgetScreen static method

Future<void> runTestableWidgetScreen({
  1. required WidgetTester tester,
  2. Iterable<LocalizationsDelegate>? localizationsDelegates,
  3. Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')],
  4. Locale? locale,
  5. Widget? child,
})

Implementation

static Future<void> runTestableWidgetScreen(
    {required WidgetTester tester,
    Iterable<LocalizationsDelegate<dynamic>>? localizationsDelegates,
    Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')],
    Locale? locale,
    Widget? child}) async {
  HttpOverrides.global = null;
  await tester.pumpWidget(MaterialApp(
    localizationsDelegates: localizationsDelegates,
    supportedLocales: supportedLocales,
    locale: locale,
    home: child,
  ));
  await tester.pump();
}