CartModel class

Cart Model for managing cart data

Annotations
  • @freezed

Constructors

CartModel({required String productId, required String productName, List<String>? productImages, required List<ProductVariant> variants, @Default.new(1) int quantity, @Default.new(0.0) double discount, required String productDetails, Map<String, dynamic>? productMeta})
const
factory
CartModel.fromJson(Map<String, Object?> json)
factory

Properties

copyWith → $CartModelCopyWith<CartModel>
no setterinherited
discount → double
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
productDetails → String
no setterinherited
productId → String
no setterinherited
productImages → List<String>?
no setterinherited
productMeta → Map<String, dynamic>?
no setterinherited
productName → String
no setterinherited
quantity → int
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
variants → List<ProductVariant>
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited