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

pass URI instead of string for all http requests. Fails with latest null safety plugins (http package) #127

Open
mahendary opened this issue Jun 29, 2021 · 5 comments

Comments

@mahendary
Copy link

My app build failing with below errors
../../../flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_webservice-0.0.19/lib/src/utils.dart:61:27: Error: The argument type 'String' can't be assigned to the parameter type 'Uri'.
- 'Uri' is from 'dart:core'.
return httpClient.get(url, headers: headers);
^
../../../flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_webservice-0.0.19/lib/src/utils.dart:74:28: Error: The argument type 'String' can't be assigned to the parameter type 'Uri'.
- 'Uri' is from 'dart:core'.
return httpClient.post(url, body: body, headers: postHeaders);

@loicsacre
Copy link

It is fixed in the master but not released yet. You can temporarily add this to your pubsepc.yaml:

google_maps_webservice:
    git:
      url: git@github.com:lejard-h/google_maps_webservice.git

@elogic2square
Copy link

elogic2square commented Jul 13, 2021

I am also facing same issue after flutter upgraded to latest version
I added git link in pubsepc.xml..but i am not able to get
Git error. Command: git clone --mirror git@github.com:lejard-h/google_maps_webservice.git /home/user/Android/flutter/.pub-cache/git/cache/google_maps_webservice-3f5a9baf305dbcec6eb682c482aa09512c60aef2
stdout:
stderr: Cloning into bare repository '/home/user/Android/flutter/.pub-cache/git/cache/google_maps_webservice-3f5a9baf305dbcec6eb682c482aa09512c60aef2'...
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
exit code: 128

@sgelves
Copy link

sgelves commented Jul 20, 2021

updating to ^0.0.20-nullsafety.5 solved my problem.

@edihasaj
Copy link

Yes upgrading to nullsafety.5 solved the problem for me.
https://pub.dev/packages/google_maps_webservice/versions/0.0.20-nullsafety.5/install

@Eazash
Copy link

Eazash commented Jan 13, 2022

Thanks @sgelves, it solved the problem for me. It still hasn't been released however, which is very disappointing.

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

6 participants