mycart
This commit is contained in:
49
lib/src/data/OTPResponseModel copy.dart
Normal file
49
lib/src/data/OTPResponseModel copy.dart
Normal file
@@ -0,0 +1,49 @@
|
||||
// To parse this JSON data, do
|
||||
//
|
||||
// final otpResponseModel = otpResponseModelFromJson(jsonString);
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
OtpResponseModel otpResponseModelFromJson(String str) =>
|
||||
OtpResponseModel.fromJson(json.decode(str));
|
||||
|
||||
String otpResponseModelToJson(OtpResponseModel data) =>
|
||||
json.encode(data.toJson());
|
||||
|
||||
class OtpResponseModel
|
||||
{
|
||||
String? message;
|
||||
Data? data;
|
||||
|
||||
OtpResponseModel({
|
||||
this.message,
|
||||
this.data,
|
||||
});
|
||||
|
||||
factory OtpResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||
OtpResponseModel(
|
||||
message: json["message"],
|
||||
data: Data.fromJson(json["data"]),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"message": message,
|
||||
"data": data!.toJson(),
|
||||
};
|
||||
}
|
||||
|
||||
class Data {
|
||||
String? otp;
|
||||
|
||||
Data({
|
||||
this.otp,
|
||||
});
|
||||
|
||||
factory Data.fromJson(Map<String, dynamic> json) => Data(
|
||||
otp: json["otp"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"otp": otp,
|
||||
};
|
||||
}
|
||||
49
lib/src/data/OTPResponseModel.dart
Normal file
49
lib/src/data/OTPResponseModel.dart
Normal file
@@ -0,0 +1,49 @@
|
||||
// To parse this JSON data, do
|
||||
//
|
||||
// final otpResponseModel = otpResponseModelFromJson(jsonString);
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
OtpResponseModel otpResponseModelFromJson(String str) =>
|
||||
OtpResponseModel.fromJson(json.decode(str));
|
||||
|
||||
String otpResponseModelToJson(OtpResponseModel data) =>
|
||||
json.encode(data.toJson());
|
||||
|
||||
class OtpResponseModel
|
||||
{
|
||||
String? message;
|
||||
Data? data;
|
||||
|
||||
OtpResponseModel({
|
||||
this.message,
|
||||
this.data,
|
||||
});
|
||||
|
||||
factory OtpResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||
OtpResponseModel(
|
||||
message: json["message"],
|
||||
data: Data.fromJson(json["data"]),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"message": message,
|
||||
"data": data!.toJson(),
|
||||
};
|
||||
}
|
||||
|
||||
class Data {
|
||||
String? otp;
|
||||
|
||||
Data({
|
||||
this.otp,
|
||||
});
|
||||
|
||||
factory Data.fromJson(Map<String, dynamic> json) => Data(
|
||||
otp: json["otp"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"otp": otp,
|
||||
};
|
||||
}
|
||||
13
lib/src/data/product_model.dart
Normal file
13
lib/src/data/product_model.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class ProductModel {
|
||||
String productImage;
|
||||
String productName;
|
||||
String quantity;
|
||||
String amount;
|
||||
|
||||
ProductModel(
|
||||
this.productImage,
|
||||
this.productName,
|
||||
this.quantity,
|
||||
this.amount,
|
||||
);
|
||||
}
|
||||
78
lib/src/data/vendor_otpModel.dart
Normal file
78
lib/src/data/vendor_otpModel.dart
Normal file
@@ -0,0 +1,78 @@
|
||||
// To parse this JSON data, do
|
||||
//
|
||||
// final vendorOtpModel = vendorOtpModelFromJson(jsonString);
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
VendorOtpModel vendorOtpModelFromJson(String str) =>
|
||||
VendorOtpModel.fromJson(json.decode(str));
|
||||
|
||||
String vendorOtpModelToJson(VendorOtpModel data) => json.encode(data.toJson());
|
||||
|
||||
class VendorOtpModel {
|
||||
String? message;
|
||||
Data? data;
|
||||
|
||||
VendorOtpModel({
|
||||
this.message,
|
||||
this.data,
|
||||
});
|
||||
|
||||
factory VendorOtpModel.fromJson(Map<String, dynamic> json) => VendorOtpModel(
|
||||
message: json["message"],
|
||||
data: Data.fromJson(json["data"]),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"message": message,
|
||||
"data": data!.toJson(),
|
||||
};
|
||||
}
|
||||
|
||||
class Data {
|
||||
User? user;
|
||||
String? accessToken;
|
||||
String? refreshToken;
|
||||
|
||||
Data({
|
||||
this.user,
|
||||
this.accessToken,
|
||||
this.refreshToken,
|
||||
});
|
||||
|
||||
factory Data.fromJson(Map<String, dynamic> json) => Data(
|
||||
user: User.fromJson(json["user"]),
|
||||
accessToken: json["access_token"],
|
||||
refreshToken: json["refresh_token"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"user": user!.toJson(),
|
||||
"access_token": accessToken,
|
||||
"refresh_token": refreshToken,
|
||||
};
|
||||
}
|
||||
|
||||
class User {
|
||||
String? id;
|
||||
String? phone;
|
||||
bool? isPhoneVerified;
|
||||
|
||||
User({
|
||||
this.id,
|
||||
this.phone,
|
||||
this.isPhoneVerified,
|
||||
});
|
||||
|
||||
factory User.fromJson(Map<String, dynamic> json) => User(
|
||||
id: json["id"],
|
||||
phone: json["phone"],
|
||||
isPhoneVerified: json["isPhoneVerified"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id": id,
|
||||
"phone": phone,
|
||||
"isPhoneVerified": isPhoneVerified,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user