fix(app): use shared header for chat information sheet
This commit is contained in:
@@ -30,6 +30,7 @@ import 'chat_scroll.dart';
|
||||
import 'chat_thread_controller.dart';
|
||||
import '../../../ui/adaptive/floating_bar_layout.dart';
|
||||
import '../../../ui/adaptive/segmented_bar_overlay.dart';
|
||||
import '../../../ui/layout/app_sheet_header.dart';
|
||||
import 'chat_reading_width.dart';
|
||||
import 'chat_thread_header.dart';
|
||||
import 'chat_transcript_cache.dart';
|
||||
@@ -1272,39 +1273,15 @@ class _ChatInfoSheet extends StatelessWidget {
|
||||
return AnimatedBuilder(
|
||||
animation: controller,
|
||||
builder: (context, _) {
|
||||
final titleStyle = cupertino
|
||||
? CupertinoTheme.of(context).textTheme.navTitleTextStyle
|
||||
: Theme.of(context).textTheme.titleLarge;
|
||||
final content = Column(
|
||||
key: const Key('chat-info-sheet'),
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(24, 8, 16, 4),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Semantics(
|
||||
header: true,
|
||||
child: Text('Chat information', style: titleStyle),
|
||||
),
|
||||
),
|
||||
if (cupertino)
|
||||
CupertinoButton(
|
||||
key: const Key('chat-info-close'),
|
||||
padding: EdgeInsets.zero,
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: const Text('Close'),
|
||||
)
|
||||
else
|
||||
TextButton(
|
||||
key: const Key('chat-info-close'),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: const Text('Close'),
|
||||
),
|
||||
],
|
||||
),
|
||||
AppSheetHeader(
|
||||
title: 'Chat information',
|
||||
cupertino: cupertino,
|
||||
doneKey: const Key('chat-info-close'),
|
||||
),
|
||||
for (final metric in _chatInfoMetrics(controller.usage))
|
||||
_ChatInfoRow(metric: metric, cupertino: cupertino),
|
||||
|
||||
Reference in New Issue
Block a user