getById static method

Returns a BonsoirDiscoveryEventType by its id or unknown if not found.

Implementation

static BonsoirDiscoveryEventType getById(String id) => values.firstWhere(
      (type) => type.id == id,
      orElse: () => BonsoirDiscoveryEventType.unknown,
    );