Remove Cupertino chat transcript branches
Keep the existing Material transcript path while preserving public Cupertino parameters for callers. Narrow transcript tests to the Material-only behavior and remove Cupertino-only fixtures.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../sessions/chat_color_palette.dart';
|
||||
@@ -49,18 +48,6 @@ class ChatUserBubble extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (cupertino) {
|
||||
return DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: chatBubbleFill(
|
||||
context,
|
||||
CupertinoColors.systemGrey5.resolveFrom(context),
|
||||
),
|
||||
borderRadius: _radius,
|
||||
),
|
||||
child: Padding(padding: _padding, child: child),
|
||||
);
|
||||
}
|
||||
// A Material surface (not a bare DecoratedBox) so a disclosure ListTile
|
||||
// inside the bubble keeps its ink and background.
|
||||
return Material(
|
||||
@@ -88,17 +75,14 @@ class ChatAgentSurface extends StatelessWidget {
|
||||
final Widget child;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => cupertino
|
||||
? child
|
||||
: Material(type: MaterialType.transparency, child: child);
|
||||
Widget build(BuildContext context) =>
|
||||
Material(type: MaterialType.transparency, child: child);
|
||||
}
|
||||
|
||||
/// The transcript's reading text: the host's large body role, so answers read
|
||||
/// at a comfortable size and still follow the operator's text scaling.
|
||||
TextStyle? chatMessageTextStyle(BuildContext context, bool cupertino) =>
|
||||
cupertino
|
||||
? CupertinoTheme.of(context).textTheme.textStyle
|
||||
: Theme.of(context).textTheme.bodyLarge;
|
||||
Theme.of(context).textTheme.bodyLarge;
|
||||
|
||||
/// The empty-line gap between two paragraphs of a reply: about one line of
|
||||
/// body text at [fontSize] (else the ambient text size), scaled by the
|
||||
|
||||
Reference in New Issue
Block a user