insertSource method

void insertSource(
  1. Source? source
)

Implementation

void insertSource(Source? source) {
  if (source != null) {
    var uri = source.uri;
    if (uri.scheme == 'dart') {
      uri = Uri.parse('${uri.scheme}:${uri.pathSegments.first}');
    }

    String str = transformInputUri(uri);
    if (!imports.contains(str)) {
      imports.add(str);
    }
  }
}