action static method

void action(
  1. void action()
)

Call an action if DemoMode is enabled

Otherwise do nothing.

Implementation

static void action(void Function() action) {
  if (isEnabled) {
    action();
  }
}