NyWidgetTesterExtension extension
Extension on WidgetTester for Nylo-specific widget testing.
Provides convenient methods for pumping Nylo widgets with proper configuration and testing loading states.
- on
Methods
-
isLoading(
) → bool -
Available on WidgetTester, provided by the NyWidgetTesterExtension extension
Check if a widget is currently in loading state. -
isLoadingNamed(
Finder finder, {required String name}) → bool -
Available on WidgetTester, provided by the NyWidgetTesterExtension extension
Check if a named loading key is active in a NyPage/NyState widget. -
isLockedNamed(
Finder finder, {required String name}) → bool -
Available on WidgetTester, provided by the NyWidgetTesterExtension extension
Check if a named lock is held in a NyPage/NyState widget. -
pumpAndSettleGracefully(
{Duration timeout = const Duration(seconds: 5)}) → Future< void> -
Available on WidgetTester, provided by the NyWidgetTesterExtension extension
Pump and settle with graceful error handling. -
pumpNyWidget(
Widget widget, {ThemeData? theme, ThemeData? darkTheme, ThemeMode themeMode = ThemeMode.light, Duration? settleTimeout, bool useSimpleTheme = false}) → Future< void> -
Available on WidgetTester, provided by the NyWidgetTesterExtension extension
Pump a Nylo widget with proper MaterialApp wrapper and theme support. -
pumpNyWidgetAndWaitForInit(
Widget widget, {Duration timeout = const Duration(seconds: 10), ThemeData? theme, bool useSimpleTheme = false}) → Future< void> -
Available on WidgetTester, provided by the NyWidgetTesterExtension extension
Pump a widget and wait for loading to complete. -
pumpNyWidgetSimple(
Widget widget) → Future< void> -
Available on WidgetTester, provided by the NyWidgetTesterExtension extension
Pump a Nylo widget using a simple theme (no Google Fonts). -
pumpUntilFound(
Finder finder, {Duration timeout = const Duration(seconds: 5)}) → Future< bool> -
Available on WidgetTester, provided by the NyWidgetTesterExtension extension
Pump until a specific widget is found or timeout. -
simulateLifecycleState(
AppLifecycleState state) → Future< void> -
Available on WidgetTester, provided by the NyWidgetTesterExtension extension
Simulate an AppLifecycleState change on any NyPage in the widget tree.