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 ({String? userID, String? groupID}) conversationInfo = TencentCloudChatPushUtils.parseExtInfo(ext);
      onNotificationClicked?.call(
        ext: call.arguments.toString(),
        userID: conversationInfo.userID,
        groupID: conversationInfo.groupID,
      );
    default:
      throw UnsupportedError("Unrecognized Event");
  }
}