
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 …
Testing & debugging - Flutter
Apr 4, 2024 · Debug Flutter apps from code How to enable various debugging tools from your code and at the command line.
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 …
An introduction to widget testing - Flutter
Sep 22, 2025 · Before writing tests, include the flutter_test dependency in the dev_dependencies section of the pubspec.yaml file. If creating a new Flutter project with the command line tools …
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 …
Mock dependencies using Mockito - Flutter
Oct 30, 2025 · To use the mockito package, add it to the pubspec.yaml file along with the flutter_test dependency in the dev_dependencies section. This example also uses the http …
flutter: The Flutter command-line tool
Oct 28, 2025 · flutter: The Flutter command-line tool The flutter command-line tool is how developers (or IDEs on behalf of developers) interact with Flutter. For Dart related commands, …
Tap, drag, and enter text - Flutter
Oct 30, 2025 · In the test environment, Flutter doesn't automatically rebuild widgets when the state changes. To ensure that the widget tree is rebuilt after simulating a user interaction, call …
Check app functionality with an integration test - Flutter
Oct 28, 2025 · The integration_test package lets you: Use the flutter drive command to run tests on a physical device or emulator. Run on Firebase Test Lab, to automate testing on a variety …
Testing each layer - Flutter
Oct 30, 2025 · To test the UI logic of the view model, you should write unit tests that don't rely on Flutter libraries or testing frameworks. Repositories are a view model's only dependencies …