setLocationPermissionProvider method
Sets the provider Intercom uses to ask for location permission from
Mobile Carousel screens.
Carousel screens that ask for location permission are only shown once a provider is set. It replaces any provider set before.
Your app must declare NSLocationWhenInUseUsageDescription in its
Info.plist, and NSLocationAlwaysAndWhenInUseUsageDescription if you
want Intercom to ask for "Always" access.
Note: this is only supported on iOS. It has no effect on Android and is not supported on web.
Implementation
@override
Future<void> setLocationPermissionProvider(
IntercomLocationPermissionProvider provider) async {
if (!_supportsLocationPermissionProvider) {
return;
}
_locationPermissionProvider = provider;
_ensureMethodCallHandler();
await _channel.invokeMethod('setLocationPermissionProvider', {
'status': provider.authorizationStatus.name,
});
}