promotionalItems property

List<CartItem> promotionalItems
@JsonKey(ignore: true)

Shorthand property to get only the promotional items

Implementation

@JsonKey(ignore: true)
List<CartItem> get promotionalItems {
  return this.allItems.where((i) => i.isPromotional).toList();
}