toggle method
Toggle the spoiler effect on/off. Optional fadeOffset for the radial center.
Implementation
bool toggle(Offset fadeOffset) {
// If we’re mid-fade, skip to avoid partial toggles.
if ((_config.fadeConfig != null && isFading) || !_spoilerPath.contains(fadeOffset)) {
return false;
}
// Record the offset from which the radial fade expands.
setFadeCenter(fadeOffset);
_onEnabledChanged(!_isEnabled);
return true;
}