约 50 个结果
在新选项卡中打开链接
  1. An introduction to widget testing - Flutter

    2025年9月22日 · 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. Testing Flutter apps

    2026年1月21日 · 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 …

  3. Widget testing - Flutter

    2025年10月28日 · Widget testing A catalog of recipes for adding widget testing to your Flutter app.

  4. An introduction to unit testing - Flutter

    2025年10月30日 · 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 …

  5. Handle scrolling - Flutter

    2025年10月30日 · 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 …

  6. Find widgets - Flutter

    2025年9月22日 · 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 …

  7. Tap, drag, and enter text - Flutter

    2025年10月30日 · 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 …

  8. Debug Flutter apps from code

    2025年10月28日 · If your app uses the Focus widget, use the debugLabel property to simplify finding its focus node in the tree. You can also use the debugFocusChanges boolean property to enable …

  9. Mock dependencies using Mockito - Flutter

    2025年10月30日 · In this example, you've learned how to use Mockito to test functions or classes that depend on web services or databases. This is only a short introduction to the Mockito library and the …

  10. Using Actions and Shortcuts - Flutter

    2025年10月28日 · You pass your ActionDispatcher to the Actions widget, and it invokes actions from any Actions widgets below that one that doesn't set a dispatcher of its own.