MapViewController constructor
MapViewController(
{ - String? situmUser,
- required String situmApiKey,
})
Implementation
MapViewController({
String? situmUser,
required String situmApiKey,
}) {
// Open SDK channel to call native (private) methods if necessary.
// WARNING: don't set the method call handler here as it will overwrite the
// one provided by the SDK controller.
methodChannel = const MethodChannel(situmSdkChannelId);
var situmSdk = SitumSdk();
// Be sure to initialize, configure and authenticate in our SDK
// so it can be used in callbacks, etc.
situmSdk.init();
situmSdk.setApiKey(situmApiKey);
// Subscribe to native SDK messages so the location updates can be directly
// forwarded to the map viewer.
situmSdk.internalSetMethodCallMapDelegate(_methodCallHandler);
_validateMapViewProjectSettings();
}