addImport method

void addImport(
  1. dynamic import
)

Implementation

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

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