Skip to content

Instantly share code, notes, and snippets.

@YonatanKra
Created September 9, 2025 08:31
Show Gist options
  • Select an option

  • Save YonatanKra/c6da689f410118cb7a63deba2d0cd86f to your computer and use it in GitHub Desktop.

Select an option

Save YonatanKra/c6da689f410118cb7a63deba2d0cd86f to your computer and use it in GitHub Desktop.
Flutter widget second approach
testWidgets('should display “mock_first” in a big card', ( WidgetTester tester, ) async {
    await tester.pumpWidget(
      ChangeNotifierProvider<MyAppState>(
        create: (context) => MockAppState(),
        child: MaterialApp(home: MyHomePage()),
      ),
    );
    expect(getBigCardText(tester), equals('mock_first'));
  });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment