toMap method

  1. @override
Map<String, Object?> toMap()
override

Converts the event object to JSON.

Implementation

@override
Map<String, Object?> toMap() {
  return {
    'action': action,
    'deliveryDate': deliveryDate,
    'trigger': trigger,
    'categoryIdentifier': categoryIdentifier,
    'threadIdentifier': threadIdentifier,
    'notificationContent': notificationContent?.toMap(),
    'contexts': contexts.map((context) => context.toMap()).toList()
  };
}