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

Runtime error in Dart2: '_InternalLinkedHashMap<dynamic, dynamic>' is not a subtype of type 'Map<String, List<String>>' #37

Closed
ameiyil opened this issue Apr 13, 2018 · 2 comments
Assignees

Comments

@ameiyil
Copy link

ameiyil commented Apr 13, 2018

After migrating to Dart2, there are "invalid cast" errors being thrown when using the Dart Google API clients to call the server.

It stems from trying to implicitly downcast a generic Map to a Map<String, List<String>> on line 66 in clients.dart:

type '_InternalLinkedHashMap<dynamic, dynamic>' is not a subtype of type 'Map<String, List<String>>' where
  _InternalLinkedHashMap is from dart:collection
  Map is from dart:core
  String is from dart:core
  List is from dart:core
  String is from dart:core

#0      ApiRequester.request (package:_discoveryapis_commons/src/clients.dart:66)
#1      PeopleConnectionsResourceApi.list (package:googleapis/people/v1.dart:982)
@mkustermann
Copy link
Contributor

@jakobr-google Weren't you looking into this issue recently?

@jakobr-google jakobr-google self-assigned this Apr 23, 2018
@jakobr-google
Copy link
Contributor

I'll track all the Dart 2 issues in #35.

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

No branches or pull requests

3 participants