onPermissionsGranted method
Called when the necessary permissions for the Grouplink SDK are granted. This method is typically called after the user has granted permissions for location and Bluetooth.
Implementation
@override
Future<void> onPermissionsGranted() async {
if (Platform.isIOS) {
try {
await iOSSDKChannel.invokeMethod<String>('onPermissionsGranted');
} on PlatformException catch (e) {
log("Error onPermissionsGranted: ${e.message}");
rethrow;
}
}
if (Platform.isAndroid) {
try {
await methodChannel.invokeMethod("onPermissionsGranted");
} on PlatformException catch (e) {
log("Error onPermissionsGranted: ${e.message}");
rethrow;
}
}
}