-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
I was trying the showCupertinoDatePicker() method as:
void getNepaliDateTimeCupertino(BuildContext context) {
picker.showCupertinoDatePicker(
context: context,
initialDate: NepaliDateTime.now(),
firstDate: NepaliDateTime(2000),
lastDate: NepaliDateTime(2090),
onDateChanged: (newDate) {
setState(() {
_cupertineSelectedDate = newDate.toString();
});
},
);
}
Apparently, when I swipe to the end of the either first or last year, and then give a long swipe (towards the no more year shown end), an exception occurs stating:
════════ Exception caught by gesture ═══════════════════════════════════════════
Supported year is 1970-2250
'package:nepali_utils/src/nepali_date_time.dart':
Failed assertion: line 75 pos 15: 'year >= 1969 && year <= 2250'
════════════════════════════════════════════════════════════════════════════════
I don't think this should happen with such flicks/swipes at the extreme year ends, but it happens. Also, because in the latest update it was stated that the supported date range was years 1970-2250 but practically that did not happen with date picker, and only between 2000-2090 were rendered properly without error messages.
Metadata
Metadata
Assignees
Labels
No labels