509d4c624f
A question's text, its description and its options' descriptions now use the transcript's markdown renderer (bold, code, lists, links) in the card's own text styles; tapping an option's formatted description still selects it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
707 B
Dart
23 lines
707 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../ui/transcript/chat_markdown_view.dart';
|
|
|
|
/// A question's text (its title, description or an option's description)
|
|
/// rendered as markdown in [style]: agents format questions with bold, code,
|
|
/// lists and links, the same subset the transcript draws.
|
|
class ChatQuestionMarkdown extends StatelessWidget {
|
|
const ChatQuestionMarkdown(this.text, {super.key, this.style});
|
|
|
|
final String text;
|
|
final TextStyle? style;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final view = ChatMarkdownView(text: text);
|
|
final style = this.style;
|
|
return style == null
|
|
? view
|
|
: DefaultTextStyle.merge(style: style, child: view);
|
|
}
|
|
}
|