Product class
Product class
- Annotations
-
- @freezed
Constructors
-
Product({@Default('') String id, @Default('') @JsonKey(name: 'user_id') String createdById, @Default('') @JsonKey(name: 'assigned_user_id') String assignedToId, @Default(0) @JsonKey(name: 'created_at') int createdAt, @Default(0) @JsonKey(name: 'updated_at') int updatedAt, @Default(0) @JsonKey(name: 'archived_at') int archivedAt, @Default(false) @JsonKey(name: 'is_deleted') bool isDeleted, @Default('') @JsonKey(name: 'custom_value1') String customValue1, @Default('') @JsonKey(name: 'custom_value2') String customValue2, @Default('') @JsonKey(name: 'custom_value3') String customValue3, @Default('') @JsonKey(name: 'custom_value4') String customValue4, @Default('') @JsonKey(name: 'product_key') String productKey, @Default('') String notes, @Default(0) double cost, @Default(0) double price, @Default(0) double quantity, @Default('') @JsonKey(name: 'tax_name1') String taxName1, @Default(0) @JsonKey(name: 'tax_rate1') double taxRate1, @Default('') @JsonKey(name: 'tax_name2') String taxName2, @Default(0) @JsonKey(name: 'tax_rate2') double taxRate2, @Default('') @JsonKey(name: 'tax_name3') String taxName3, @Default(0) @JsonKey(name: 'tax_rate3') double taxRate3, @Default(<Document>[]) List<
Document> documents}) -
Product factory constructor
constfactory
-
Product.fromJson(Map<
String, dynamic> json) -
Create a Product from JSON
factory
Properties
- archivedAt → int
-
no setterinherited
- assignedToId → String
-
no setterinherited
-
copyWith
→ $ProductCopyWith<
Product> -
no setterinherited
- cost → double
-
no setterinherited
- createdAt → int
-
no setterinherited
- createdById → String
-
no setterinherited
- customValue1 → String
-
no setterinherited
- customValue2 → String
-
no setterinherited
- customValue3 → String
-
no setterinherited
- customValue4 → String
-
no setterinherited
-
documents
→ List<
Document> -
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
no setterinherited
- isDeleted → bool
-
no setterinherited
- notes → String
-
no setterinherited
- price → double
-
no setterinherited
- productKey → String
-
no setterinherited
- quantity → double
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- taxName1 → String
-
no setterinherited
- taxName2 → String
-
no setterinherited
- taxName3 → String
-
no setterinherited
- taxRate1 → double
-
no setterinherited
- taxRate2 → double
-
no setterinherited
- taxRate3 → double
-
no setterinherited
- toLineItem → InvoiceLineItem
-
Convert a product to an invoice line item
no setter
- updatedAt → int
-
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