fromString static method

BridgeCommand fromString(
  1. String command
)

Implementation

static BridgeCommand fromString(String command) {
  return BridgeCommand.values.firstWhere(
      (e) => e.toString().split('.').last == command,
      orElse: () => BridgeCommand.unknown);
}