Minor layout fixes

This commit is contained in:
Marc Rejohn Castillano 2026-03-08 04:26:33 +08:00
parent c644143198
commit e4391ac465
2 changed files with 74 additions and 58 deletions

View File

@ -2817,6 +2817,9 @@ class _TaskDetailScreenState extends ConsumerState<TaskDetailScreen>
), ),
); );
final mobileTabbedHeight =
(MediaQuery.of(context).size.height * 0.65).clamp(360.0, 720.0);
final mainContent = isWide final mainContent = isWide
? Row( ? Row(
children: [ children: [
@ -2831,10 +2834,12 @@ class _TaskDetailScreenState extends ConsumerState<TaskDetailScreen>
slivers: [ slivers: [
SliverToBoxAdapter(child: detailsCard), SliverToBoxAdapter(child: detailsCard),
const SliverToBoxAdapter(child: SizedBox(height: 12)), const SliverToBoxAdapter(child: SizedBox(height: 12)),
SliverFillRemaining( SliverToBoxAdapter(
hasScrollBody: true, child: SizedBox(
height: mobileTabbedHeight,
child: tabbedCard, child: tabbedCard,
), ),
),
], ],
), ),
if (isRetrieving) if (isRetrieving)

View File

@ -122,20 +122,25 @@ class _QrVerificationDialogState extends ConsumerState<_QrVerificationDialog> {
final colors = theme.colorScheme; final colors = theme.colorScheme;
final qrData = 'tasq://verify/${widget.session.id}'; final qrData = 'tasq://verify/${widget.session.id}';
return AlertDialog( return Dialog(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(28)), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(28)),
title: Row( child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 420),
child: Padding(
padding: const EdgeInsets.fromLTRB(24, 20, 24, 16),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [ children: [
Icon(Icons.qr_code_2, color: colors.primary), Icon(Icons.qr_code_2, color: colors.primary),
const SizedBox(width: 12), const SizedBox(width: 12),
const Expanded(child: Text('Scan with Mobile')), const Expanded(child: Text('Scan with Mobile')),
], ],
), ),
content: ConstrainedBox( const SizedBox(height: 16),
constraints: const BoxConstraints(maxWidth: 360),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text( Text(
widget.session.type == 'enrollment' widget.session.type == 'enrollment'
? 'Open the TasQ app on your phone and scan this QR code to enroll your face with liveness detection.' ? 'Open the TasQ app on your phone and scan this QR code to enroll your face with liveness detection.'
@ -145,12 +150,13 @@ class _QrVerificationDialogState extends ConsumerState<_QrVerificationDialog> {
), ),
), ),
const SizedBox(height: 24), const SizedBox(height: 24),
if (_expired) Center(
_buildExpiredState(theme, colors) child: _expired
else ? _buildExpiredState(theme, colors)
_buildQrCode(theme, colors, qrData), : _buildQrCode(theme, colors, qrData),
),
const SizedBox(height: 16), const SizedBox(height: 16),
if (!_expired) ...[ if (!_expired)
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
@ -163,24 +169,29 @@ class _QrVerificationDialogState extends ConsumerState<_QrVerificationDialog> {
), ),
), ),
const SizedBox(width: 12), const SizedBox(width: 12),
Text( Flexible(
child: Text(
'Waiting for mobile verification...', 'Waiting for mobile verification...',
style: theme.textTheme.bodySmall?.copyWith( style: theme.textTheme.bodySmall?.copyWith(
color: colors.onSurfaceVariant, color: colors.onSurfaceVariant,
), ),
), ),
],
), ),
], ],
],
), ),
), const SizedBox(height: 12),
actions: [ Align(
TextButton( alignment: Alignment.centerRight,
child: TextButton(
onPressed: () => Navigator.of(context).pop(false), onPressed: () => Navigator.of(context).pop(false),
child: const Text('Cancel'), child: const Text('Cancel'),
), ),
),
], ],
),
),
),
),
); );
} }