SearchUsersResponse.fromJson constructor

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

Implementation

factory SearchUsersResponse.fromJson(Map<String, dynamic> json) {
  return SearchUsersResponse(
    nextToken: json['NextToken'] as String?,
    totalCount: json['TotalCount'] as int?,
    users: (json['Users'] as List?)
        ?.whereNotNull()
        .map((e) => UserData.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}