fromInt function
Converts an integer to a PacketType
Implementation
PacketType fromInt(int value) {
for (PacketType type in PacketType.values) {
if (type.index == value) return type;
}
return PacketType.none;
}
Converts an integer to a PacketType
PacketType fromInt(int value) {
for (PacketType type in PacketType.values) {
if (type.index == value) return type;
}
return PacketType.none;
}