myRadioGroupKey property
GlobalKey<RadioGroupState<T> > ?
get
myRadioGroupKey
Implementation
GlobalKey<RadioGroupState<T>>? get myRadioGroupKey => _myRadioGroupKey;
set
myRadioGroupKey
(GlobalKey<RadioGroupState<T> > ? key)
Implementation
set myRadioGroupKey(GlobalKey<RadioGroupState<T>>? 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;
return;
}
if (_myRadioGroup != null &&
_myRadioGroup!.widget.key != null &&
_myRadioGroupKey != null &&
_myRadioGroup!.widget.key! == _myRadioGroupKey!) {
_myRadioGroupKey = key;
_myRadioGroup = _myRadioGroupKey!.currentState;
return;
}
throw MultipleRadioGroupException(radioGroupController: this, key: key);
}