whenTrue method
void
whenTrue(
- void action()
Executes action if this boolean is true.
Example: true.whenTrue(() => print('true')) -> 'true'.
Implementation
void whenTrue(void Function() action) {
if (this) action();
}