encodeFloat64 function

Uint8List encodeFloat64(
  1. double number
)

Encode a float into a Uint8List (8 bytes) @param {Number} number Number to encode

Implementation

Uint8List encodeFloat64(double number) {
  final ByteData byteConvert = ByteData(8);
  byteConvert.setFloat64(0, number);
  return byteConvert.buffer.asUint8List();
}