setApiKey method
Authenticate yourself into our SDK to start positioning, navigating and using further functionalities of our SDK.
situmApiKey
is the API key associated with your account. You can find this key at https://dashboard.situm.com/accounts/profile.
Note: This method should only be used if you have called init without the optional parameters Note: After invoking setApiKey, all subsequent calls will be ignored until logout is invoked.
Implementation
Future<void> setApiKey(String situmApiKey) async {
if (_alreadyAuthenticated) {
return;
}
await methodChannel.invokeMethod(
"setApiKey",
<String, dynamic>{
'situmUser': "---@situm.com",
// Underlying sdk expects to have a non empty, non null email. But is not used anymore.
'situmApiKey': situmApiKey,
},
);
_alreadyAuthenticated = true;
}