This project is a Dart pub workspace.
A single pub get at the repository root resolves dependencies for every
package in the monorepo and links them together. Requires Dart >=3.6.0
(Flutter >=3.27.0).
- Clone the repository and fetch dependencies for the whole workspace:
flutter pub getYou can now run the example or playground apps directly. Local changes to
box_transform and flutter_box_transform are picked up automatically
because they are workspace members.
Run from the repo root to test all packages:
flutter testUse
flutter test(notdart test) — the workspace contains Flutter packages, so the Dart-only resolver can't be used.
- Install genhtml:
brew install lcov- Run tests and generate report:
cd packages/box_transform
flutter pub run coverage:test_with_coverage
flutter pub run coverage:format_coverage --packages=../../.dart_tool/package_config.json --lcov -i coverage/coverage.json -o coverage/lcov.info
genhtml coverage/lcov.info -o coverage/html- Open
packages/box_transform/coverage/html/index.htmlin your browser to view the report.
Run from the repo root to cover every package:
dart format .
dart analyze . --fatal-infos --fatal-warningsThe test suites use two complementary prefixes:
rotated_<feature>_test.dartcovers an existing feature under rotation (e.g.rotated_freeform_test.dart,rotated_side_handle_test.dart).rotation_<aspect>_test.dartcovers the rotation feature itself (e.g.rotation_primitives_test.dart,rotation_integration_test.dart).
clamp_*_test.dart files are targeted regression tests for clamp behavior
(clamp_invariants_test.dart, clamp_at_saturation_move_test.dart); the
older clamped_*_resizing_test.dart family covers the legacy
"resize-with-clamping-enabled" suites.
packages/flutter_box_transform/test mirrors the same scheme for widget /
controller tests (rotated_* for features, rotation_* for rotation
itself).
The playground has a built-in test recorder accessible from its side panel.
It captures every onResizeUpdate tick of a gesture (cursor positions +
rect outputs) along with the active rotation and bindingStrategy, and
exports a tick-by-tick replay test with per-tick clamp invariants. The
exported file uses BoxTransformer.resize(...) directly, so it lives in
packages/box_transform/test/. Use it whenever you find a visual bug that
only manifests under continuous gesture motion — a single direct jump from
start to end often won't reproduce the bug the recorder catches.