static LiveError? fromInt(int code) { for (var enumValue in LiveError.values) { if (enumValue.code == code) return enumValue; } return null; }