onMapCreated method

void onMapCreated(
  1. GoogleMapController controller
)

Function to handle when maps created

Implementation

void onMapCreated(GoogleMapController controller) async {
  ///Loading map style
  _mapStyle =
      await rootBundle.loadString("packages/polymaker/assets/map_style.txt");

  _completer.complete(controller);
  _controller = controller;

  ///Set style to map
  _controller!.setMapStyle(_mapStyle);

  notifyListeners();
}