Files
dmc/app/lib/ui/widgets/nav_icon_button.dart
T

40 lines
1.1 KiB
Dart

import 'package:flutter/material.dart';
/// Runder Icon-Button ueber dunklem Kartenhintergrund, geteilt zwischen den
/// Plan- (MapSearchControls: Home/Fit) und Fly-Modus-Kartensteuerungen
/// (FlyMapControls: Drohne/Fit).
class NavIconButton extends StatelessWidget {
const NavIconButton({
super.key,
required this.icon,
required this.onTap,
this.active = false,
});
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(
onTap: onTap,
child: Container(
width: 34,
height: 34,
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),
),
);
}
}