yes, I want to send the data to an application that I am developing in flutter, there the data must be received from the Uint8List type. When I send the data as it is in the code above, it should arrive "AB" but it arrives "A" and then "B", sometimes it arrives correct. (Sorry for my terrible english).
If you want to make purists' heads explode you can use a union too but might not always get the accurate result if you want to do so over different platforms.
a conventional way of sending fractional data as an integer is to multiply the data by 10, 100, assuming it still fits within the number of bytes used to represent the value