ifTrue method
void
ifTrue(
- void action()
Runs action only when the value is true.
Example:
isEnabled.ifTrue(() => save());
Implementation
void ifTrue(void Function() action) {
if (this) {
action();
}
}