onDone method

  1. @override
dynamic onDone()
override

Implementation

@override
onDone() async {
  bool pass = widget.onWillDone?.call(selectedDates) ?? true;
  if (pass) {
    pop();
    final date = selectedDates.firstOrNull;
    if (date != null) {
      selectedDates = [
        DateTime(date.year, date.month, date.day, selectedHMS[0],
            selectedHMS[1], selectedHMS[2])
      ];
    }
    widget.onDone.call(selectedDates);
  }
}