listFiles method Null safety

Stream<PullRequestFile> listFiles(
  1. RepositorySlug slug,
  2. int number
)

Lists the files in a pull request.

API docs: https://developer.github.com/v3/pulls/#list-pull-requests-files

Implementation

Stream<PullRequestFile> listFiles(RepositorySlug slug, int number) {
  return PaginationHelper(github).objects(
      'GET',
      '/repos/${slug.fullName}/pulls/$number/files',
      (dynamic i) => PullRequestFile.fromJson(i));
}