toConnectionStateType method
Implementation
ConnectionStateType toConnectionStateType() {
switch (this) {
case 'CONNECTED':
return ConnectionStateType.connected;
case 'CONNECTING':
return ConnectionStateType.connecting;
case 'FAILED':
return ConnectionStateType.failed;
case 'DISCONNECTED':
return ConnectionStateType.disconnected;
case 'DISCONNECTING':
return ConnectionStateType.disconnecting;
}
throw Exception('$this is not known in enum ConnectionStateType');
}