Skip to content

Commit

Permalink
Merge pull request #44 from Feras-dev/user/falshehri/#43/hotfix_overf…
Browse files Browse the repository at this point in the history
…lowed_pixels_in_add_task_screen_with_keyboard

#43: fix overflowed pixles at bottom of addTask screen when keyboard pops up
  • Loading branch information
saurabh-dk authored May 10, 2021
2 parents 1c9ac7c + 826c691 commit a855592
Showing 1 changed file with 31 additions and 29 deletions.
60 changes: 31 additions & 29 deletions lib/view/addTask.dart
Original file line number Diff line number Diff line change
Expand Up @@ -246,35 +246,37 @@ class AddTaskFormState extends State<AddTaskForm> {
appBar: AppBar(
title: Text(pageTitle),
),
body: Form(
key: _formKey,
child: Container(
padding: EdgeInsets.all(20.0),
child: Column(
// CrossAxisAlignment is used to align dropdown to
// start of the screen.
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
_buildTaskField(),
_buildWorkIntervalField(),
_buildBreakIntervalField(),
_priorityText(),
_buildPriorityLevelList(),
Container(
width: double.infinity,
child: ElevatedButton(
child: Text(buttonText),
onPressed: () {
// Validate the form and show appropriate errors.
if (_formKey.currentState.validate()) {
_formKey.currentState.save();
// Save the data.
saveData(context);
}
},
),
)
],
body: SingleChildScrollView(
child: Form(
key: _formKey,
child: Container(
padding: EdgeInsets.all(20.0),
child: Column(
// CrossAxisAlignment is used to align dropdown to
// start of the screen.
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
_buildTaskField(),
_buildWorkIntervalField(),
_buildBreakIntervalField(),
_priorityText(),
_buildPriorityLevelList(),
Container(
width: double.infinity,
child: ElevatedButton(
child: Text(buttonText),
onPressed: () {
// Validate the form and show appropriate errors.
if (_formKey.currentState.validate()) {
_formKey.currentState.save();
// Save the data.
saveData(context);
}
},
),
)
],
),
),
),
));
Expand Down

0 comments on commit a855592

Please sign in to comment.