import 'package:flutter/widgets.dart'; /// Coordinates the expanded agent control with the shortcuts it covers. class AgentNavigationOverlay extends InheritedWidget { const AgentNavigationOverlay({ super.key, required this.active, this.onRecordingChanged, this.menuOpen = false, required super.child, }); final ValueNotifier active; final ValueChanged? onRecordingChanged; final bool menuOpen; static bool menuOpenOf(BuildContext context) => context .dependOnInheritedWidgetOfExactType() ?.menuOpen ?? false; static ValueChanged? recordingCallbackOf(BuildContext context) => context .dependOnInheritedWidgetOfExactType() ?.onRecordingChanged; static ValueNotifier? maybeOf(BuildContext context) => context .dependOnInheritedWidgetOfExactType() ?.active; @override bool updateShouldNotify(AgentNavigationOverlay oldWidget) => active != oldWidget.active || menuOpen != oldWidget.menuOpen || onRecordingChanged != oldWidget.onRecordingChanged; }