BoolExtensions extension
- on
Properties
- toEnabledDisabled → String
-
Available on bool, provided by the BoolExtensions extension
Returns'enabled'if this boolean istrue, and'disabled'if this boolean isfalse.no setter - toggle → bool
-
Available on bool, provided by the BoolExtensions extension
Returnsfalseif this boolean istrue, andtrueif this boolean isfalse.no setter - toInt → int
-
Available on bool, provided by the BoolExtensions extension
Returns1if this boolean istrue, and0if this boolean isfalse.no setter - toOnOff → String
-
Available on bool, provided by the BoolExtensions extension
Returns'on'if this boolean istrue, and'off'if this boolean isfalse.no setter - toYesNo → String
-
Available on bool, provided by the BoolExtensions extension
Returns'yes'if this boolean istrue, and'no'if this boolean isfalse.no setter
Methods
-
fold<
T> (T whenTrue, T whenFalse) → T -
Available on bool, provided by the BoolExtensions extension
ReturnswhenTrueif this boolean istrue, andwhenFalseif this boolean isfalse. -
lazyFold<
T> (T whenTrue(), T whenFalse()) → T -
Available on bool, provided by the BoolExtensions extension
Lazily evaluates and returns the result ofwhenTrueif this boolean istrue, or the result ofwhenFalseif this boolean isfalse. -
whenFalse(
void action()) → void -
Available on bool, provided by the BoolExtensions extension
Executesactionif this boolean isfalse. -
whenTrue(
void action()) → void -
Available on bool, provided by the BoolExtensions extension
Executesactionif this boolean istrue.