dvPageMiddlewareRefusal function

String? dvPageMiddlewareRefusal(
  1. String key
)

Null when a page route can run key, otherwise why it cannot.

The generator refuses a build on anything non-null, so this is the only place the page scope's answer is written down. A key that reaches the fallback is one somebody added to DVMiddlewares and to neither page set: refused, because accepting a name nothing here understands is how nineteen keys came to mean nothing in the first place.

Implementation

String? dvPageMiddlewareRefusal(String key) {
  if (dvPageMiddlewareKeysBuilt.contains(key)) return null;
  final String? reason = dvPageMiddlewareKeysUnavailableReason[key];
  if (reason != null) return reason;
  return 'is not middleware a page route can run in this version of Dartvel.';
}