toMap method

Map<String, Object?> toMap()

As a map.

Implementation

Map<String, Object?> toMap() => <String, Object?>{
  "id": id,
  "title": title,
  "body": body,
  "subtitle": subtitle,
  "payload": payload == null ? null : jsonEncode(payload),
  "image": image,
  "largeIcon": largeIcon,
  "channelId": channelId,
  "importance": importance.name,
  "group": group,
  "groupSummary": groupSummary,
  "actions": actions.map((UNotificationAction a) => a.toMap()).toList(),
  "progress": progress?.toMap(),
  "ongoing": ongoing,
  "autoCancel": autoCancel,
  "silent": silent,
  "sound": sound,
  "badge": badge,
  "color": color,
  "timeoutMs": timeout?.inMilliseconds,
  "fullScreen": fullScreen,
  "visibility": visibility.name,
  "lines": lines,
  "chronometer": chronometer,
  "when": when?.millisecondsSinceEpoch,
  "interruption": interruption.name,
  "relevance": relevance,
  "category": category,
};