copyWith method

SortOrderCollection<T> copyWith({
  1. String? activeOrderId,
})

Creates a copy of this collection with updated active order.

Implementation

SortOrderCollection<T> copyWith({String? activeOrderId}) {
  final copy = SortOrderCollection<T>(
    orders: orders,
    defaultOrderId: _defaultOrderId,
  );
  copy._activeOrderId = activeOrderId ?? _activeOrderId;
  return copy;
}