fromMap static method
Convert supplied Map to Notification instance.
Implementation
static Notification fromMap(Map map) {
final Map<String, dynamic> m = map.cast<String, dynamic>();
return Notification(
layout: (m['layout'] != null) ? m['layout'] : null,
title: (m['title'] != null) ? m['title'] : null,
text: (m['text'] != null) ? m['text'] : null,
color: (m['color'] != null) ? m['color'] : null,
smallIcon: (m['smallIcon'] != null) ? m['smallIcon'] : null,
largeIcon: (m['largeIcon'] != null) ? m['largeIcon'] : null,
priority: (m['priority'] != null)
? NotificationPriority.from(m['priority'])
: null,
sticky: (m['sticky'] != null) ? m['sticky'] : null,
channelName: (m['channelName'] != null) ? m['channelName'] : null,
channelId: (m['channelId'] != null) ? m['channelId'] : null,
strings:
(m['strings'] != null) ? m['strings'].cast<String, String>() : null,
actions: (m['actions'] != null) ? m['actions'].cast<String>() : null);
}