NitroType.parse constructor

NitroType.parse(
  1. int value
)

Parse an integer from the API to a NitroType.

The value must be a valid nitro type.

Implementation

factory NitroType.parse(int value) => NitroType.values.firstWhere(
      (type) => type.value == value,
      orElse: () => throw FormatException('Unknown NitroType', value),
    );