MessageHandler constructor
MessageHandler(
- String type
Implementation
factory MessageHandler(String type) {
debugPrint("GOT MESSAGE WITH type: $type");
switch (type) {
case WV_MESSAGE_MAP_IS_READY:
return MapIsReadyHandler();
case WV_MESSAGE_ERROR:
return MapViewErrorHandler();
case WV_MESSAGE_DIRECTIONS_REQUESTED:
return DirectionsMessageHandler();
case WV_MESSAGE_NAVIGATION_REQUESTED:
return NavigationMessageHandler();
case WV_MESSAGE_NAVIGATION_STOP:
return NavigationStopMessageHandler();
case WV_MESSAGE_CARTOGRAPHY_POI_SELECTED:
return PoiSelectedMessageHandler();
case WV_MESSAGE_CARTOGRAPHY_POI_DESELECTED:
return PoiDeselectedMessageHandler();
case WV_MESSAGE_CALIBRATION_POINT_CLICKED:
return CalibrationPointClickedMessageHandler();
case WV_MESSAGE_CALIBRATION_STOPPED:
return CalibrationStoppedMessageHandler();
case WV_MESSAGE_UI_SPEAK_ALOUD_TEXT:
return SpeakAloudTextMessageHandler();
case WV_VIEWER_NAVIGATION_STARTED:
case WV_VIEWER_NAVIGATION_UPDATED:
case WV_VIEWER_NAVIGATION_STOPPED:
return ViewerNavigationMessageHandler();
default:
debugPrint("EmptyMessageHandler handles message of type: $type");
return EmptyMessageHandler();
}
}