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

onCameraMoveError #2

Open
Vinaykummar opened this issue Jun 2, 2020 · 2 comments
Open

onCameraMoveError #2

Vinaykummar opened this issue Jun 2, 2020 · 2 comments

Comments

@Vinaykummar
Copy link

hi i am getting this error

E/flutter (26050): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The method 'call' was called on null.
E/flutter (26050): Receiver: null
E/flutter (26050): Tried calling: call()
E/flutter (26050): #0 _DecoratedGoogleMapState.build. (package:decorated_google_maps_flutter/src/decorated_google_map.dart:227:34)
E/flutter (26050): #1 GoogleMapController._connectStreams. (package:google_maps_flutter/src/controller.dart:64:69)
E/flutter (26050): #2 _rootRunUnary (dart:async/zone.dart:1192:38)
E/flutter (26050): #3 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
E/flutter (26050): #4 _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
E/flutter (26050): #5 CastStreamSubscription._onData (dart:_internal/async_cast.dart:83:11)
E/flutter (26050): #6 _rootRunUnary (dart:async/zone.dart:1192:38)
E/flutter (26050): #7 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
E/flutter (26050): #8 _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
E/flutter (26050): #9 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (26050): #10 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:266:7)
E/flutter (26050): #11 _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:134:11)
E/flutter (26050): #12 _WhereStream._handleData (dart:async/stream_pipe.dart:209:12)
E/flutter (26050): #13 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:166:13)
E/flutter (26050): #14 _rootRunUnary (dart:async/zone.dart:1192:38)
E/flutter (26050): #15 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
E/flutter (26050): #16 _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
E/flutter (26050): #17 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (26050): #18 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:266:7)
E/flutter (26050): #19 _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:134:11)
E/flutter (26050): #20 _WhereStream._handleData (dart:async/stream_pipe.dart:209:12)
E/flutter (26050): #21 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:166:13)
E/flutter (26050): #22 _rootRunUnary (dart:async/zone.dart:1192:38)
E/flutter (26050): #23 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
E/flutter (26050): #24 _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
E/flutter (26050): #25 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (26050): #26 _DelayedData.perform (dart:async/stream_impl.dart:594:14)
E/flutter (26050): #27 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:710:11)
E/flutter (26050): #28 _PendingEvents.schedule. (dart:async/stream_impl.dart:670:7)
E/flutter (26050): #29 _rootRun (dart:async/zone.dart:1180:38)
E/flutter (26050): #30 _CustomZone.run (dart:async/zone.dart:1077:19)
E/flutter (26050): #31 _CustomZone.runGuarded (dart:async/zone.dart:979:7)
E/flutter (26050): #32 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1019:23)
E/flutter (26050): #33 _rootRun (dart:async/zone.dart:1184:13)
E/flutter (26050): #34 _CustomZone.run (dart:async/zone.dart:1077:19)
E/flutter (26050): #35 _CustomZone.runGuarded (dart:async/zone.dart:979:7)
E/flutter (26050): #36 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1019:23)
E/flutter (26050): #37 _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
E/flutter (26050): #38 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)

@mehmetoguzderin
Copy link
Owner

Hello @Vinaykummar

Can you give a little more context to your usage of onCameraMove? How you construct it etc.

@Vinaykummar
Copy link
Author

Vinaykummar commented Jun 2, 2020

As simple, once I got values from firestore instream builder I loaded markers into the map whenever i zoom in or zoom out or move map i am getting this log

This is how i am using
DecoratedGoogleMap( children: markers.toList(), onMapCreated: (mapController) async { position = await _geolocator.getCurrentPosition( desiredAccuracy: LocationAccuracy.best, locationPermissionLevel: GeolocationPermission.location); _googleMapController = mapController; _googleMapController.animateCamera( CameraUpdate.newCameraPosition(CameraPosition( target: LatLng(position.latitude, position.longitude), zoom: 16, ))); }, myLocationEnabled: true, mapType: MapType.normal, initialCameraPosition: myLocation),

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