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

Method 'cancel' cannot be called on 'Timer?' because it is potentially null #180

Closed
BaptisteCool opened this issue Jan 5, 2022 · 3 comments

Comments

@BaptisteCool
Copy link

I have this error since i upgrated dart and flutter to last version.

lib/src/flutter_google_places.dart:468:17: Error: Method 'cancel' cannot be called on 'Timer?' because it is potentially null.

  • 'Timer' is from 'dart:async'.
    Try calling using ?. instead.
    _debounce.cancel();
    ^^^^^^
    /C:/Users/[User]/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_google_places-0.3.0/lib/src/flutter_google_places.dart:392:10: Context: '_debounce' refers to a property so it couldn't be promoted.
    See http://dart.dev/go/non-promo-property

Timer? _debounce;
^

do you know the problem ?

@PascalOtto
Copy link
Contributor

PascalOtto commented Jan 15, 2022

bug was fixed in #181

just needs to be pushed to pub.dev @juliansteenbakker

@juliansteenbakker
Copy link
Collaborator

Please see #182. Until this is fixed i can't publish it.

@juliansteenbakker
Copy link
Collaborator

Please use this for now:

  flutter_google_places:
    git:
      url: https://github.com/fluttercommunity/flutter_google_places
      ref: v0.3.2

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

3 participants