giftItems property

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

Shorthand property to get only the gift items

Implementation

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