addImport method

void addImport(
  1. dynamic import
)

Implementation

void addImport(import) {
  if (import == null && !import.isNotEmpty) {
    return;
  }
  if (import is List) {
    imports.addAll(import.map((e) => e));
  } else if (import != null && import.isNotEmpty) {
    imports.add(import);
  }

  imports = LinkedHashSet<String>.from(imports).toList();
}