fluttercommunity/flutter_google_places

Exception when searching and selecting a location in version 0.2.5

guilhermedaldim opened this issue · 2 comments

I am getting this exception after updating the plugin to the latest version.

When searching and when I select a location, the following exception is thrown:

E/flutter (20457): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: Bad state: Cannot add new events after calling close
E/flutter (20457): #0      _BroadcastStreamController.add  (dart:async/broadcast_stream_controller.dart:249:24)
E/flutter (20457): #1      Subject._add 
package:rxdart/…/subjects/subject.dart:141
E/flutter (20457): #2      Subject.add 
package:rxdart/…/subjects/subject.dart:135
E/flutter (20457): #3      PlacesAutocompleteState._onQueryChange.<anonymous closure> 
package:flutter_google_places/src/flutter_google_places.dart:418
E/flutter (20457): #4      _rootRun  (dart:async/zone.dart:1182:47)
E/flutter (20457): #5      _CustomZone.run  (dart:async/zone.dart:1093:19)
E/flutter (20457): #6      _CustomZone.runGuarded  (dart:async/zone.dart:997:7)
E/flutter (20457): #7      _CustomZone.bindCallbackGuarded.<anonymous closure>  (dart:async/zone.dart:1037:23)
E/flutter (20457): #8      _rootRun  (dart:async/zone.dart:1190:13)
E/flutter (20457): #9      _CustomZone.run  (dart:async/zone.dart:1093:19)
E/flutter (20457): #10     _CustomZone.bindCallback.<anonymous closure>  (dart:async/zone.dart:1021:23)
E/flutter (20457): #11     Timer._createTimer.<anonymous closure>  (dart:async-patch/timer_patch.dart:18:15)
E/flutter (20457): #12     _Timer._runTimers  (dart:isolate-patch/timer_impl.dart:397:19)
E/flutter (20457): #13     _Timer._handleMessage  (dart:isolate-patch/timer_impl.dart:428:5)
E/flutter (20457): #14     _RawReceivePortImpl._handleMessage  (dart:isolate-patch/isolate_patch.dart:168:12)
Flutter doctor -v:

[√] Flutter (Channel beta, 1.19.0-4.2.pre, on Microsoft Windows [versão 10.0.18363.900], locale pt-BR)
    • Flutter version 1.19.0-4.2.pre at C:\flutter
    • Framework revision 9b9b543d92 (3 days ago), 2020-06-22 12:19:28 -0700
    • Engine revision 9a28c3bcf4
    • Dart version 2.9.0 (build 2.9.0-14.1.beta)

 
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\Guilherme\AppData\Local\Android\sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 46.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.46.1)
    • VS Code at C:\Users\Guilherme\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.11.0

[√] Connected device (1 available)
    • ASUS X00TDB • J9AXB601K930JN6 • android-arm64 • Android 9 (API 28)

Same issue here.

I have updated this package, please use the following:

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