toBuffer method

Bytes toBuffer()

converts the object to binary data

Implementation

Bytes toBuffer() {
  final payload = buf.Payload()
    ..accessTokenHashValue = accessTokenHashValue ?? ''
    ..audience = audience ?? ''
    ..authorizedParty = authorizedParty ?? ''
    ..email = email ?? ''
    ..emailVerified = emailVerified
    ..expirationTime = Int64(expirationTime ?? 0)
    ..hostedDomain = hostedDomain ?? ''
    ..issuedAt = Int64(issuedAt ?? 0)
    ..issuer = issuer ?? ''
    ..nonce = nonce ?? ''
    ..subject = subject ?? '';
  return payload.writeToBuffer();
}