util/path_util library

Functions

getPackageUriForAbsoluteImport(String uri) String
getRelativeImportUri(String imported, String file) String
Returns the relative import URI from a file to an imported file. e.g. lib/src/foo.dart -> lib/src/bar.dart -> ../bar.dart
getRelativePathFromPackageUri(Uri uri) String
Returns the relative path from a package URI. e.g. package:foo/src/bar.dart -> lib/src/bar.dart