DatumSyncBatchOperation<T extends DatumEntityInterface> constructor

DatumSyncBatchOperation<T extends DatumEntityInterface>({
  1. required List<DatumSyncOperation<T>> operations,
})

Implementation

DatumSyncBatchOperation({
  required this.operations,
}) : super(
        id: 'batch_${operations.first.id}',
        userId: operations.first.userId,
        entityId: 'batch_${operations.first.entityId}',
        type: operations.first.type,
        timestamp: operations.first.timestamp,
        sizeInBytes: operations.fold(0, (sum, op) => sum + op.sizeInBytes),
      );