Welcome to 16892 Developer Community-Open, Learning,Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

enter image description here

I'm getting this error when I'm trying to change ma Google maps Color

error: The method 'setMapStyle' isn't defined for the type 'Completer'.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
597 views
Welcome To Ask or Share your Answers For Others

1 Answer

First define the Controller for the GoogleMap

  GoogleMapController mapController;

And now add that Controller to set the map style for the map in your GoogleMap Widget.

  onMapCreated: (GoogleMapController controller) {
    mapController = controller;
    mapController.setMapStyle(mapStyle);
    // _controller.complete(controller);
  },

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to 16892 Developer Community-Open, Learning and Share
...