Restore activity row touch targets
This commit is contained in:
@@ -149,36 +149,39 @@ class _ChatTurnActivityViewState extends State<ChatTurnActivityView> {
|
||||
: DateTime.now().difference(started);
|
||||
final seconds = duration.inSeconds.clamp(0, 2147483647);
|
||||
final label = '${data.label}${widget.streaming ? ' ${seconds}s' : ''}';
|
||||
final content = Row(
|
||||
children: [
|
||||
if (widget.streaming) ...[
|
||||
ExcludeSemantics(
|
||||
child: DefaultTextStyle.merge(
|
||||
style: TextStyle(color: accent),
|
||||
child: const ChatResponsePending(),
|
||||
final content = ConstrainedBox(
|
||||
constraints: BoxConstraints(minHeight: cupertino ? 28 : 32),
|
||||
child: Row(
|
||||
children: [
|
||||
if (widget.streaming) ...[
|
||||
ExcludeSemantics(
|
||||
child: DefaultTextStyle.merge(
|
||||
style: TextStyle(color: accent),
|
||||
child: const ChatResponsePending(),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
],
|
||||
Flexible(
|
||||
child: Text(
|
||||
label,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(color: color),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
],
|
||||
Flexible(
|
||||
child: Text(
|
||||
label,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(color: color),
|
||||
const SizedBox(width: 4),
|
||||
Icon(
|
||||
cupertino ? CupertinoIcons.chevron_right : Icons.chevron_right,
|
||||
color: color,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Icon(
|
||||
cupertino ? CupertinoIcons.chevron_right : Icons.chevron_right,
|
||||
color: color,
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
final button = cupertino
|
||||
? CupertinoButton(
|
||||
key: const Key('chat-turn-activity'),
|
||||
minimumSize: Size.zero,
|
||||
minimumSize: const Size(0, 44),
|
||||
padding: const EdgeInsets.all(chatAgentContentInset),
|
||||
onPressed: _open,
|
||||
child: content,
|
||||
@@ -186,7 +189,7 @@ class _ChatTurnActivityViewState extends State<ChatTurnActivityView> {
|
||||
: TextButton(
|
||||
key: const Key('chat-turn-activity'),
|
||||
style: TextButton.styleFrom(
|
||||
minimumSize: Size.zero,
|
||||
minimumSize: const Size(0, 48),
|
||||
padding: const EdgeInsets.all(chatAgentContentInset),
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
|
||||
Reference in New Issue
Block a user