whenFalse method

void whenFalse(
  1. void action()
)

Executes action if this boolean is false.

Example: false.whenFalse(() => print('false')) -> 'false'.

Implementation

void whenFalse(void Function() action) {
  if (!this) action();
}