fromValue static method

StreamType? fromValue(
  1. int value
)

Looks up a stream type by its wire value.

Implementation

static StreamType? fromValue(int value) {
  for (final type in values) {
    if (type.value == value) return type;
  }
  return null;
}