ListTargetsResult.fromJson constructor Null safety

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

Implementation

factory ListTargetsResult.fromJson(Map<String, dynamic> json) {
  return ListTargetsResult(
    nextToken: json['NextToken'] as String?,
    targets: (json['Targets'] as List?)
        ?.whereNotNull()
        .map((e) => TargetSummary.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}