StatefulMapController constructor

StatefulMapController(
  1. {@required MapController mapController,
  2. TileLayerType tileLayerType = TileLayerType.normal,
  3. TileLayerOptions customTileLayer,
  4. bool verbose = false}
)

Provide a Flutter map MapController

Implementation

StatefulMapController(
    {@required this.mapController,
    this.tileLayerType = TileLayerType.normal,
    this.customTileLayer,
    this.verbose = false})
    : assert(mapController != null) {
  // init state
  _markersState = MarkersState(mapController: mapController, notify: notify);
  _linesState = LinesState(notify: notify);
  _polygonsState = PolygonsState(notify: notify);
  _mapState = MapState(mapController: mapController, notify: notify);
  _statefulMarkersState =
      StatefulMarkersState(mapController: mapController, notify: notify);
  if (customTileLayer != null) {
    tileLayerType = TileLayerType.custom;
  }
  _tileLayerState = TileLayerState(
      type: tileLayerType, customTileLayer: customTileLayer, notify: notify);
  mapController.onReady.then((_) {
    // fire the map is ready callback
    if (!_readyCompleter.isCompleted) {
      _readyCompleter.complete();
    }
  });
}