actually I want to convert a list of decimal to a list of hexadicimal. I tried .toRadixString(16) But I got : The method 'toRadixString' isn't defined for the type 'List'.. this is my code:
BehaviorSubject<List<int>> _value;
Stream<List<int>> get value => Rx.merge([
_value.stream,
_onValueChangedStream,
]);
List<int> get lastValue => _value.value ?? [];
Future<Null> write(List<int> value, {bool withoutResponse = false}) async {
final type = withoutResponse
? CharacteristicWriteType.withoutResponse
: CharacteristicWriteType.withResponse;
var request = protos.WriteCharacteristicRequest.create()
..remoteId = deviceId.toString()
..characteristicUuid = uuid.toString()
..serviceUuid = serviceUuid.toString()
..writeType =
protos.WriteCharacteristicRequest_WriteType.valueOf(type.index)!
..value = value.map((e) => e.toRadixString(16)).toList();
// Uint8List(4)..buffer.asInt32List()[0]=value;
//..value = value.toRadixString(16);
I would be very thankful if you can give me a solution for converting this list from decimal or int to hexadicimal.