StatefulMapController constructor
- {@required MapController mapController,
- TileLayerType tileLayerType = TileLayerType.normal,
- TileLayerOptions customTileLayer,
- 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();
}
});
}