toJson method
Implementation
Map<String, Object?> toJson() => {
'glintId': glintId,
'label': label,
'inspectorId': inspectorId,
if (locationId != null) 'locationId': locationId,
if (textPreview != null) 'textPreview': textPreview,
if (createdByLocalProject) 'createdByLocalProject': true,
if (stateful) 'stateful': true,
if (creationLocation != null) 'creationLocation': creationLocation!.toJson(),
if (children.isNotEmpty) 'children': children.map((c) => c.toJson()).toList(),
};