copyWith method

ChartAlert copyWith({
  1. String? id,
  2. String? symbol,
  3. double? price,
  4. String? note,
  5. AlertTriggerCondition? condition,
  6. DateTime? createdAt,
  7. bool? isTriggered,
  8. bool? isActive,
  9. DateTime? triggeredAt,
})

Implementation

ChartAlert copyWith({
  String? id,
  String? symbol,
  double? price,
  String? note,
  AlertTriggerCondition? condition,
  DateTime? createdAt,
  bool? isTriggered,
  bool? isActive,
  DateTime? triggeredAt,
}) {
  return ChartAlert(
    id: id ?? this.id,
    symbol: symbol ?? this.symbol,
    price: price ?? this.price,
    note: note ?? this.note,
    condition: condition ?? this.condition,
    createdAt: createdAt ?? this.createdAt,
    isTriggered: isTriggered ?? this.isTriggered,
    isActive: isActive ?? this.isActive,
    triggeredAt: triggeredAt ?? this.triggeredAt,
  );
}