myRadioGroupKey property

GlobalKey<RadioGroupState>? get myRadioGroupKey

Implementation

GlobalKey<RadioGroupState>? get myRadioGroupKey => _myRadioGroupKey;
set myRadioGroupKey (GlobalKey<RadioGroupState>? key)

Implementation

set myRadioGroupKey(GlobalKey<RadioGroupState>? key) {
  if (key == null) return;

  if (key == _myRadioGroupKey) {
    if (_myRadioGroupKey!.currentState != null &&
        _myRadioGroupKey!.currentState!.mounted &&
        _myRadioGroupKey!.currentState! != _myRadioGroup) {
      _myRadioGroup = _myRadioGroupKey!.currentState!;
    }

    return;
  }

  if (_myRadioGroup == null || !_myRadioGroup!.mounted) {
    _myRadioGroupKey = key;
    _myRadioGroup = _myRadioGroupKey!.currentState;
  } else {
    throw MultipleRadioGroupException(radioGroupController: this, key: key);
  }
}