flutter_bench_contract 0.4.0 copy "flutter_bench_contract: ^0.4.0" to clipboard
flutter_bench_contract: ^0.4.0 copied to clipboard

Device performance scenarios and a regression golden gate for Flutter overlay and widget solutions — as a reusable package.

example/README.md

Example: demo consumer #

demo_solution is a minimal consumer of flutter_bench_contract: a fake toast/popover-like solution (a bottom card, no scroll anchor) driven by a hand-written driver. It shows the only library-specific code a consumer writes — the driver — and how the generated scenario bridges wire it into the contract. No external package is involved.

Layout:

  • bench/drivers/demo_solution_driver.dart — the driver (show/update/hide/isStable/currentContent/buildScene). A toast has no anchor, so S4 scroll coupling is declared unsupported.
  • bench/contract/ — generated scenario bridges (S1–S4), byte-identical to what contract init produces.
  • bench_contract.yaml — the consumer manifest.
  • test_driver/integration_test.dart — the device entrypoint that contract run --device compiles.

Run on the host (no device needed):

dart run flutter_bench_contract:contract verify
flutter test bench/contract/s1_idle_zero_test.dart

Run on a device (records goldens under a ref):

dart run flutter_bench_contract:contract run --mode record --ref android

Write your own consumer by copying this layout and replacing the driver.

0
likes
160
points
254
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Device performance scenarios and a regression golden gate for Flutter overlay and widget solutions — as a reusable package.

Repository (GitHub)
View/report issues

Topics

#benchmarking #performance #golden #widget-testing

License

MIT (license)

Dependencies

flutter, flutter_test, vm_service, yaml

More

Packages that depend on flutter_bench_contract