Barcode Printing Utility Done
This commit is contained in:
@@ -9,6 +9,7 @@ class Product {
|
||||
final String? sku;
|
||||
final String? barcode;
|
||||
final String? description;
|
||||
final double? mrp;
|
||||
final double? sellingPrice;
|
||||
final double? gstRate;
|
||||
final String? dimensions;
|
||||
@@ -60,6 +61,7 @@ class Product {
|
||||
this.sku,
|
||||
this.barcode,
|
||||
this.description,
|
||||
this.mrp,
|
||||
this.sellingPrice,
|
||||
this.gstRate,
|
||||
this.dimensions,
|
||||
@@ -116,7 +118,12 @@ class Product {
|
||||
sku: json['sku'],
|
||||
barcode: json['barcode'],
|
||||
description: json['description'],
|
||||
sellingPrice: (json['sellingPrice'] ?? json['selling_price'] as num?)?.toDouble(),
|
||||
mrp: json['mrp'] != null
|
||||
? double.tryParse(json['mrp'].toString())
|
||||
: (json['mrp_price'] != null ? double.tryParse(json['mrp_price'].toString()) : null),
|
||||
sellingPrice: json['sellingPrice'] != null
|
||||
? double.tryParse(json['sellingPrice'].toString())
|
||||
: (json['selling_price'] != null ? double.tryParse(json['selling_price'].toString()) : null),
|
||||
gstRate: (json['gstRate'] ?? json['gst_rate'] as num?)?.toDouble(),
|
||||
dimensions: json['dimensions'],
|
||||
color: json['color'],
|
||||
@@ -172,6 +179,7 @@ class Product {
|
||||
'sku': sku,
|
||||
'barcode': barcode,
|
||||
'description': description,
|
||||
'mrp': mrp,
|
||||
'sellingPrice': sellingPrice,
|
||||
'gstRate': gstRate,
|
||||
'dimensions': dimensions,
|
||||
|
||||
Reference in New Issue
Block a user