About 50 results
Open links in new tab
  1. An introduction to widget testing - Flutter

    Sep 22, 2025 · The testWidgets function allows you to define a widget test and creates a WidgetTester to work with. This test verifies that MyWidget displays a given title and message.

  2. Widget testing - Flutter

    Oct 28, 2025 · Widget testing A catalog of recipes for adding widget testing to your Flutter app.

  3. Testing Flutter apps

    Oct 30, 2025 · The goal of a widget test is to verify that the widget's UI looks and interacts as expected. Testing a widget involves multiple classes and requires a test environment that provides the …

  4. An introduction to unit testing - Flutter

    Oct 30, 2025 · The test package provides the core framework for writing unit tests, and the flutter_test package provides additional utilities for testing widgets. This recipe demonstrates the core features …

  5. Flutter learning resources

    Dec 12, 2025 · How to test a Flutter app Start with a simple app that manages state with the Provider package. Unit test the provider package. Write widget tests for two of the widgets. Use Flutter Driver …

  6. Testing plugins - Flutter

    Oct 30, 2025 · These tests allow you to test the Dart portion of your plugin just as you would test the Dart code of a non-plugin package. However, the plugin's native code won't be loaded, so any calls …

  7. Find widgets - Flutter

    Sep 22, 2025 · The find constant provided by the flutter_test package provides several ways to locate widgets in the test environment. This recipe demonstrated three of these methods, and several more …

  8. Handle scrolling - Flutter

    Oct 30, 2025 · To scroll through lists via integration tests, use the methods provided by the WidgetTester class, which is included in the flutter_test package: In this recipe, learn how to scroll through a list of …

  9. Tap, drag, and enter text - Flutter

    Oct 30, 2025 · Many widgets not only display information, but also respond to user interaction. This includes buttons that can be tapped, and TextField for entering text. To test these interactions, you …

  10. Handling errors in Flutter

    Jun 24, 2024 · When an error occurs during the build phase, the ErrorWidget.builder callback is invoked to build the widget that is used instead of the one that failed. By default, in debug mode this shows …