stateToSnapshotMessage method

AttributionSnapshotMessage stateToSnapshotMessage(
  1. AttributionState attrState,
  2. String messageId
)

Convert attribution state to snapshot message for persistence.

Implementation

AttributionSnapshotMessage stateToSnapshotMessage(
  AttributionState attrState,
  String messageId,
) {
  return AttributionSnapshotMessage(
    messageId: messageId,
    surface: attrState.surface,
    fileStates: attrState.fileStates,
    promptCount: attrState.promptCount,
    promptCountAtLastCommit: attrState.promptCountAtLastCommit,
    permissionPromptCount: attrState.permissionPromptCount,
    permissionPromptCountAtLastCommit:
        attrState.permissionPromptCountAtLastCommit,
    escapeCount: attrState.escapeCount,
    escapeCountAtLastCommit: attrState.escapeCountAtLastCommit,
  );
}