Skip to content
masterclass Buddy

Flutter & Dart · Command

flutter test

WidgetTester lets Flutter tests load widget trees, perform user-like actions, control fake time, and inspect results. It is normally provided to the callback passed to testWidgets.

Last updated

Syntax

testWidgets(String description, WidgetTesterCallback callback, {bool? skip, Timeout? timeout, bool semanticsEnabled = true, TestVariant<Object?> variant = const DefaultTestVariant(), dynamic tags, int? retry, LeakTesting? experimentalLeakTesting}) → void

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • testWidgets
  • Finder
  • find
  • Matcher
  • findsOneWidget
  • pumpWidget
  • pump

Source: WidgetTester class - flutter_test library - Dart API. Checked 2026-11-03.