📜  堆栈 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:39.052000             🧑  作者: Mango

代码示例1
Future _handleNotification(
    Map message, bool dialog) async {
    var data = message['data'] ?? message;
    String notificationTitle = data['YOUR_KEY']; // here you need to replace YOUR_KEY with the actual key that you are sending in notification  **`"data"`** -field of the message. 
    String notificationMessage = data['YOUR_KEY'];// here you need to replace YOUR_KEY with the actual key that you are sending in notification  **`"data"`** -field of the message. 

    // now show the Dialog
    Utils().showMessageDialog(context, notificationTitle,notificationMessage);
  }