addListener method Null safety

void addListener(
  1. void listener(
      )
    )

    Registers a listener with this service

    Implementation

    void addListener(void Function() listener) {
      _listeners.add(listener);
    }