Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't get gist #288

Closed
ghost opened this issue Dec 24, 2021 · 4 comments · Fixed by #294
Closed

I can't get gist #288

ghost opened this issue Dec 24, 2021 · 4 comments · Fixed by #294

Comments

@ghost
Copy link

ghost commented Dec 24, 2021

I want to get some information about gists, but I'm getting type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'List<dynamic>?' in type cast Exception.

To reproduce:

main() async {
  GitHub github = GitHub();

  var gist = await github.gists.getGist("27fd2f861183802ee9fe6c79c10df644");

  print(gist.createdAt);
}

this is the error:

Unhandled exception:
type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'List<dynamic>?' in type cast
#0      _$GistFromJson (package:github/src/common/model/gists.g.dart:19:29)
#1      new Gist.fromJson (package:github/src/common/model/gists.dart:49:56)
#2      GistsService.getGist.<anonymous closure> (package:github/src/common/gists_service.dart:50:64)
#3      GitHub.requestJson (package:github/src/common/github.dart:323:34)
<asynchronous suspension>
#4      main (package:my_app/singleton.dart:12:14)
<asynchronous suspension>

Process finished with exit code 255
@github-actions
Copy link

👋 Thanks for reporting! @robrbecker will take a look.

@robbecker-wf
Copy link
Contributor

I think I know what this is. I'll investigate and get a fix up.

@robrbecker
Copy link
Member

So, I have a fix for this, but it will be a breaking change (to be released in 9.0.0). So, I'm going to get a couple other things merged in and then cut a release.

@ghost
Copy link
Author

ghost commented Jan 6, 2022

Thanks @robbecker-wf, i will be waiting for it ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants