flutter-add-widget-test

Installation
SKILL.md

Writing Flutter Widget Tests

Contents

Setup & Configuration

Ensure the testing environment is properly configured before authoring widget tests.

  1. Add the flutter_test dependency to the dev_dependencies section of pubspec.yaml.
  2. Place all test files in the test/ directory at the root of the project.
  3. Suffix all test file names with _test.dart (e.g., widget_test.dart).

Core Components

Utilize the following flutter_test components to interact with and validate the widget tree:

Related skills
Installs
5.8K
Repository
flutter/skills
GitHub Stars
1.9K
First Seen
Apr 24, 2026