restore method

void restore(
  1. ModelState? state
)

Sets the model's state to a value from an earlier call to save.

Implementation

void restore(ModelState? state) {
  if (state == null) return;
  // Reset value first to prevent setting calendar state from triggering a
  // change event.
  _changeValue(state.value, Action.cancel);
  calendar.value = state.calendarState;
  comparisonEnabled = state.comparisonEnabled;
  comparisonOption = state.comparisonOption;
}