Closed ahmtydn closed 1 year ago
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:
`
@ahmtydn a new version is published fixing this bug https://pub.dev/packages/bottom_picker
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)
`