-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
951 additions
and
395 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
class Address { | ||
String recipient; | ||
String addressId; | ||
String city; | ||
String contact; | ||
String country; | ||
String isPrimary; | ||
String locality; | ||
String state; | ||
String userId; | ||
String zip; | ||
|
||
Address( | ||
{this.recipient, | ||
this.addressId, | ||
this.city, | ||
this.contact, | ||
this.country, | ||
this.isPrimary, | ||
this.locality, | ||
this.state, | ||
this.userId, | ||
this.zip}); | ||
|
||
factory Address.fromJson(Map<String, dynamic> json) { | ||
return Address( | ||
recipient: json['recipent'], | ||
addressId: json['address_id'], | ||
city: json['city'], | ||
contact: json['contact'], | ||
country: json['country'], | ||
isPrimary: json['is_primary'], | ||
locality: json['locality'], | ||
state: json['state'], | ||
userId: json['user_id'], | ||
zip: json['zip'], | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
data['recipent'] = this.recipient; | ||
data['address_id'] = this.addressId; | ||
data['city'] = this.city; | ||
data['contact'] = this.contact; | ||
data['country'] = this.country; | ||
data['is_primary'] = this.isPrimary; | ||
data['locality'] = this.locality; | ||
data['state'] = this.state; | ||
data['user_id'] = this.userId; | ||
data['zip'] = this.zip; | ||
return data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,91 @@ | ||
class cart_list { | ||
List<Cart> cart; | ||
int sum; | ||
class CartDataModel { | ||
List<Cart> cart; | ||
int sum; | ||
|
||
cart_list({this.cart, this.sum}); | ||
CartDataModel({this.cart, this.sum}); | ||
|
||
factory cart_list.fromJson(Map<String, dynamic> json) { | ||
return cart_list( | ||
cart: json['cart'] != null ? (json['cart'] as List).map((i) => Cart.fromJson(i)).toList() : null, | ||
sum: json['sum'], | ||
); | ||
} | ||
factory CartDataModel.fromJson(Map<String, dynamic> json) { | ||
return CartDataModel( | ||
cart: json['cart'] != null | ||
? (json['cart'] as List).map((i) => Cart.fromJson(i)).toList() | ||
: null, | ||
sum: json['sum'], | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
data['sum'] = this.sum; | ||
if (this.cart != null) { | ||
data['cart'] = this.cart.map((v) => v.toJson()).toList(); | ||
} | ||
return data; | ||
Map<String, dynamic> toJson() { | ||
final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
data['sum'] = this.sum; | ||
if (this.cart != null) { | ||
data['cart'] = this.cart.map((v) => v.toJson()).toList(); | ||
} | ||
return data; | ||
} | ||
} | ||
|
||
class Cart { | ||
String cart_id; | ||
String category; | ||
String date; | ||
String description; | ||
String id; | ||
String image; | ||
String name; | ||
String price; | ||
String product_id; | ||
String quantity; | ||
String quantity_ordered; | ||
String unit; | ||
String user_id; | ||
String cartId; | ||
String category; | ||
String date; | ||
String description; | ||
String id; | ||
String image; | ||
String name; | ||
String price; | ||
String productId; | ||
String quantity; | ||
String quantityOrdered; | ||
String unit; | ||
String userId; | ||
|
||
Cart({this.cart_id, this.category, this.date, this.description, this.id, this.image, this.name, this.price, this.product_id, this.quantity, this.quantity_ordered, this.unit, this.user_id}); | ||
Cart( | ||
{this.cartId, | ||
this.category, | ||
this.date, | ||
this.description, | ||
this.id, | ||
this.image, | ||
this.name, | ||
this.price, | ||
this.productId, | ||
this.quantity, | ||
this.quantityOrdered, | ||
this.unit, | ||
this.userId}); | ||
|
||
factory Cart.fromJson(Map<String, dynamic> json) { | ||
return Cart( | ||
cart_id: json['cart_id'], | ||
category: json['category'], | ||
date: json['date'], | ||
description: json['description'], | ||
id: json['id'], | ||
image: json['image'], | ||
name: json['name'], | ||
price: json['price'], | ||
product_id: json['product_id'], | ||
quantity: json['quantity'], | ||
quantity_ordered: json['quantity_ordered'], | ||
unit: json['unit'], | ||
user_id: json['user_id'], | ||
); | ||
} | ||
factory Cart.fromJson(Map<String, dynamic> json) { | ||
return Cart( | ||
cartId: json['cart_id'], | ||
category: json['category'], | ||
date: json['date'], | ||
description: json['description'], | ||
id: json['id'], | ||
image: json['image'], | ||
name: json['name'], | ||
price: json['price'], | ||
productId: json['product_id'], | ||
quantity: json['quantity'], | ||
quantityOrdered: json['quantity_ordered'], | ||
unit: json['unit'], | ||
userId: json['user_id'], | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
data['cart_id'] = this.cart_id; | ||
data['category'] = this.category; | ||
data['date'] = this.date; | ||
data['description'] = this.description; | ||
data['id'] = this.id; | ||
data['image'] = this.image; | ||
data['name'] = this.name; | ||
data['price'] = this.price; | ||
data['product_id'] = this.product_id; | ||
data['quantity'] = this.quantity; | ||
data['quantity_ordered'] = this.quantity_ordered; | ||
data['unit'] = this.unit; | ||
data['user_id'] = this.user_id; | ||
return data; | ||
} | ||
} | ||
Map<String, dynamic> toJson() { | ||
final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
data['cart_id'] = this.cartId; | ||
data['category'] = this.category; | ||
data['date'] = this.date; | ||
data['description'] = this.description; | ||
data['id'] = this.id; | ||
data['image'] = this.image; | ||
data['name'] = this.name; | ||
data['price'] = this.price; | ||
data['product_id'] = this.productId; | ||
data['quantity'] = this.quantity; | ||
data['quantity_ordered'] = this.quantityOrdered; | ||
data['unit'] = this.unit; | ||
data['user_id'] = this.userId; | ||
return data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.