initialize method

void initialize()

Registers a WidgetsBinding observer.

This must be called for auto-pause and resume to work properly.

Implementation

void initialize() {
  if (_isRegistered) {
    return;
  }
  _isRegistered = true;
  WidgetsBinding.instance.addObserver(this);
}