resolvedImportUri method
String?
resolvedImportUri(
- String path, {
- ImportStyle style = ImportStyle.granular,
- BarrelImportCache barrelCache = const BarrelImportCache.empty(),
Resolves the import URI used for grouping and writing import statements.
Implementation
String? resolvedImportUri(
String path, {
ImportStyle style = ImportStyle.granular,
BarrelImportCache barrelCache = const BarrelImportCache.empty(),
}) {
final import = this.import.resolved(path);
if (import == null) {
return null;
}
return switch (style) {
ImportStyle.granular => import,
ImportStyle.barrel =>
barrelCache.resolve(import, associatedElement) ?? import,
};
}