importLibrary abstract method

String importLibrary(
  1. Uri uri, {
  2. String? prefix,
  3. String? showName,
})

Arrange to have an import added for the library with the given uri. If a prefix is provided it will be used in the import directive.

If showName is provided, new imports will show only this name.

Return the text of the URI that will be used in the import directive. It can be different than the given uri.

The uri may be converted from an absolute URI to a relative URI depending on user preferences/lints.

Implementation

String importLibrary(Uri uri, {String? prefix, String? showName});