debugObservingRoute method Null safety

  1. @visibleForTesting
bool debugObservingRoute(
  1. R route
)

Whether this observer is managing changes for the specified route.

If asserts are disabled, this method will throw an exception.

Implementation

@visibleForTesting
bool debugObservingRoute(R route) {
  late bool contained;
  assert(() {
    contained = _listeners.containsKey(route);
    return true;
  }());
  return contained;
}