CommentsForComparedCommit.fromJson constructor

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

Implementation

factory CommentsForComparedCommit.fromJson(Map<String, dynamic> json) {
  return CommentsForComparedCommit(
    afterBlobId: json['afterBlobId'] as String?,
    afterCommitId: json['afterCommitId'] as String?,
    beforeBlobId: json['beforeBlobId'] as String?,
    beforeCommitId: json['beforeCommitId'] as String?,
    comments: (json['comments'] as List?)
        ?.whereNotNull()
        .map((e) => Comment.fromJson(e as Map<String, dynamic>))
        .toList(),
    location: json['location'] != null
        ? Location.fromJson(json['location'] as Map<String, dynamic>)
        : null,
    repositoryName: json['repositoryName'] as String?,
  );
}