InteractionType.parse constructor

InteractionType.parse(
  1. int value
)

Parse an InteractionType from an int.

The value must be a valid interaction type.

Implementation

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