copyWith method
ChartOrder
copyWith(
{ - String? id,
- String? symbol,
- OrderSide? side,
- OrderType? type,
- double? price,
- double? quantity,
- double? takeProfitPrice()?,
- double? stopLossPrice()?,
- String? customLabel,
- OrderStatus? status,
- Map<String, dynamic>? metadata,
})
Implementation
ChartOrder copyWith({
String? id,
String? symbol,
OrderSide? side,
OrderType? type,
double? price,
double? quantity,
double? Function()? takeProfitPrice,
double? Function()? stopLossPrice,
String? customLabel,
OrderStatus? status,
Map<String, dynamic>? metadata,
}) {
return ChartOrder(
id: id ?? this.id,
symbol: symbol ?? this.symbol,
side: side ?? this.side,
type: type ?? this.type,
price: price ?? this.price,
quantity: quantity ?? this.quantity,
takeProfitPrice: takeProfitPrice != null
? takeProfitPrice()
: this.takeProfitPrice,
stopLossPrice: stopLossPrice != null
? stopLossPrice()
: this.stopLossPrice,
customLabel: customLabel ?? this.customLabel,
status: status ?? this.status,
metadata: metadata ?? this.metadata,
);
}