Skip to main content

rebuildcop 0.3.0 copy "rebuildcop: ^0.3.0" to clipboard
rebuildcop: ^0.3.0 copied to clipboard

Catch unnecessary widget rebuilds in Flutter: a Dart test helper that fails widget tests over a measured rebuild budget. Headless, no device, no probes.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'set_state/ticking_shop.dart';

/// Runs the fixed shop screen. The interesting part of this example is in
/// `test/`: each file pairs an over-rebuilding widget (BEFORE) with its fix
/// (AFTER) and shows rebuildcop telling them apart.
void main() {
  runApp(
    const MaterialApp(
      home: Scaffold(body: SafeArea(child: TickingShopFast())),
    ),
  );
}
0
likes
160
points
599
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Catch unnecessary widget rebuilds in Flutter: a Dart test helper that fails widget tests over a measured rebuild budget. Headless, no device, no probes.

Repository (GitHub)
View/report issues
Contributing

Topics

#flutter #testing #performance #widget-test #rebuild

License

MIT (license)

Dependencies

flutter, flutter_test

More

Packages that depend on rebuildcop