onOk method

dynamic onOk()

onChange handler. Return TimeOfDay

Implementation

onOk() {
  widget.onChange(time.toTimeOfDay());
  if (widget.onChangeDateTime != null) {
    final now = DateTime.now();
    final dateTime = DateTime(now.year, now.month, now.day, time.hour, time.minute);
    widget.onChangeDateTime!(dateTime);
  }
  onCancel(result: time.toTimeOfDay());
}