ListWorldsResponse.fromJson constructor

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

Implementation

factory ListWorldsResponse.fromJson(Map<String, dynamic> json) {
  return ListWorldsResponse(
    nextToken: json['nextToken'] as String?,
    worldSummaries: (json['worldSummaries'] as List?)
        ?.whereNotNull()
        .map((e) => WorldSummary.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}