This is a lightweight, pure-Dart starter you can drop into your Flutter repo or run as a tiny Dart package. It includes:
lib/features/level/math/leveling_math.dartwith pure math utilitiestest/features/level/math/leveling_math_test.dartwith unit tests- minimal
pubspec.yamlso you can run tests even outside Flutter
cd levelmate_starter
dart pub get
dart testMove the lib/ and test/ folders into your Flutter app repo. In your app's pubspec.yaml, add:
dev_dependencies:
test: ^1.25.0Then run:
flutter test- All angles are in degrees; distances are inches.
- For trailers, level side-to-side with wheel shims first, then use
computeHitchLiftto set tongue jack height. - Use
Calibrationto zero out minor floor/chassis differences. planBlockshelps convert exact lift to a stack of common leveling blocks.