ProductData class

Constructors

ProductData({required int id, required String name, required double price, required bool active, String? imagePath, required int categoryId, required double estimatedInputPrice, required double taxRate, String? description})
const
ProductData.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer})
factory

Properties

active bool
final
categoryId int
final
description String?
final
estimatedInputPrice double
final
hashCode int
The hash code for this object.
no setteroverride
id int
final
imagePath String?
final
name String
final
price double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
taxRate double
final

Methods

copyWith({int? id, String? name, double? price, bool? active, Value<String?> imagePath = const Value.absent(), int? categoryId, double? estimatedInputPrice, double? taxRate, Value<String?> description = const Value.absent()}) ProductData
copyWithCompanion(ProductCompanion data) ProductData
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toColumns(bool nullToAbsent) Map<String, Expression<Object>>
Converts this object into a map of column names to expressions to insert or update.
toCompanion(bool nullToAbsent) ProductCompanion
toJson({ValueSerializer? serializer}) Map<String, dynamic>
Converts this object into a representation that can be encoded with json. The serializer can be used to configure how individual values will be encoded. By default, DriftRuntimeOptions.defaultSerializer will be used. See ValueSerializer.defaults for details.
toJsonString({ValueSerializer? serializer}) String
Converts this object into a json representation. The serializer can be used to configure how individual values will be encoded. By default, DriftRuntimeOptions.defaultSerializer will be used. See ValueSerializer.defaults for details.
inherited
toString() String
A string representation of this object.
override

Operators

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