toJson method
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'symbol': symbol,
'price': price,
'note': note,
'condition': condition.name,
'createdAt': createdAt.toIso8601String(),
'isTriggered': isTriggered,
'isActive': isActive,
if (triggeredAt != null) 'triggeredAt': triggeredAt!.toIso8601String(),
};