Files
pipelines/app/lib/features/chat/speech/speech_origin.dart
T

23 lines
653 B
Dart

import 'package:flutter/widgets.dart';
/// Names the conversation a subtree's replies belong to, so Read aloud can
/// label the reading (the speaking indicator and the global Stop show it).
/// Looked up when a reading starts; it rebuilds nothing.
class SpeechOrigin extends InheritedWidget {
const SpeechOrigin({
super.key,
required this.scope,
required this.title,
required super.child,
});
final String scope;
final String title;
static SpeechOrigin? maybeOf(BuildContext context) =>
context.getInheritedWidgetOfExactType<SpeechOrigin>();
@override
bool updateShouldNotify(SpeechOrigin oldWidget) => false;
}