selectValue method

void selectValue(
  1. T value
)

Implementation

void selectValue(T value) {
  if (isValue(value)) {
    return;
  }

  if (!containItem(value)) {
    throw const FormsSelectionFieldNotInItemListException();
  }

  emit(state.copyWith(valueState: state.valueState.copyWith(value: value)));
  validate(triggerType: FormsFieldValidatorTriggerType.valueChanged);
}