writeBinaryDescriptor method
void
writeBinaryDescriptor(
- IndentingWriter out,
- String identifierName,
- String name,
- GeneratedMessage descriptor,
Implementation
void writeBinaryDescriptor(IndentingWriter out, String identifierName,
String name, GeneratedMessage descriptor) {
final base64 = base64Encode(descriptor.writeToBuffer());
out.println('/// Descriptor for `$name`. Decode as a '
'`${descriptor.info_.qualifiedMessageName}`.');
const indent = ' ';
final base64Lines =
_splitString(base64, 74).map((s) => "'$s'").join('\n$indent');
out.println('final $_typedDataImportPrefix.Uint8List '
'$identifierName = '
'$_convertImportPrefix.base64Decode(\n$indent$base64Lines);');
}