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

Exception #13

Closed
escamoteur opened this issue Jun 23, 2018 · 0 comments
Closed

Exception #13

escamoteur opened this issue Jun 23, 2018 · 0 comments

Comments

@escamoteur
Copy link

Hi,

I get this exception

setState() called after dispose(): _GooglePlacesAutocompleteOverlayState#5984d(lifecycle state: defunct, not mounted)
This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback. The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree.
This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose().

In line 333 of flutter_google_places_autocomplete.dart
I guess I know why and will make an PR

fauzipadlaw added a commit to fauzipadlaw/flutter_google_places that referenced this issue Aug 2, 2021
* update minimal flutter sdk to 2.2.0

I was using flutter 2.0.6 and using `flutter_google_places_hoc081098: ^1.0.0-nullsafety.4`. When run the app, I encountered error 
```
../../.pub-cache/hosted/pub.dartlang.org/flutter_google_places_hoc081098-1.0.0-nullsafety.4/lib/src/flutter_google_places.dart:261:9: Error: No named parameter with the name 'color'.
            color: Theme.of(context).colorScheme.secondary,
            ^^^^^
    ../../SDKs/flutold/packages/flutter/lib/src/material/progress_indicator.dart:304:9: Context: Found this candidate, but the arguments don't match.
      const LinearProgressIndicator({
            ^^^^^^^^^^^^^^^^^^^^^^^
```

I did some research that this parameter was added to flutter version 2.2.0 https://flutter.dev/docs/development/tools/sdk/release-notes

* add flutter sdk constraints

* fix wrong version number
fauzipadlaw added a commit to fauzipadlaw/flutter_google_places that referenced this issue Aug 2, 2021
update minimal flutter sdk to 2.2.0 (fluttercommunity#13)
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

2 participants