fysoul17 / google_maps_place_picker

Place picker on Google Maps for Flutter
MIT License
222 stars 356 forks source link

Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. #173

Open Chandio763 opened 2 years ago

Chandio763 commented 2 years ago

C:/Softwares/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_place_picker-2.1.0-nullsafety.3/lib/src/autocomplete_search.dart:74:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.

Please ugrade package to flutter 3.0 and update asap.

Chandio763 commented 2 years ago

Thanks, I will check it asap.

martin-braun commented 2 years ago

@Chandio763 Please note, this is my fork, you have to install my version to get the fix.

Chandio763 commented 2 years ago

I upgraded, this error is solved but I am facing an error which I also faced in last version. Error: java.io.FileNotFoundException: /data/user/0/com.swaticorporations.attendancesystem/files/phenotype/shared/com.google.android.libraries.consentverifier#com.swaticorporations.attendancesystem.pb (No such file or directory). and Caused by: java.lang.SecurityException: GoogleCertificatesRslt: not allowed: pkg=com.swaticorporations.attendancesystem, sha256=[37bf7a394fe1bb3df9c96729f2675906a0936118c95daee4b3069b6eee4faa93], atk=false, ver=221514030.true (go/gsrlt)

I don't If its because of google API key or due to configuration mistake.

martin-braun commented 2 years ago

@Chandio763 Try to update your device. Ref: https://stackoverflow.com/questions/64196715/securityexception-googlecertificatesrslt-not-allowed

martin-braun commented 2 years ago

Hey @Chandio763. The newest version mb20 will not require a Flutter upgrade anymore, so it should work for Flutter 2, again.

Chandio763 commented 2 years ago

Okay Sir, Thank you for your contribution.

bhanuka96 commented 2 years ago

Temp Solution

  google_maps_place_picker:
    git:
      url: https://github.com/bhanuka96/google_maps_place_picker.git
      ref: binding-warning-fix
edwin-alvarez commented 2 years ago

@bhanuka96 there is a new permission_handler 10.0.0, can you upgrade your dependency? thanks

bhanuka96 commented 2 years ago

@edwin-alvarez Done.

edwin-alvarez commented 2 years ago

@bhanuka96 , still see the same google_maps_place_picker from git which depends on permission_handler ^9.2.0, permission_handler ^9.2.0 is required.

this is how I'm calling your branch google_maps_place_picker: git: url: https://github.com/bhanuka96/google_maps_place_picker.git ref: binding-warning-fix

bhanuka96 commented 2 years ago

@edwin-alvarez How did you see it? Please remove pubspec.lock file and run flutter clean and flutter pub get and check again