AuthTicket.fromJson constructor
AuthTicket.fromJson(
- Map<String, dynamic> json
)
Implementation
factory AuthTicket.fromJson(Map<String, dynamic> json) => AuthTicket(
host: (json['Host'] as String?) ?? '',
httpsPort: (json['HttpsPort'] as num?)?.toInt() ?? 0,
tcpPort: (json['TcpPort'] as num?)?.toInt() ?? 0,
secret: (json['Secret'] as String?) ?? '',
opcodeGroupsFromServer: Opcode.fromValue((json['OpcodeGroupsFromServer'] as num?)?.toInt() ?? 0),
opcodeGroupsToServer: Opcode.fromValue((json['OpcodeGroupsToServer'] as num?)?.toInt() ?? 0),
clientContext: Context.fromJson((json['ClientContext'] ?? {}) as Map<String, dynamic>),
tlsPort: (json['TlsPort'] as num?)?.toInt() ?? 0,
udpPort: (json['UdpPort'] as num?)?.toInt() ?? 0,
udpDtlsPort: (json['UdpDtlsPort'] as num?)?.toInt() ?? 0,
);