ListEventTypesResult.fromJson constructor Null safety

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

Implementation

factory ListEventTypesResult.fromJson(Map<String, dynamic> json) {
  return ListEventTypesResult(
    eventTypes: (json['EventTypes'] as List?)
        ?.whereNotNull()
        .map((e) => EventTypeSummary.fromJson(e as Map<String, dynamic>))
        .toList(),
    nextToken: json['NextToken'] as String?,
  );
}