ProductModel class
Constructors
-
ProductModel.new({required String id, required String name, required String description, required String category, required String brand, required String color, required bool isAvailable, required int quantity, required String imageUrl, required double price, required DateTime createdAt, required int inventoryCount, required double weight, required String dimensions, required List<
ReviewModel> reviews, required double rating, required int totalReviews}) -
const
-
ProductModel.fromJson(Map<
String, dynamic> json) -
factory
Properties
- brand → String
-
final
- category → String
-
final
- color → String
-
final
- createdAt → DateTime
-
final
- description → String
-
final
- dimensions → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
final
- imageUrl → String
-
final
- inventoryCount → int
-
final
- isAvailable → bool
-
final
- name → String
-
final
- price → double
-
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setteroverride
- quantity → int
-
final
- rating → double
-
final
-
reviews
→ List<
ReviewModel> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - totalReviews → int
-
final
- weight → double
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited