Skip to content

Commit b3eec18

Browse files
authored
Merge pull request #347 from DevKor-github/codex/fix-schedule-multipage-focus
Clear focus when navigating schedule form pages
2 parents 0efee58 + 8849136 commit b3eec18

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/presentation/schedule_create/components/schedule_multi_page_form.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ class _ScheduleMultiPageFormState extends State<ScheduleMultiPageForm>
179179
}
180180

181181
void _updateCurrentPageIndex(int index) {
182+
_unfocusCurrentInput();
182183
_tabController.index = index;
183184
_pageViewController.animateToPage(
184185
index,
@@ -187,6 +188,10 @@ class _ScheduleMultiPageFormState extends State<ScheduleMultiPageForm>
187188
);
188189
}
189190

191+
void _unfocusCurrentInput() {
192+
FocusManager.instance.primaryFocus?.unfocus();
193+
}
194+
190195
void _reinitializeCurrentStep(BuildContext context) {
191196
switch (_pageCubitTypes[_tabController.index]) {
192197
case const (ScheduleNameCubit):

0 commit comments

Comments
 (0)