GameSessionConnectionInfo.fromJson constructor

GameSessionConnectionInfo.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory GameSessionConnectionInfo.fromJson(Map<String, dynamic> json) {
  return GameSessionConnectionInfo(
    dnsName: json['DnsName'] as String?,
    gameSessionArn: json['GameSessionArn'] as String?,
    ipAddress: json['IpAddress'] as String?,
    matchedPlayerSessions: (json['MatchedPlayerSessions'] as List?)
        ?.whereNotNull()
        .map((e) => MatchedPlayerSession.fromJson(e as Map<String, dynamic>))
        .toList(),
    port: json['Port'] as int?,
  );
}