Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue on onSubmit in BottomPicker.time not working #80

Open
Abdallah-Azb opened this issue Nov 25, 2023 · 1 comment
Open

issue on onSubmit in BottomPicker.time not working #80

Abdallah-Azb opened this issue Nov 25, 2023 · 1 comment
Assignees

Comments

@Abdallah-Azb
Copy link

in code should be like this
your code
onClick: () {
if (widget.bottomPickerType ==BottomPickerType.simple) {
widget.onSubmit?.call(selectedItemIndex);
} else if (widget.bottomPickerType ==BottomPickerType.dateTime ||
widget.bottomPickerType == BottomPickerType.time ) {
widget.onSubmit?.call(selectedDateTime);
} else {
widget.onSubmitPressed?.call(
selectedFirstDateTime,
selectedSecondDateTime,
);
}

                    Navigator.pop(context);
                  },
the right code should be like this 

onClick: () {
if (widget.bottomPickerType ==BottomPickerType.rangeDateTime) {

                       widget.onSubmitPressed?.call(
                        selectedFirstDateTime,
                        selectedSecondDateTime,);

                    } else {
                      widget.onSubmit?.call(selectedItemIndex);
                      }

                    Navigator.pop(context);
                  },
@koukibadr koukibadr self-assigned this Dec 10, 2023
@koukibadr koukibadr reopened this Dec 10, 2023
@koukibadr
Copy link
Owner

A new version has been published with the fix of this bug the new version 2.3.3 is available on pub.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants