pathToUri abstract method

Uri? pathToUri(
  1. String path, {
  2. String? containingPath,
})

Return the URI that should be used to reference the file at the absolute path, or null if there is no valid way to reference the file in this converter’s context. The file at that path is not required to exist.

If a containingPath is provided and both the path and containingPath are within the root of this converter’s context, then the returned URI will be a relative path. Otherwise, the returned URI will be an absolute URI.

Throws an ArgumentError if the path is null or is not a valid absolute file path.

Implementation

Uri? pathToUri(String path, {String? containingPath});