debugGlobalRouteCount property Null safety

int debugGlobalRouteCount

The number of global routes that have been registered.

This is valid in debug builds only. In release builds, this will throw an UnsupportedError.


int get debugGlobalRouteCount {
  int? count;
  assert(() {
    count = _globalRoutes.length;
    return true;
  if (count != null) {
    return count!;
  throw UnsupportedError('debugGlobalRouteCount is not supported in release builds');