google_maps_webservice icon indicating copy to clipboard operation
google_maps_webservice copied to clipboard

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

Open mahendary opened this issue 3 years ago • 5 comments

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);

mahendary avatar Jun 29 '21 04:06 mahendary

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

loicsacre avatar Jul 08 '21 09:07 loicsacre

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

elogic2square avatar Jul 13 '21 16:07 elogic2square

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

sgelves avatar Jul 20 '21 14:07 sgelves

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

edihasaj avatar Jul 21 '21 19:07 edihasaj

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

Eazash avatar Jan 13 '22 10:01 Eazash