Closed shreyas1599 closed 4 years ago
contributor screen within a repository
Do you mean something like this? https://github.com/git-touch/git-touch/graphs/contributors
If so, perhaps it is simpler to create a separate screen?
Also while using ListPayload of list_stateful.dart scaffold, I'm having a bit of trouble using cursor. Should I use pagination and pass the page number each time as the cursor until the json output is null?
Yeah, it's right. The cursor
name comes from GraphQL pagination, in which case it is a string
. It is designed to be a generic type so could also be used in RESTful API, in which case it is a number
Example here: https://github.com/git-touch/git-touch/blob/master/lib/screens/gh_org_repos.dart
Alright, thanks a lot!
@pd4d10 I'm trying to create a contributor screen within a repository. (So far, I've only managed to get the count of contributors and displayed it on the
GhRepoScreen
). I can do this only through REST and not GraphQL. What do you think is a better option?Make the API call in the
GhUsersScreen
or theGhCommitsScreen
and use anif
condition to decide whether to make a graphql(for others)/rest(for contributors) call. These two screens are almost identical to how the Contributor screen would look with the subtitle in these two being replaced by the number of commits.Create a separate screen
GhContributorsScreen
.Also while using
ListPayload
oflist_stateful.dart
scaffold, I'm having a bit of trouble usingcursor
. Should I use pagination and pass the page number each time as the cursor until the json output is null? Is this right? Or is there a better way to do this?Thanks in advance for your help.