handleMethod method

Future handleMethod(
  1. MethodCall call
)

Implementation

Future<dynamic> handleMethod(MethodCall call) async {
  switch (call.method) {
    case "on_notification_clicked":
      debugPrint("TencentCloudChatPush: ${call.arguments}");
      final ext = call.arguments.toString();
      final ParseExtInfoResult conversationInfo = TencentCloudChatPushUtils.parseExtInfo(ext);
      onNotificationClicked?.call(
        ext: call.arguments.toString(),
        userID: conversationInfo.userID,
        groupID: conversationInfo.groupID,
      );
      break;
    case "on_app_wake_up":
      onAppWakeUp?.call();
      break;
    default:
      throw UnsupportedError("Unrecognized Event");
  }
}