Product class

Constructors

Product.new({required String id, required double price, String? name, bool? isAvailable, List<String> images = const ['madagascar', 'paris', 'newyork'], int? max = 0, Status? status = Status.activeFile, String? description, List<int> counts = const [1, 2, 3], DateTime? createdAt})
const
Product.fromMap(Map<String, dynamic> json)
factory

Properties

counts List<int>
final
createdAt DateTime?
final
description String?
final
hashCode int
The hash code for this object.
no setterinherited
id String
final
images List<String>
final
isAvailable bool?
final
max int?
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 setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status Status?
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

copyWith({String? id, double? price, String? name, bool? isAvailable, List<String>? images, int? max, Status? status, String? description, List<int>? counts, DateTime? createdAt}) Product
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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