clickOnPush method

Future<void> clickOnPush(
  1. Map pushedMessage,
  2. String platform
)

Implementation

Future<void> clickOnPush(
    Map<dynamic, dynamic> pushedMessage, String platform) async {
  if (pushedMessage["buttonId"] == null) {
    pushedMessage["buttonId"] = "DEFAULT";
  }
  await addLog(methodChannel, '$platform click on push: $pushedMessage');
  var token = await methodChannel.invokeMethod<String>('getToken');
  await FlutterPushedMessagingPlatform.confirmDelivered(token ?? "",
      pushedMessage["messageId"], "Hpk", pushedMessage["mfTraceId"]);
  FlutterPushedMessagingPlatform.messageController.sink.add(pushedMessage);
  await methodChannel.invokeMethod<bool>(
      'setLastMessageId', {"lastMessageId": pushedMessage["messageId"]});
}