httpTransportTypeFromString function
Implementation
HttpTransportType httpTransportTypeFromString(String? value) {
if (value == null || value == "") {
return HttpTransportType.None;
}
value = value.toUpperCase();
switch (value) {
case "WEBSOCKETS":
return HttpTransportType.WebSockets;
case "SERVERSENTEVENTS":
return HttpTransportType.ServerSentEvents;
case "LONGPOLLING":
return HttpTransportType.LongPolling;
default:
throw new GeneralError("$value is not a supported HttpTransportType");
}
}