dylanwuzh / flutter-cupertino-date-picker

Flutter cupertino style date picker.
Apache License 2.0
363 stars 416 forks source link

Failed assertion: boolean expression must not be null #95

Closed Zersya closed 4 years ago

Zersya commented 4 years ago

Hi, I got an error when I pick the date, it only appears until April, and this error is showing up.

image

Flutter doctor


[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.4 19E287, locale en-ID)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.44.2)
[✓] VS Code (version 1.42.1)
[✓] Connected device (1 available)

• No issues found!
Zersya commented 4 years ago

I change to flutter_cupertino_date_picker: 1.0.15+1 and it's work now.

collieryroad commented 4 years ago

It seems it now needs .onMonthChangeStartWithFirstDate (dynamic var) - if you set this to true error goes - line 289 in date_picker_widget.dart - also there is a print statement at line 350 that debug print min and max dates - using datePickerWidget

Zersya commented 4 years ago

thank you, I set it onMonthChangeStartWithFirstDate: true and now it work without any error.