fix: use correct json conversion on google map theme

This commit is contained in:
Joey Boerwinkel 2023-04-11 15:01:43 +02:00
parent cc986442e2
commit d2e2a80566

View file

@ -24,14 +24,7 @@ class GoogleTrackTraceMapTheme {
final List<GoogleMapThemeFeature> themes; final List<GoogleMapThemeFeature> themes;
String getJson() { String getJson() {
var sb = StringBuffer('['); return jsonEncode(themes.map((e) => e.toJson()).toList());
for (var property in themes) {
sb
..write(jsonEncode(property.toJson()))
..write(',');
}
sb.write(']');
return sb.toString();
} }
} }