Skip to content
pubscout

spot

0.22.0, released 7 weeks ago by pascalwelsch.com

Toolkit for Flutter widget tests with chainable selectors and automatic timeline reports.

$ flutter pub add spot
Source repository

What it does

Spot simplifies queries and assertions against the widget tree using a chainable selector API called spot. It visualizes test steps and assertions as an HTML timeline report complete with automatic screenshots.

AI-written summary of version 0.22.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want more readable and chainable widget queries in Flutter widget tests
  • You need automatic screenshots and HTML timeline reports for failing tests

Skip it when

  • You prefer using standard flutter_test finders and matchers exclusively

Strengths

  • Chainable selectors for precise widget queries
  • Automatic HTML timeline generation with screenshots on test failure
  • Clearer error messages and full widget tree dumps

Weaknesses

  • Adds an opinionated testing wrapper over the built-in flutter_test package

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
12

Add spot to dev_dependencies in pubspec.yaml and optionally load app fonts in tests using loadAppFonts().

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:spot/spot.dart';

void main() {
  testWidgets('existing Widget test', (tester) async {
     await tester.pumpWidget(MyApp());
     await act.tap(spot<ElevatedButton>());
     spot<Scaffold>().spotText('monde').existsOnce();
  });
}

Alternatives

Packages that do the same job and could replace spot.

Works with

Packages commonly used together with spot: ones it builds on, ones built on it, and its own family.