bcsString static method
Serializes and deserializes UTF-8 encoded strings.
Internally uses bcsBytes to handle the byte representation of the string.
Implementation
static Layout<String> bcsString({String? property}) {
return CustomLayout<List<int>, String>(
layout: bcsBytes(),
decoder: (bytes) {
return StringUtils.decode(bytes);
},
encoder: (src) {
return StringUtils.encode(src);
},
property: property);
}