toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
'name': name,
'type': type,
if (data != null) 'data': data,
if (createdAt != null) 'createdAt': createdAt?.toIso8601String(),
if (updatedAt != null) 'updatedAt': updatedAt?.toIso8601String(),
if (isResolvable != null) 'isResolvable': isResolvable,
if (isGlobal != null) 'isGlobal': isGlobal,
if (isPartialData != null) 'isPartialData': isPartialData,
};
}