methodHandler method
Implementation
Future<void> methodHandler(MethodCall call) async {
switch (call.method) {
case 'onBackgroundNotificationContentClick':
final callCid = call.arguments;
onBackgroundNotificationContentClick?.call(callCid);
break;
case 'onBackgroundNotificationButtonClick':
final arguments = (call.arguments as List).cast<String>();
final buttonType = arguments[0];
final callCid = arguments[1];
final serviceType = arguments[2];
onBackgroundNotificationButtonClick?.call(
buttonType,
callCid,
serviceType == ServiceType.call.name
? ServiceType.call
: ServiceType.screenSharing,
);
break;
case 'onPlatformUiLayerDestroyed':
final callCid = call.arguments;
onBackgroundNotificationUiLayerDestroyed?.call(callCid);
break;
}
}