fromString static method

PortDirection fromString(
  1. String name
)

Converts from a name of values to a PortDirection.

Implementation

static PortDirection fromString(String name) => values.firstWhere(
    (e) => e.name.toLowerCase() == name.toLowerCase(),
    orElse: () => throw RohdBridgeException('Invalid PortDirection: $name'));