onAmPmChange method

void onAmPmChange(
  1. DayPeriod e
)

Change handler for DayPeriod

Implementation

void onAmPmChange(DayPeriod e) {
  setState(() {
    lastPeriod = time.period;
    time = time.setPeriod(e);
  });

  // If the mode is `onValueChange` then we need to alert
  // the listeners that the value changed
  if (widget.isOnValueChangeMode) {
    onOk();
  }
}