f02ff56dfe
show_html documents that declare dark support follow the app theme; others stay light. Tool description and skill docs say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
614 B
Dart
18 lines
614 B
Dart
import 'package:flutter/widgets.dart';
|
|
|
|
/// Opens a run's detail from inside a chat (a `show_run` card). The app shell
|
|
/// provides it above every chat surface; without one a run card is not
|
|
/// activatable.
|
|
class ChatRunOpener extends InheritedWidget {
|
|
const ChatRunOpener({super.key, required this.openRun, required super.child});
|
|
|
|
final ValueChanged<int> openRun;
|
|
|
|
static ValueChanged<int>? maybeOf(BuildContext context) =>
|
|
context.dependOnInheritedWidgetOfExactType<ChatRunOpener>()?.openRun;
|
|
|
|
@override
|
|
bool updateShouldNotify(ChatRunOpener oldWidget) =>
|
|
openRun != oldWidget.openRun;
|
|
}
|