encodeLibraryBlob function
Encode data as a Remote Flutter Widgets binary library blob.
See also:
- decodeLibraryBlob, which decodes this format.
- encodeDataBlob, which uses a subset of this format to decode Remote Flutter Widgets binary data blobs.
- parseLibraryFile, which parses the text variant of this format.
Implementation
Uint8List encodeLibraryBlob(RemoteWidgetLibrary value) {
final _BlobEncoder encoder = _BlobEncoder();
encoder.writeSignature(libraryBlobSignature);
encoder.writeLibrary(value);
return encoder.bytes.toBytes();
}