mirror of
https://github.com/Iconica-Development/flutter_availability.git
synced 2025-05-19 13:13:44 +02:00
fix: add keyboard padding for pause selection dialog
This commit is contained in:
parent
0525e9d3b6
commit
0302646756
1 changed files with 57 additions and 52 deletions
|
@ -316,61 +316,66 @@ class _AvailabilityBreakSelectionDialogState
|
||||||
|
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Padding(
|
||||||
margin: EdgeInsets.symmetric(
|
padding: EdgeInsets.only(
|
||||||
horizontal: spacing.sidePadding,
|
bottom: MediaQuery.of(context).viewInsets.bottom,
|
||||||
),
|
),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Container(
|
||||||
children: [
|
margin: EdgeInsets.symmetric(
|
||||||
const SizedBox(height: 44),
|
horizontal: spacing.sidePadding,
|
||||||
Text(
|
),
|
||||||
translations.pauseDialogTitle,
|
child: Column(
|
||||||
style: textTheme.titleMedium,
|
children: [
|
||||||
textAlign: TextAlign.center,
|
const SizedBox(height: 44),
|
||||||
),
|
Text(
|
||||||
const SizedBox(height: 4),
|
translations.pauseDialogTitle,
|
||||||
Text(
|
style: textTheme.titleMedium,
|
||||||
descriptionText,
|
textAlign: TextAlign.center,
|
||||||
style: textTheme.bodyMedium,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 16),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
const Spacer(
|
|
||||||
flex: 3,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 4,
|
|
||||||
child: DurationInputField(
|
|
||||||
initialValue: _breakViewModel.submittedDuration,
|
|
||||||
onDurationChanged: onUpdateDuration,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Spacer(
|
|
||||||
flex: 3,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(height: 24),
|
|
||||||
TimeSelection(
|
|
||||||
key: ValueKey(
|
|
||||||
[_breakViewModel.startTime, _breakViewModel.endTime],
|
|
||||||
),
|
),
|
||||||
// rebuild the widget when the start or end time changes
|
const SizedBox(height: 4),
|
||||||
title: translations.pauseDialogPeriodTitle,
|
Text(
|
||||||
description: translations.pauseDialogPeriodDescription,
|
descriptionText,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
style: textTheme.bodyMedium,
|
||||||
startTime: _breakViewModel.startTime,
|
textAlign: TextAlign.center,
|
||||||
endTime: _breakViewModel.endTime,
|
),
|
||||||
onStartChanged: onUpdateStart,
|
const SizedBox(height: 16),
|
||||||
onEndChanged: onUpdateEnd,
|
Row(
|
||||||
),
|
children: [
|
||||||
const SizedBox(height: 36),
|
const Spacer(
|
||||||
saveButton,
|
flex: 3,
|
||||||
SizedBox(height: spacing.bottomButtonPadding),
|
),
|
||||||
],
|
Expanded(
|
||||||
|
flex: 4,
|
||||||
|
child: DurationInputField(
|
||||||
|
initialValue: _breakViewModel.submittedDuration,
|
||||||
|
onDurationChanged: onUpdateDuration,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Spacer(
|
||||||
|
flex: 3,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
TimeSelection(
|
||||||
|
key: ValueKey(
|
||||||
|
[_breakViewModel.startTime, _breakViewModel.endTime],
|
||||||
|
),
|
||||||
|
// rebuild the widget when the start or end time changes
|
||||||
|
title: translations.pauseDialogPeriodTitle,
|
||||||
|
description: translations.pauseDialogPeriodDescription,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
startTime: _breakViewModel.startTime,
|
||||||
|
endTime: _breakViewModel.endTime,
|
||||||
|
onStartChanged: onUpdateStart,
|
||||||
|
onEndChanged: onUpdateEnd,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 36),
|
||||||
|
saveButton,
|
||||||
|
SizedBox(height: spacing.bottomButtonPadding),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue