-
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.
Merge pull request #5 from Chinmay-KB/development
v0.2.0+2 Commit
- Loading branch information
Showing
66 changed files
with
3,254 additions
and
563 deletions.
There are no files selected for viewing
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
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 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 +1 @@ | ||
enum ViewState { Idle, Busy } | ||
enum ViewState { Idle, Busy, Intermediate } |
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,44 @@ | ||
class Address { | ||
String recipent; | ||
String address_id; | ||
String city; | ||
String contact; | ||
String country; | ||
String is_primary; | ||
String locality; | ||
String state; | ||
String user_id; | ||
String zip; | ||
|
||
Address({this.recipent, this.address_id, this.city, this.contact, this.country, this.is_primary, this.locality, this.state, this.user_id, this.zip}); | ||
|
||
factory Address.fromJson(Map<String, dynamic> json) { | ||
return Address( | ||
recipent: json['recipent'], | ||
address_id: json['address_id'], | ||
city: json['city'], | ||
contact: json['contact'], | ||
country: json['country'], | ||
is_primary: json['is_primary'], | ||
locality: json['locality'], | ||
state: json['state'], | ||
user_id: json['user_id'], | ||
zip: json['zip'], | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
data['recipent'] = this.recipent; | ||
data['address_id'] = this.address_id; | ||
data['city'] = this.city; | ||
data['contact'] = this.contact; | ||
data['country'] = this.country; | ||
data['is_primary'] = this.is_primary; | ||
data['locality'] = this.locality; | ||
data['state'] = this.state; | ||
data['user_id'] = this.user_id; | ||
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'package:gogrocy/core/models/Detail.dart'; | ||
|
||
class Bill { | ||
String bill_id; | ||
List<Detail> details; | ||
|
||
Bill({this.bill_id, this.details}); | ||
|
||
factory Bill.fromJson(Map<String, dynamic> json) { | ||
return Bill( | ||
bill_id: json['bill_id'], | ||
details: json['details'] != null ? (json['details'] as List).map((i) => Detail.fromJson(i)).toList() : null, | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
data['bill_id'] = this.bill_id; | ||
if (this.details != null) { | ||
data['details'] = this.details.map((v) => v.toJson()).toList(); | ||
} | ||
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
class Detail { | ||
String bill_id; | ||
String image; | ||
String name; | ||
String order_date; | ||
String order_id; | ||
String order_qty; | ||
String payment_stat; | ||
String price; | ||
String product_id; | ||
String seller_name; | ||
String seller_number; | ||
String status; | ||
|
||
Detail({this.bill_id, this.image, this.name, this.order_date, this.order_id, this.order_qty, this.payment_stat, this.price, this.product_id, this.seller_name, this.seller_number, this.status}); | ||
|
||
factory Detail.fromJson(Map<String, dynamic> json) { | ||
return Detail( | ||
bill_id: json['bill_id'], | ||
image: json['image'], | ||
name: json['name'], | ||
order_date: json['order_date'], | ||
order_id: json['order_id'], | ||
order_qty: json['order_qty'], | ||
payment_stat: json['payment_stat'], | ||
price: json['price'], | ||
product_id: json['product_id'], | ||
seller_name: json['seller_name'], | ||
seller_number: json['seller_number'], | ||
status: json['status'], | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
data['bill_id'] = this.bill_id; | ||
data['image'] = this.image; | ||
data['name'] = this.name; | ||
data['order_date'] = this.order_date; | ||
data['order_id'] = this.order_id; | ||
data['order_qty'] = this.order_qty; | ||
data['payment_stat'] = this.payment_stat; | ||
data['price'] = this.price; | ||
data['product_id'] = this.product_id; | ||
data['seller_name'] = this.seller_name; | ||
data['seller_number'] = this.seller_number; | ||
data['status'] = this.status; | ||
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'package:gogrocy/core/models/Result.dart'; | ||
|
||
class Orders { | ||
bool empty; | ||
Result result; | ||
|
||
Orders({this.empty, this.result}); | ||
|
||
factory Orders.fromJson(Map<String, dynamic> json) { | ||
return Orders( | ||
empty: json['empty'], | ||
result: json['result'] != null ? Result.fromJson(json['result']) : null, | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
data['empty'] = this.empty; | ||
if (this.result != null) { | ||
data['result'] = this.result.toJson(); | ||
} | ||
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import 'package:gogrocy/core/models/Address.dart'; | ||
import 'package:gogrocy/core/models/Bill.dart'; | ||
|
||
class Result { | ||
List<Address> address; | ||
List<Bill> bills; | ||
|
||
Result({this.address, this.bills}); | ||
|
||
factory Result.fromJson(Map<String, dynamic> json) { | ||
return Result( | ||
address: json['address'] != null ? (json['address'] as List).map((i) => Address.fromJson(i)).toList() : null, | ||
bills: json['bills'] != null ? (json['bills'] as List).map((i) => Bill.fromJson(i)).toList() : null, | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
if (this.address != null) { | ||
data['address'] = this.address.map((v) => v.toJson()).toList(); | ||
} | ||
if (this.bills != null) { | ||
data['bills'] = this.bills.map((v) => v.toJson()).toList(); | ||
} | ||
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
class CartEdit { | ||
String message; | ||
bool success; | ||
|
||
CartEdit({this.message, this.success}); | ||
|
||
factory CartEdit.fromJson(Map<String, dynamic> json) { | ||
return CartEdit( | ||
message: json['message'], | ||
success: json['success'], | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
data['message'] = this.message; | ||
data['success'] = this.success; | ||
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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
class cart_list { | ||
List<Cart> cart; | ||
int sum; | ||
|
||
cart_list({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'], | ||
); | ||
} | ||
|
||
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; | ||
|
||
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}); | ||
|
||
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'], | ||
); | ||
} | ||
|
||
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; | ||
} | ||
} |
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,6 @@ | ||
class SignUpArguments{ | ||
String mobile; | ||
String countryCode; | ||
|
||
SignUpArguments(this.mobile, this.countryCode); | ||
} |
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,57 @@ | ||
// To parse this JSON data, do | ||
// | ||
// final signUpModel = signUpModelFromJson(jsonString); | ||
|
||
import 'dart:convert'; | ||
|
||
SignUpModel signUpModelFromJson(String str) => SignUpModel.fromJson(json.decode(str)); | ||
|
||
String signUpModelToJson(SignUpModel data) => json.encode(data.toJson()); | ||
|
||
class SignUpModel { | ||
bool success; | ||
String msg; | ||
Error error; | ||
|
||
SignUpModel({ | ||
this.success, | ||
this.msg, | ||
this.error, | ||
}); | ||
|
||
factory SignUpModel.fromJson(Map<String, dynamic> json) => SignUpModel( | ||
success: json["success"] == null ? null : json["success"], | ||
msg: json["msg"] == null ? null : json["msg"], | ||
error: json["error"] == null ? null : Error.fromJson(json["error"]), | ||
); | ||
|
||
Map<String, dynamic> toJson() => { | ||
"success": success == null ? null : success, | ||
"msg": msg == null ? null : msg, | ||
"error": error == null ? null : error.toJson(), | ||
}; | ||
} | ||
|
||
class Error { | ||
String mobile; | ||
String password; | ||
String cPassword; | ||
|
||
Error({ | ||
this.mobile, | ||
this.password, | ||
this.cPassword, | ||
}); | ||
|
||
factory Error.fromJson(Map<String, dynamic> json) => Error( | ||
mobile: json["mobile"] == null ? null : json["mobile"], | ||
password: json["password"] == null ? null : json["password"], | ||
cPassword: json["cpassword"] == null ? null : json["cpassword"], | ||
); | ||
|
||
Map<String, dynamic> toJson() => { | ||
"mobile": mobile == null ? null : mobile, | ||
"password": password == null ? null : password, | ||
"cpassword": cPassword == null ? null : cPassword, | ||
}; | ||
} |
Oops, something went wrong.