ControllerWatcher<T> constructor

ControllerWatcher<T>()

Factory constructor to lazily initialize the instance of ControllerWatcher

Implementation

factory ControllerWatcher() {
  // Initialize the instance if it is nul otherwise return the already initialized instance
  if (_instances[T] == null) {
    _instances[T] = ControllerWatcher<T>._();
  }

  return _instances[T]!;
}