I have a function that returns List But in my case I want to read and display float values. However, this function is a system function I can’t update it.
My question is how to convert List to List?
This is the code:
characteristic.value.listen((event) async {
var bleData = SetupModeResponse(data: event);
});
Event is by default a List. When I try to declare data as List; I got List cannot assigned to List.
I would be very thankful if you can help me.
4
Answers
you can use the
map
method on listlike that:
You can learn more about dart list mapping here map method
This should also work:
Yo can try this method and see if it works
Try the following code: