toggle method
Toggles the boolean value.
If the value is true, it returns false. If the value is false or null, it returns true.
Implementation
bool toggle() => !this;
Toggles the boolean value.
If the value is true, it returns false. If the value is false or null, it returns true.
bool toggle() => !this;