DirectUDPSocketOptions.fromJson constructor
DirectUDPSocketOptions.fromJson(
- Map<String, dynamic> json
)
Implementation
factory DirectUDPSocketOptions.fromJson(Map<String, dynamic> json) {
return DirectUDPSocketOptions(
remoteAddr: json.containsKey('remoteAddr')
? json['remoteAddr'] as String
: null,
remotePort: json.containsKey('remotePort')
? json['remotePort'] as int
: null,
localAddr: json.containsKey('localAddr')
? json['localAddr'] as String
: null,
localPort: json.containsKey('localPort')
? json['localPort'] as int
: null,
dnsQueryType: json.containsKey('dnsQueryType')
? DirectSocketDnsQueryType.fromJson(json['dnsQueryType'] as String)
: null,
sendBufferSize: json.containsKey('sendBufferSize')
? json['sendBufferSize'] as num
: null,
receiveBufferSize: json.containsKey('receiveBufferSize')
? json['receiveBufferSize'] as num
: null,
);
}