HeaderCustomUDP.fromJson constructor

HeaderCustomUDP.fromJson(
  1. Object? json
)

Implementation

factory HeaderCustomUDP.fromJson(Object? json) {
  final map = asJsonMap(json, 'header-custom udp');
  return HeaderCustomUDP(
    mode: map['mode'] as String?,
    client: map['client'] == null
        ? null
        : asJsonList(map['client'], UDPItem.fromJson),
    server: map['server'] == null
        ? null
        : asJsonList(map['server'], UDPItem.fromJson),
  );
}