getPorts method

  1. @override
Map<String, Logic> getPorts([
  1. Iterable<PairDirection>? tags
])
override

Returns all interface ports associated with the provided tags as a Map from the port name to the Logic port.

Returns all ports if tags is null.

Implementation

@override
Map<String, Logic> getPorts([Iterable<PairDirection>? tags]) {
  final selectedPorts = super.getPorts(tags);
  final includesProvider =
      tags == null || tags.any((tag) => tag == PairDirection.fromProvider);
  if (!_suppressHandledProviderPorts || !includesProvider) {
    return selectedPorts;
  }
  return Map<String, Logic>.of(selectedPorts)
    ..remove(data.name)
    ..remove('valid');
}