selected property

dynamic get selected

Implementation

dynamic get selected => _selected;
  1. @Input()
set selected (dynamic selectedValue)

Value of currently selected radio. Prefer [ngModel].

Implementation

@Input()
set selected(dynamic selectedValue) {
  if (_radioComponents.isNotEmpty && _isContentInit) {
    for (var radioComponent in _radioComponents) {
      radioComponent.checked = (radioComponent.value == selectedValue);
    }
    // Ensure we don't overwrite the value in the initial callback.
    _preselectedValue = null;
  } else {
    _preselectedValue = selectedValue;
  }
}