isToggled property

bool? get isToggled

If this node has Boolean state that can be controlled by the user, whether that state is on or off, corresponding to true and false, respectively.

Do not call the setter for this field if the owning RenderObject doesn't have on/off state that can be controlled by the user.

The getter returns null if the owning RenderObject does not have on/off state.

Implementation

bool? get isToggled => _hasFlag(SemanticsFlag.hasToggledState) ? _hasFlag(SemanticsFlag.isToggled) : null;
set isToggled (bool? value)

Implementation

set isToggled(bool? value) {
  _setFlag(SemanticsFlag.hasToggledState, true);
  _setFlag(SemanticsFlag.isToggled, value!);
}