Question: I'm getting a Bluetooth Characteristic from a Bluetooth controller with [flutter blue](https://pub.dev/documentation/flutter_blue/latest/flutter_blue/BluetoothCharacteristic-class.html) as a List. This characteristic contains weight measurement of a Bluetooth scale. Is there a function to convert this list of ints to a Double?

I tried to find some background on float representations by reading the IEEE 754 standard. There is the dart library typed\_data but I am new to dart and have no experience with this lib.

Example: 

I have this List: [191, 100, 29, 173] which is coming from a bluetooth controller as a IEEE754 representation for a float value. 
Now i believe i have to convert each int to hex and concat these values: `bf 64 1d ad`

Next thing need to do is convert this to double, but i cannot find a function to convert hex to double. Only `int.parse("0xbf641dad")`.

Answer: 
Had this same issue.

I think you mean how do you make the four bytes into a float32 ?
I needed to do the same thing.

you will want to do something like this:

first take the List value as a byte buffer, then take the byte data, then you can use the getFloat32 function.

```
ByteBuffer buffer = new Int8List.fromList(value_in).buffer;
ByteData byteData = new ByteData.view(buffer);
result = byteData.getFloat32(0);

```

Just be a little aware that the order of bytes from the Bluetooth may be back to front, as the convention varys.

Also you will need the typed\_data library:

```
import 'dart:typed_data'; //for data formatting

```

I'm trying to go in the other direction now . . . for the obvious reason.
I used dart:typed\_data for this:

```
import 'dart:typed_data';

List<int> intList = [191, 100, 29, 173];
double asFloat = ByteData.view(Uint8List.fromList(List.from(intList)).buffer).getFloat32(0, Endian.little);

```

Library reference: <https://api.dart.dev/be/136883/dart-typed_data/dart-typed_data-library.html>