AuthSentCodeTypeFirebaseSms.deserialize constructor
AuthSentCodeTypeFirebaseSms.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory AuthSentCodeTypeFirebaseSms.deserialize(BinaryReader reader) {
// Read [AuthSentCodeTypeFirebaseSms] fields.
final flags = reader.readInt32();
final hasNonceField = (flags & 1) != 0;
final nonce = hasNonceField ? reader.readBytes() : null;
final hasPlayIntegrityProjectIdField = (flags & 4) != 0;
final playIntegrityProjectId =
hasPlayIntegrityProjectIdField ? reader.readInt64() : null;
final hasPlayIntegrityNonceField = (flags & 4) != 0;
final playIntegrityNonce =
hasPlayIntegrityNonceField ? reader.readBytes() : null;
final hasReceiptField = (flags & 2) != 0;
final receipt = hasReceiptField ? reader.readString() : null;
final hasPushTimeoutField = (flags & 2) != 0;
final pushTimeout = hasPushTimeoutField ? reader.readInt32() : null;
final length = reader.readInt32();
// Construct [AuthSentCodeTypeFirebaseSms] object.
final returnValue = AuthSentCodeTypeFirebaseSms(
nonce: nonce,
playIntegrityProjectId: playIntegrityProjectId,
playIntegrityNonce: playIntegrityNonce,
receipt: receipt,
pushTimeout: pushTimeout,
length: length,
);
// Now return the deserialized [AuthSentCodeTypeFirebaseSms].
return returnValue;
}