UserList.fromJson constructor

UserList.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory UserList.fromJson(Map<String, Object?> json) {
  return UserList(
    endIndex: (json[r'end-index'] as num?)?.toInt(),
    items: (json[r'items'] as List<Object?>?)
            ?.map(
                (i) => User.fromJson(i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    maxResults: (json[r'max-results'] as num?)?.toInt(),
    size: (json[r'size'] as num?)?.toInt(),
    startIndex: (json[r'start-index'] as num?)?.toInt(),
  );
}