resolveAbsolute method

  1. @override
Source? resolveAbsolute(
  1. Uri uri
)

Resolve the given absolute uri. Return a Source representing the file to which it was resolved, whether or not the resulting source exists, or null if it could not be resolved because the URI is invalid.

Implementation

@override
Source? resolveAbsolute(Uri uri) {
  if (!isFileUri(uri)) {
    return null;
  }
  String path = fileUriToNormalizedPath(_provider.pathContext, uri);
  File file = _provider.getFile(path);
  return file.createSource(uri);
}