BoolUtils extension
Extensions on bool for real-world utility operations.
- on
Properties
Methods
-
ifFalse<
T> (T value) → T? -
Available on bool, provided by the BoolUtils extension
Returnsvalueif this isfalse, otherwisenull. -
ifTrue<
T> (T value) → T? -
Available on bool, provided by the BoolUtils extension
Returnsvalueif this istrue, otherwisenull. -
toEnabledDisabled(
) → String -
Available on bool, provided by the BoolUtils extension
Returns'Enabled'or'Disabled'. -
toOnOff(
) → String -
Available on bool, provided by the BoolUtils extension
Returns'On'or'Off'. -
toYesNo(
) → String -
Available on bool, provided by the BoolUtils extension
Returns'Yes'or'No'. -
when<
T> ({required T onTrue(), required T onFalse()}) → T -
Available on bool, provided by the BoolUtils extension
CallsonTrueiftrue,onFalseiffalse, and returns the result.