flutter: 2010, 2021
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following NoSuchMethodError was thrown building DatePickerWidget(dirty, state: _DatePickerWidgetState#3ec38):
The getter 'last' was called on null.
Receiver: null
Tried calling: last
The relevant error-causing widget was:
MaterialApp file:///Users/sss/Documents/Projects/sss/lib/main.dart:43:12
When the exception was thrown, this was the stack:
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1 _DatePickerWidgetState._renderDatePickerColumnComponent (package:flutter_cupertino_date_picker/src/widget/date_picker_widget.dart:220:34)
#2 _DatePickerWidgetState._renderDatePickerWidget.<anonymous closure> (package:flutter_cupertino_date_picker/src/widget/date_picker_widget.dart:183:29)
#3 List.forEach (dart:core-patch/growable_array.dart:282:8)
#4 _DatePickerWidgetState._renderDatePickerWidget (package:flutter_cupertino_date_picker/src/widget/date_picker_widget.dart:180:15)
...
════════════════════════════════════════════════════════════════════════════════════════════════════
By some strange circumstances your code in examples not working in my project.
[✓] Flutter (Channel stable, v1.17.1, on Mac OS X 10.14.6 18G103, locale en-RU)