fromInt static method

SerialEventType? fromInt(
  1. int i
)

Returns the SerialEventType corresponding to i, or null if i is out of range.

Implementation

static SerialEventType? fromInt(int i) =>
    i >= 0 && i < SerialEventType.values.length
        ? SerialEventType.values[i]
        : null;