ActivityType.parse constructor

ActivityType.parse(
  1. int value
)

Parse an ActivityType from an int.

The value must be a valid activity type.

Implementation

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