toJSONArray static method
Map a list of data samples to a JSON formatted array.
Map a list of data
samples to a JSON formatted array. This is
particularly useful to store data
to database.
Implementation
static List<Map<String, dynamic>> toJSONArray(List<SensorValue> data) =>
List.generate(data.length, (index) => data[index].toJSON());