encodeHandoff method

Uint8List encodeHandoff(
  1. RitoForegroundHandoff handoff
)

Implementation

Uint8List encodeHandoff(RitoForegroundHandoff handoff) {
  final writer = RitoFixedMessageWriter('RITOFGH1');
  writer.externalId(handoff.sessionId, 'session id');
  writer.fixedOptionalExternalId(
    handoff.expectedVisibleArtifactId,
    'expected visible artifact id',
  );
  writer.externalId(handoff.candidateArtifactId, 'candidate artifact id');
  return writer.finish(magic: 'RITOFGH1', expectedBytes: handoffWireBytes);
}