shouldBeRewritten method

bool shouldBeRewritten (Uri uri)

Decides if uri should be rewritten to buildRunnerUri.

By default, it determines if the uri doesn't have a MIME type. This method may be overridden.

Implementation

bool shouldBeRewritten(Uri uri) {
  final pathSegments = uri.pathSegments;
  return pathSegments.isNotEmpty
      ? lookupMimeType(uri.pathSegments.last) == null
      : false;
}