Flutter Flatter firebase OnLaunch通知有效负载缓存

Flutter Flatter firebase OnLaunch通知有效负载缓存,flutter,firebase-cloud-messaging,firebase-notifications,Flutter,Firebase Cloud Messaging,Firebase Notifications,我已经成功地设置了Flatter firebase通知处理,但我现在的问题是,我需要知道通知和缓存发送了什么有效负载,以便当应用程序从终止状态打开时,我可以检索这些缓存数据 这似乎不起作用,因为它总是返回null,并且我无法找到一种方法来调试它,因为它是一个终止的应用程序状态。这在Android和iOS上都会发生 我的设置: _fcm.configure(onMessage: (Map<String, dynamic> message) async { _handleOnMess

我已经成功地设置了Flatter firebase通知处理,但我现在的问题是,我需要知道通知和缓存发送了什么有效负载,以便当应用程序从终止状态打开时,我可以检索这些缓存数据

这似乎不起作用,因为它总是返回null,并且我无法找到一种方法来调试它,因为它是一个终止的应用程序状态。这在Android和iOS上都会发生

我的设置:

_fcm.configure(onMessage: (Map<String, dynamic> message) async {
  _handleOnMessage(message);
}, onLaunch: (Map<String, dynamic> message) async {
  _handleOnLaunch(message);
}, onResume: (Map<String, dynamic> message) async {
  _handleOnResume(message);
});
void _handleOnLaunch(Map<String, dynamic> message) {
    _storage.write(key: 'notification_alert', value: message.toString());
}
var payload = await _storage.read(key: 'notification_alert');