diff --git a/lib/components/dark_mode_map.dart b/lib/components/dark_mode_map.dart index b2e7dcf..324af12 100644 --- a/lib/components/dark_mode_map.dart +++ b/lib/components/dark_mode_map.dart @@ -338,7 +338,7 @@ class _DarkModeMapComponentState extends State { ), ), ), - // Bottom action button bar + // Bottom action button bar - 4 equal-width buttons if (widget.selectedDelivery != null) Positioned( bottom: 0, @@ -361,55 +361,47 @@ class _DarkModeMapComponentState extends State { ), child: Row( children: [ - // Recenter button + // Start button Expanded( child: _buildBottomActionButton( - label: 'Recenter', - icon: Icons.location_on, - onPressed: _recenterMap, + label: _isNavigating ? 'Stop' : 'Start', + icon: _isNavigating ? Icons.stop : Icons.navigation, + onPressed: _isStartingNavigation || _isInitializing + ? null + : (_isNavigating ? _stopNavigation : _startNavigation), + isDanger: _isNavigating, ), ), - const SizedBox(width: 12), - // Mark Complete button (if not already delivered) - if (!widget.selectedDelivery!.delivered) - Expanded( - child: _buildBottomActionButton( - label: 'Mark Complete', - icon: Icons.check_circle, - onPressed: () => widget.onAction?.call('complete'), - isPrimary: true, - ), + const SizedBox(width: 8), + // Photo button + Expanded( + child: _buildBottomActionButton( + label: 'Photo', + icon: Icons.camera_alt, + onPressed: () => widget.onAction?.call('photo'), ), - if (widget.selectedDelivery!.delivered) - Expanded( - child: _buildBottomActionButton( - label: _isInitializing ? 'Initializing...' : 'Start Navigation', - icon: Icons.directions, - onPressed: _isInitializing ? null : _startNavigation, - isPrimary: true, - ), + ), + const SizedBox(width: 8), + // Note button + Expanded( + child: _buildBottomActionButton( + label: 'Note', + icon: Icons.note_add, + onPressed: () => widget.onAction?.call('note'), ), - if (!_isNavigating && !widget.selectedDelivery!.delivered) - const SizedBox(width: 12), - if (!_isNavigating && !widget.selectedDelivery!.delivered) - Expanded( - child: _buildBottomActionButton( - label: _isStartingNavigation || _isInitializing ? 'Loading...' : 'Navigate', - icon: Icons.directions, - onPressed: _isStartingNavigation || _isInitializing ? null : _startNavigation, - ), - ), - if (_isNavigating) - const SizedBox(width: 12), - if (_isNavigating) - Expanded( - child: _buildBottomActionButton( - label: 'Stop', - icon: Icons.stop, - onPressed: _stopNavigation, - isDanger: true, + ), + const SizedBox(width: 8), + // Completed button + Expanded( + child: _buildBottomActionButton( + label: widget.selectedDelivery!.delivered ? 'Undo' : 'Completed', + icon: widget.selectedDelivery!.delivered ? Icons.undo : Icons.check_circle, + onPressed: () => widget.onAction?.call( + widget.selectedDelivery!.delivered ? 'uncomplete' : 'complete', ), + isPrimary: !widget.selectedDelivery!.delivered, ), + ), ], ), ), @@ -486,12 +478,12 @@ class _DarkModeMapComponentState extends State { Color textColor = Colors.white; if (isDanger) { - backgroundColor = Colors.red.shade600; + backgroundColor = SvrntyColors.crimsonRed; } else if (isPrimary) { backgroundColor = SvrntyColors.crimsonRed; } else { - backgroundColor = Theme.of(context).colorScheme.surfaceContainerHighest; - textColor = Theme.of(context).colorScheme.onSurface; + // Use the same slateGray as delivery list badges + backgroundColor = SvrntyColors.slateGray; } // Reduce opacity when disabled @@ -507,8 +499,8 @@ class _DarkModeMapComponentState extends State { borderRadius: BorderRadius.circular(8), child: Padding( padding: const EdgeInsets.symmetric( - horizontal: 12, - vertical: 12, + horizontal: 14, + vertical: 14, ), child: Row( mainAxisAlignment: MainAxisAlignment.center, @@ -517,15 +509,15 @@ class _DarkModeMapComponentState extends State { Icon( icon, color: textColor, - size: 18, + size: 24, ), - const SizedBox(width: 6), + const SizedBox(width: 8), Text( label, style: TextStyle( color: textColor, - fontWeight: FontWeight.w500, - fontSize: 14, + fontWeight: FontWeight.w600, + fontSize: 18, ), ), ],