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

LateInitializationError occurs when the submit button is pressed without changing the date in the date range selection. #59

Closed
ahmtydn opened this issue Feb 25, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ahmtydn
Copy link
Contributor

ahmtydn commented Feb 25, 2023

void _datePicker(BuildContext context) { BottomPicker.range( title: 'Select Date', titleStyle: const TextStyle( fontWeight: FontWeight.bold, fontSize: 15, color: Colors.black, ), buttonSingleColor: Colors.black, dismissable: true, initialFirstDate: _startDate, initialSecondDate: _endDate, onSubmitPressed: (startDate, endDate) { print(startDate); print(endDate); }, ).show(context); }

`
LateInitializationError: Field 'selectedFirstDateTime' has not been initialized.

When the exception was thrown, this was the stack:
#0 _BottomPickerState.selectedFirstDateTime (package:bottom_picker/bottom_picker.dart)
#1 _BottomPickerState.build. (package:bottom_picker/bottom_picker.dart:565:29)
#2 BottomPickerButton.build. (package:bottom_picker/widgets/bottom_picker_button.dart:32:17)
`

@koukibadr koukibadr self-assigned this Feb 26, 2023
@koukibadr koukibadr added the bug Something isn't working label Feb 26, 2023
@koukibadr koukibadr reopened this Apr 2, 2023
@koukibadr koukibadr reopened this Apr 2, 2023
@koukibadr
Copy link
Owner

@ahmtydn a new version is published fixing this bug
https://pub.dev/packages/bottom_picker

@ahmtydn ahmtydn closed this as completed May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants