Merge master branch improvements into dev/floating-window-wip

Resolved conflicts:
- CLAUDE.md: Updated documentation to match master branch structure
- main.dart: Hybrid overlay sizing - proportional with reasonable limits (280-400w, 140-300h)

This brings the layout improvements from master (better flex ratios and sizing)
into the advanced floating window development branch.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Mikkeli Matlock
2025-08-26 19:33:56 +09:00
2 changed files with 26 additions and 14 deletions
+20 -9
View File
@@ -33,17 +33,21 @@ Permissions: Location services + SYSTEM_ALERT_WINDOW for overlay functionality
## Recent Updates (v2.1.0) ## Recent Updates (v2.1.0)
### ✅ Completed Features ### ✅ Completed Features (Master Branch - Stable)
- [x] **Split Decimal Display**: Main speed prominent with smaller, faded decimal fraction for better readability - [x] **Split Decimal Display**: Main speed prominent with smaller, faded decimal fraction for better readability
- [x] **Optimized Content Sizing**: Maximized readability with improved responsive layout and flex ratios - [x] **Optimized Content Sizing**: Maximized readability with improved responsive layout and flex ratios
- [x] **Basic Floating Window**: Simple overlay with "GPS SPEEDO" text and close button (stable implementation)
- [x] **Navigation Icon Trigger**: Tap compass/navigation area to launch floating window overlay
- [x] **Multiple Close Options**: Overlay close button and long-press navigation area for easy dismissal
- [x] **Android System Integration**: SYSTEM_ALERT_WINDOW permissions and foreground service configuration
### 🚧 Work in Progress Features (Seriously WIP - Dev Branch) ### 🚧 Work in Progress Features (dev/floating-window-wip Branch - Seriously Buggy)
- [ ] **Floating Window Overlay**: System-level overlay window - basic functionality works but seriously buggy - [ ] **Advanced Floating Window Overlay**: System-level overlay with live GPS data - basic functionality works but seriously buggy
- GPS data synchronization implemented but unreliable - GPS data synchronization implemented but unreliable
- Theme/unit sync between main app and overlay works partially - Theme/unit sync between main app and overlay works partially
- Proportional sizing and positioning needs major refinement - Proportional sizing and positioning needs major refinement
- Close button functionality works but overlay behavior inconsistent - Close button functionality works but overlay behavior inconsistent
- Android SYSTEM_ALERT_WINDOW permissions configured - Performance may impact main app, needs optimization
### Previous Updates (v1.1) ### Previous Updates (v1.1)
- [x] **Portrait/Landscape Support**: Automatic orientation detection implemented - [x] **Portrait/Landscape Support**: Automatic orientation detection implemented
@@ -52,17 +56,19 @@ Permissions: Location services + SYSTEM_ALERT_WINDOW for overlay functionality
## TODO - Future Improvements ## TODO - Future Improvements
### Known Issues (Dev Branch - Floating Window WIP) ### Known Issues
**Master Branch (v2.1.0 - Stable):**
- [ ] **Dependency Updates**: Update packages to latest compatible versions
- [ ] **Orientation Override**: Fix auto-rotate to work regardless of system toggle status
**Dev Branch (floating-window-wip - Seriously Buggy):**
- [ ] **Floating Window Reliability**: Overlay behavior inconsistent across different devices and Android versions - [ ] **Floating Window Reliability**: Overlay behavior inconsistent across different devices and Android versions
- [ ] **GPS Data Sync**: Real-time GPS synchronization between main app and overlay unreliable - [ ] **GPS Data Sync**: Real-time GPS synchronization between main app and overlay unreliable
- [ ] **Theme/Unit Sync**: Setting synchronization works partially but not consistently - [ ] **Theme/Unit Sync**: Setting synchronization works partially but not consistently
- [ ] **Overlay Positioning**: Poor positioning stability, sizing calculations need major work - [ ] **Overlay Positioning**: Poor positioning stability, sizing calculations need major work
- [ ] **Performance**: Overlay may impact main app performance, needs optimization - [ ] **Performance**: Overlay may impact main app performance, needs optimization
### Critical Issues
- [ ] **Dependency Updates**: Update packages to latest compatible versions
- [ ] **Orientation Override**: Fix auto-rotate to work regardless of system toggle status
### UI/UX Enhancements ### UI/UX Enhancements
- [ ] **Background Customization**: Custom background color selection - [ ] **Background Customization**: Custom background color selection
- [ ] **Interface Rearrangement**: User-defined layout customization - [ ] **Interface Rearrangement**: User-defined layout customization
@@ -85,6 +91,11 @@ Permissions: Location services + SYSTEM_ALERT_WINDOW for overlay functionality
- **Memory**: Project uses automatic Claude Code memory - this file for major decisions only - **Memory**: Project uses automatic Claude Code memory - this file for major decisions only
- **Git**: Active repository at `https://github.com/mikkelimatlock/gps_speedo` - **Git**: Active repository at `https://github.com/mikkelimatlock/gps_speedo`
## Branch Strategy
- **master**: Stable releases, ready for production APK builds
- **dev/floating-window-wip**: Advanced floating window development (seriously buggy, not for release)
- Tagged releases: v2.1.0 on master branch contains stable basic floating window
## Code Patterns to Maintain ## Code Patterns to Maintain
- Provider pattern for state management - Provider pattern for state management
- Separate widgets for reusability - Separate widgets for reusability
+6 -5
View File
@@ -191,7 +191,7 @@ class _SpeedometerScreenState extends State<SpeedometerScreen> with WidgetsBindi
'screenHeight': screenSize.height, 'screenHeight': screenSize.height,
}); });
// Show the overlay with proportional sizing // Show the overlay with hybrid sizing - proportional but with reasonable limits
await FlutterOverlayWindow.showOverlay( await FlutterOverlayWindow.showOverlay(
enableDrag: true, enableDrag: true,
overlayTitle: "GPS Speedometer", overlayTitle: "GPS Speedometer",
@@ -199,8 +199,9 @@ class _SpeedometerScreenState extends State<SpeedometerScreen> with WidgetsBindi
flag: OverlayFlag.defaultFlag, flag: OverlayFlag.defaultFlag,
visibility: NotificationVisibility.visibilityPublic, visibility: NotificationVisibility.visibilityPublic,
positionGravity: PositionGravity.none, positionGravity: PositionGravity.none,
width: overlayWidth, // Use proportional sizing with minimum reasonable dimensions
height: overlayHeight, width: overlayWidth.clamp(280, 400),
height: overlayHeight.clamp(140, 300),
); );
} catch (e) { } catch (e) {
// Silent error handling - floating window issues shouldn't crash main app // Silent error handling - floating window issues shouldn't crash main app
@@ -296,7 +297,7 @@ class _SpeedometerScreenState extends State<SpeedometerScreen> with WidgetsBindi
children: [ children: [
// Speed area - takes most space, precise tap targets on text only // Speed area - takes most space, precise tap targets on text only
Expanded( Expanded(
flex: 7, flex: 65,
child: Container( child: Container(
width: double.infinity, width: double.infinity,
color: Colors.transparent, color: Colors.transparent,
@@ -351,7 +352,7 @@ class _SpeedometerScreenState extends State<SpeedometerScreen> with WidgetsBindi
), ),
// Compass area - compact but fully tappable for floating window // Compass area - compact but fully tappable for floating window
Expanded( Expanded(
flex: 3, flex: 32,
child: GestureDetector( child: GestureDetector(
onTap: _showFloatingWindow, // Tap navigation icon to show floating window onTap: _showFloatingWindow, // Tap navigation icon to show floating window
onLongPress: _closeFloatingWindow, // Long press to close floating window onLongPress: _closeFloatingWindow, // Long press to close floating window