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

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

Open
Chandio763 opened this issue May 20, 2022 · 11 comments

Comments

@Chandio763
Copy link

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.

  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/Softwares/flutter/packages/flutter/lib/src/widgets/binding.dart').
    package:flutter/…/widgets/binding.dart:1
    WidgetsBinding.instance!.addPostFrameCallback((_) {

Please ugrade package to flutter 3.0 and update asap.

@Chandio763
Copy link
Author

Thanks, I will check it asap.

@martin-braun
Copy link
Contributor

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

@Chandio763
Copy link
Author

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
Copy link
Contributor

martin-braun commented Jun 4, 2022

@martin-braun
Copy link
Contributor

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

@Chandio763
Copy link
Author

Okay Sir, Thank you for your contribution.

@bhanuka96
Copy link

Temp Solution

  google_maps_place_picker:
    git:
      url: https://github.com/bhanuka96/google_maps_place_picker.git
      ref: binding-warning-fix

@edwin-alvarez
Copy link

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

@bhanuka96
Copy link

@edwin-alvarez Done.

@edwin-alvarez
Copy link

@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
Copy link

bhanuka96 commented Jun 27, 2022

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

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

4 participants