follow mode button, zoom mode and abort behavior tuning

This commit is contained in:
Constantin Leue
2026-08-03 22:29:22 +02:00
parent 2f4353f3fa
commit ba14af8469
4 changed files with 108 additions and 20 deletions
+14 -12
View File
@@ -6,18 +6,23 @@ import 'package:flutter/material.dart';
class NavIconButton extends StatelessWidget {
const NavIconButton({
super.key,
required this.icon,
this.icon,
this.iconWidget,
required this.onTap,
this.active = false,
});
}) : assert(
icon != null || iconWidget != null,
'Entweder icon oder iconWidget angeben.',
);
final IconData? icon;
/// Individuelles Icon-Widget statt eines Material-[IconData], z.B.
/// [DroneFollowIcon] fuer den Kartenfolge-Knopf (FlyMapControls). Hat
/// Vorrang vor [icon], falls beides gesetzt ist.
final Widget? iconWidget;
final IconData icon;
final VoidCallback onTap;
/// Rosa Akzentrand (Doku 3.10: DroneMarkerIcon-Farbe) fuer Knoepfe mit
/// an/aus-Zustand, z.B. den Drohnen-Folgemodus (FlyMapControls).
final bool active;
@override
Widget build(BuildContext context) {
return GestureDetector(
@@ -28,11 +33,8 @@ class NavIconButton extends StatelessWidget {
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.black.withValues(alpha: 0.55),
border: active
? Border.all(color: const Color(0xFFFF2E93), width: 2)
: null,
),
child: Icon(icon, color: Colors.white, size: 16),
child: iconWidget ?? Icon(icon, color: Colors.white, size: 16),
),
);
}