putDate method
Add a DateTime attribute for the given key.
The attribute key should be a string composed of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.
Date attribute values are sent in UTC to Batch. If you notice that the reported time may be off, try making an UTC DateTime for consistency.
Implementation
BatchEventAttributes putDate(String key, DateTime value) {
_attributes[key.toLowerCase()] = TypedAttribute(
type: TypedAttributeType.date,
value: value.toUtc().millisecondsSinceEpoch);
return this;
}