A library that help you convert list of json to a csv formatted string.
dart pub add dev:json2csv_dartimport 'package:json2csv_dart/json2csv_dart.dart'; // call API or get json from file.
final List<Map<String, dynamic>> data = [
{...},
{...},
{...},
{...},
{...},
];
final csv = const CSVConvertor().convert(data);
// do with the output what you want.