encode method
Encode list tlv to list bytes
Implementation
@override
Uint8List encode(List<TLV> tlvList) {
List<Uint8List> byteLists = [];
for (TLV tlv in tlvList) {
Uint8List typeBytes = Uint8List.fromList([tlv.type]);
Uint8List lengthBytes = _encodeLength(tlv.value.length);
byteLists.addAll([typeBytes, lengthBytes, tlv.value]);
}
return _concatenateUint8List(byteLists);
}