encode<V> static method

V encode<V>(
  1. NotificationEventData instance,
  2. Encoder<V> encoder
)

Implementation

static V encode<V>(
  NotificationEventData instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodePrimitive(
    'object',
    instance.object,
  );
  if (instance.previousAttributes != null) {
    container.encodePrimitive(
      'previous_attributes',
      instance.previousAttributes!,
    );
  }
  return container.value;
}