isRootRelative function

bool isRootRelative(
  1. String path
)

Returns true if path is a root-relative path and false if it's not.

URLs that start with / are known as "root-relative", since they're relative to the root of the current URL. Since root-relative paths are still absolute in every other sense, isAbsolute will return true for them. They can be detected using isRootRelative.

No POSIX and Windows paths are root-relative.

Implementation

bool isRootRelative(String path) => context.isRootRelative(path);