-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
在2.5.1版本中 rammus-2.5.1\lib\src\cloud_push_message.dart文件中
class OnNotification {
final String? title;
final String? summary;
final String? extras;
OnNotification(this.title, this.summary, this.extras);
}
extras类型为String 而在 RammusPushIntentService 中
override fun onNotification(context: Context, title: String?, summary: String?, extras: MutableMap<String, String>?) {
Log.d("RammusPushIntentService","onNotification title is $title, summary is $summary, extras: $extras")
handler.postDelayed({
RammusPushHandler.methodChannel?.invokeMethod("onNotification", mapOf(
"title" to title,
"summary" to summary,
"extras" to extras
))
},1500)
}
extras是Map这样会报错的
有两种办法,
第一种是使用rammus-2.5.0 版本
另一种是需要改为
class OnNotification {
final String? title;
final String? summary;
final Map? extras;//这里类型由String改为Map
OnNotification(this.title, this.summary, this.extras);
}
希望作者可以尽早修复这个小问题
Metadata
Metadata
Assignees
Labels
No labels