updateOrderPrice method

void updateOrderPrice(
  1. String orderId,
  2. double newPrice
)

Updates the limit price of an existing order.

Implementation

void updateOrderPrice(String orderId, double newPrice) {
  final index = _orders.indexWhere((o) => o.id == orderId);
  if (index >= 0) {
    final updated = _orders[index].copyWith(price: newPrice);
    _orders[index] = updated;
    onOrderModified?.call(updated);
    notifyListeners();
  }
}