audioDevicesToJson function
Converts a list of AudioDevices to a JSON string.
Encodes a list of AudioDevices objects into a JSON string. This function can be used to encode data before sending it to an API or storing it locally.
data
: The list of AudioDevices objects to be encoded.
Returns a JSON string representation of the list.
Implementation
String audioDevicesToJson(List<AudioDevices> data) =>
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));