dco_decode_network_status method
Implementation
@protected
NetworkStatus dco_decode_network_status(dynamic raw) {
// Codec=Dco (DartCObject based), see doc to use other codecs
final arr = raw as List<dynamic>;
if (arr.length != 4)
throw Exception('unexpected arr length: expect 4 but see ${arr.length}');
return NetworkStatus(
isConnected: dco_decode_bool(arr[0]),
quality: dco_decode_connection_quality(arr[1]),
latencyStats: dco_decode_latency_stats(arr[2]),
winnerTarget: dco_decode_String(arr[3]),
);
}