Skip to content

feat: Add modern Flutter UI for FlatFinder app - #1

Open
ronb1964 wants to merge 1 commit into
mainfrom
claude/flatfinder-new-ui-019XR5j6Z4CtTGNKkrL6s3hr
Open

feat: Add modern Flutter UI for FlatFinder app#1
ronb1964 wants to merge 1 commit into
mainfrom
claude/flatfinder-new-ui-019XR5j6Z4CtTGNKkrL6s3hr

Conversation

@ronb1964

@ronb1964 ronb1964 commented Dec 3, 2025

Copy link
Copy Markdown
Owner

Transform the leveling math library into a full Flutter application with:

  • Visual 2D bubble level with animations and glow effects
  • Dashboard showing pitch/roll readings with colored indicators
  • Adjustment cards with block stacking recommendations
  • Settings screen for vehicle type and dimensions
  • Calibration system for zeroing sensor offsets
  • Dark theme with glassmorphism design
  • Demo mode for testing without sensors
  • Provider-based state management
  • Support for trailers, vans, and motorhomes

Note

Transforms the project into the FlatFinder Flutter app with a sensor-driven leveling UI, settings, theming, and provider-based state management.

  • UI/UX (Flutter app):
    • Add lib/features/level/screens/home_screen.dart with animated bubble level (BubbleLevel), tilt cards, adjustment tabs, status banner, and quick actions.
    • Add widgets: features/level/widgets/bubble_level.dart, tilt_card.dart, adjustment_card.dart with block recommendations visualization.
    • Implement dark theme and components in lib/core/theme/app_theme.dart.
  • State & Logic:
    • Introduce LevelProvider in lib/core/providers/level_provider.dart for pitch/roll, demo mode, safety checks, block planning, and persistence via shared_preferences.
    • Integrate leveling math (features/level/math/leveling_math.dart) for side shim/hitch/fore-aft calculations and block planning.
  • Settings:
    • Add lib/features/settings/screens/settings_screen.dart to manage vehicle type, dimensions, safety threshold, and calibration.
  • App bootstrap & config:
    • Add lib/main.dart to wire Provider and theme; lock portrait orientation.
    • Update pubspec.yaml with Flutter app metadata and deps (sensors_plus, shared_preferences, provider, google_fonts).
    • Add linting via analysis_options.yaml.
  • Docs:
    • Overhaul README.md with app description, features, architecture, and setup.

Written by Cursor Bugbot for commit 917d7c3. This will update automatically on new commits. Configure here.

Transform the leveling math library into a full Flutter application with:

- Visual 2D bubble level with animations and glow effects
- Dashboard showing pitch/roll readings with colored indicators
- Adjustment cards with block stacking recommendations
- Settings screen for vehicle type and dimensions
- Calibration system for zeroing sensor offsets
- Dark theme with glassmorphism design
- Demo mode for testing without sensors
- Provider-based state management
- Support for trailers, vans, and motorhomes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

_roll = _calibration.applyRoll(_rawRoll);

notifyListeners();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Demo mode doesn't block real sensor updates causing race

When demo mode is enabled, the _updateFromAccelerometer method continues to receive and process sensor events without checking the _demoMode flag. This creates a race condition where both the demo timer (running every 50ms) and the real accelerometer subscription concurrently update _pitch, _roll, _rawPitch, and _rawRoll. The result is erratic, flickering values in the UI when demo mode is enabled on a device with working sensors, making the demo mode feature effectively broken.

Additional Locations (1)

Fix in Cursor Fix in Web

: 'Front Axle Leveling',
subtitle: provider.vehicleType == VehicleType.trailer
? '${provider.pitch > 0 ? "Lower" : "Raise"} the hitch'
: 'Raise the ${provider.pitch > 0 ? "front" : "rear"} axle',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Van/motorhome subtitle gives inverted leveling direction

The van/motorhome adjustment subtitle has inverted logic. When pitch > 0 (nose up, front is higher), the subtitle says "Raise the front axle", but raising the already-high front would worsen the tilt. The correct instruction is to raise the rear axle to level the vehicle. Similarly, when pitch is negative (rear is higher), it incorrectly suggests raising the rear. The ternary condition provider.pitch > 0 ? "front" : "rear" has the values swapped.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants