Skip to main content

widget_test_capture 0.1.0 copy "widget_test_capture: ^0.1.0" to clipboard
widget_test_capture: ^0.1.0 copied to clipboard

Capture screenshots, animations, and visual reports from Flutter widget tests.

example/lib/main.dart

import 'package:flutter/material.dart';

void main() {
  runApp(const DemoApp());
}

class DemoApp extends StatelessWidget {
  const DemoApp({super.key});

  @override
  Widget build(BuildContext context) => MaterialApp(
        debugShowCheckedModeBanner: false,
        theme: ThemeData(fontFamily: 'DemoRoboto'),
        home: Scaffold(
          appBar: AppBar(title: const Text('Capture demo')),
          body: const Center(child: DemoCounter()),
        ),
      );
}

class DemoCounter extends StatefulWidget {
  const DemoCounter({super.key});

  @override
  State<DemoCounter> createState() => _DemoCounterState();
}

class _DemoCounterState extends State<DemoCounter> {
  int value = 0;

  @override
  Widget build(BuildContext context) => Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          Text('$value', key: const Key('counter-value')),
          FilledButton(
            key: const Key('increment'),
            onPressed: () => setState(() => value++),
            child: const Text('Increment'),
          ),
        ],
      );
}
9
likes
0
points
122
downloads

Publisher

verified publisherthantzin.dev

Weekly Downloads

Capture screenshots, animations, and visual reports from Flutter widget tests.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_test, image, path

More

Packages that depend on widget_test_capture