fromIdentifyEvent static method

PendingEvent fromIdentifyEvent(
  1. IdentifyEvent event,
  2. String integrationName, {
  3. int retryIntervalSeconds = 30,
})

Creates a PendingEvent from an IdentifyEvent

Implementation

static PendingEvent fromIdentifyEvent(
  IdentifyEvent event,
  String integrationName, {
  int retryIntervalSeconds = 30,
}) {
  return PendingEvent(
    id: '${DateTime.now().millisecondsSinceEpoch}_${integrationName}_identify',
    eventType: PendingEventType.identify,
    eventData: {'customID': event.customID, 'properties': event.properties},
    integrationName: integrationName,
    lastAttempt: DateTime.now(),
    retryIntervalSeconds: retryIntervalSeconds,
    createdAt: DateTime.now(),
  );
}