toJson method
Zurück in die Form, aus der ArticleGroup.fromJson wieder liest – für Zwischenspeicher, nicht fürs Backend.
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'color': color,
'symbol': symbol,
'sort': sort,
'vatRate': vatRate,
'addOns': addOns,
'deposits': deposits == null ? null : [for (final d in deposits!) d.toJson()],
};