Add back button on ticket and task detail screens
This commit is contained in:
@@ -199,7 +199,21 @@ class _TicketDetailScreenState extends ConsumerState<TicketDetailScreen> {
|
||||
final detailsCard = Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: SingleChildScrollView(child: detailsContent),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
),
|
||||
detailsContent,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -437,27 +451,23 @@ class _TicketDetailScreenState extends ConsumerState<TicketDetailScreen> {
|
||||
),
|
||||
);
|
||||
|
||||
if (isWide) {
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(flex: 2, child: detailsCard),
|
||||
const SizedBox(width: 16),
|
||||
Expanded(flex: 3, child: messagesCard),
|
||||
],
|
||||
);
|
||||
}
|
||||
final mainContent = isWide
|
||||
? Row(
|
||||
children: [
|
||||
Expanded(flex: 2, child: detailsCard),
|
||||
const SizedBox(width: 16),
|
||||
Expanded(flex: 3, child: messagesCard),
|
||||
],
|
||||
)
|
||||
: Column(
|
||||
children: [
|
||||
detailsCard,
|
||||
const SizedBox(height: 12),
|
||||
Expanded(child: messagesCard),
|
||||
],
|
||||
);
|
||||
|
||||
// Mobile: avoid nesting scrollables. detailsCard itself is
|
||||
// scrollable if it grows tall, and the messages area takes the
|
||||
// remaining space so the chat list can always receive touch
|
||||
// gestures and never end up offscreen.
|
||||
return Column(
|
||||
children: [
|
||||
detailsCard,
|
||||
const SizedBox(height: 12),
|
||||
Expanded(child: messagesCard),
|
||||
],
|
||||
);
|
||||
return mainContent;
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user