Flutter:Firebase消息传递图像URL

时间:2020-08-15 20:45:56

标签: firebase flutter firebase-cloud-messaging

是否可以获取从Firebase消息发送的图像URL并将其显示给用户?

我的代码:

    _firebaseMessaging.configure(
      onMessage: (Map<String, dynamic> message) async {
        print("================> onMessage: $message");
        _showItemDialog(message);
      },
      onLaunch: (Map<String, dynamic> message) async {
        print("================> onLaunch: $message");
        _navigateToItemDetail(message);
      },
      onResume: (Map<String, dynamic> message) async {
        print("================> onResume: $message");
        _navigateToItemDetail(message);
      },
    );

带有图片URL的Firebase消息:

Screenshot of firebase message

结果:

================> onMessage:{通知:{title:标题,正文:这不是notif文字},数据:{}}

0 个答案:

没有答案