RemoteNotification.fromMap constructor

RemoteNotification.fromMap(
  1. Map<String, dynamic> map
)

Constructs a RemoteNotification from a raw Map.

Implementation

factory RemoteNotification.fromMap(Map<String, dynamic> map) {
  return RemoteNotification(
    title: map['title'],
    titleLocArgs: _toList(map['titleLocArgs']),
    titleLocKey: map['titleLocKey'],
    body: map['body'],
    bodyLocArgs: _toList(map['bodyLocArgs']),
    bodyLocKey: map['bodyLocKey'],
    android: map['android'] != null
        ? AndroidNotification.fromMap(
            Map<String, dynamic>.from(map['android']))
        : null,
    apple: map['apple'] != null
        ? AppleNotification.fromMap(Map<String, dynamic>.from(map['apple']))
        : null,
    web: map['web'] != null
        ? WebNotification.fromMap(Map<String, dynamic>.from(map['web']))
        : null,
  );
}