a14n / dart-google-maps

A library to use Google Maps JavaScript API v3 from Dart scripts.
Apache License 2.0
130 stars 66 forks source link

GoogleMapController getZoomLevel has CastError exception #99

Closed readyiman closed 3 years ago

readyiman commented 3 years ago

Using Google Map for Flutter with null safety

Completer<GoogleMapController> _completer = Completer();

Future<double> zoomLevel() async {
    GoogleMapController controller = await _completer.future;
    return await controller.getZoomLevel();
  }

Exception happens at controller.getZoomLevel()

Exception has occurred.
_CastError (type 'Future<double?>' is not a subtype of type 'Future<double>' in type cast)
readyiman commented 3 years ago

Sorry wrong package