toJson method
Implementation
Map<String, dynamic> toJson() => {
'idempotencyKey': idempotencyKey,
'name': name,
'attributes': [for (final m in attributes) m.toJson()],
'defaults': ?defaults?.toJson(),
'createMatrix': ?createMatrix,
if (variants != null) 'variants': [for (final v in variants!) v.toJson()],
};