toJson method
Converts the collection to a JSON map.
The resulting map matches Figma's API format and can be used for serialization or API requests.
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'modes': modes.map((mode) => mode.toJson()).toList(),
'variableIds': variableIds,
'defaultModeId': defaultModeId,
};