just use the jsonEncode and toJson functions like you did with jsonDecode and fromJson
String serialize(List<MyModel> data) { final list = data.map((map) => map.toJson()).toList(); return jsonEncode(list); }