removeLineItemById method
Removes the lineItem from the orderLines for given lineItemId of the order
Implementation
Order removeLineItemById(String lineItemId) {
if (_orderDetails.orderLines == null || _orderDetails.orderLines!.isEmpty) {
throw StokedError('orderLines shouldn\'t be empty');
}
_orderDetails.orderLines
?.removeWhere((element) => element.id == lineItemId);
return this;
}