2) single Place order api integration done 3) Refresh inidicator added 4)Caps Functionality added
52 lines
1.1 KiB
Dart
52 lines
1.1 KiB
Dart
class PlaceOrderItem1 {
|
|
final String sku;
|
|
String? id;
|
|
List<String>? image;
|
|
final String name;
|
|
final String categoryName;
|
|
final String brandName;
|
|
final double price;
|
|
final int quantity;
|
|
|
|
PlaceOrderItem1({
|
|
required this.sku,
|
|
this.id,
|
|
this.image,
|
|
required this.name,
|
|
required this.categoryName,
|
|
required this.brandName,
|
|
required this.price,
|
|
required this.quantity,
|
|
});
|
|
|
|
factory PlaceOrderItem1.fromJson(Map<String, dynamic> json) {
|
|
return PlaceOrderItem1(
|
|
id: json['id'],
|
|
sku: json['SKU'],
|
|
name: json['name'],
|
|
categoryName: json['categoryName'],
|
|
brandName: json['brandName'],
|
|
price: json['price'].toDouble(),
|
|
quantity: json['quantity'], image: null,
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'SKU': sku,
|
|
'name': name,
|
|
'categoryName': categoryName,
|
|
'brandName': brandName,
|
|
'price': price,
|
|
'quantity': quantity,
|
|
};
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'OrderItem(sku: $sku, name: $name, categoryName: $categoryName, '
|
|
'brandName: $brandName, price: $price, quantity: $quantity)';
|
|
}
|
|
}
|
|
|