google_maps_webservice
google_maps_webservice copied to clipboard
pass URI instead of string for all http requests. Fails with latest null safety plugins (http package)
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);
It is fixed in the master but not released yet. You can temporarily add this to your pubsepc.yaml
:
google_maps_webservice:
git:
url: [email protected]:lejard-h/google_maps_webservice.git
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 [email protected]: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
updating to ^0.0.20-nullsafety.5
solved my problem.
Yes upgrading to nullsafety.5 solved the problem for me. https://pub.dev/packages/google_maps_webservice/versions/0.0.20-nullsafety.5/install
Thanks @sgelves, it solved the problem for me. It still hasn't been released however, which is very disappointing.