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