Product class

Annotations
  • @HiveType.new(typeId: 3)

Constructors

Product({String? id, required String name, required String description, required double price, required ProductType type, required ListingType listingType, required String sellerId, String? location, DateTime? createdAt, List<String>? images, bool isAvailable = true})

Properties

box → BoxBase?
Get the box in which this object is stored. Returns null if object has not been added to a box yet.
no setterinherited
createdAt DateTime
getter/setter pair
description String
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String
final
images List<String>?
getter/setter pair
isAvailable bool
getter/setter pair
isInBox bool
Returns whether this object is currently stored in a box.
no setterinherited
key → dynamic
Get the key associated with this object. Returns null if object has not been added to a box yet.
no setterinherited
listingType ListingType
getter/setter pair
location String?
getter/setter pair
name String
getter/setter pair
price double
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sellerId String
getter/setter pair
type ProductType
getter/setter pair

Methods

delete() Future<void>
Deletes this object from the box it is stored in.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save() Future<void>
Persists this object.
inherited
toMap() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

empty() Product
fromMap(Map<String, dynamic> data) Product