64 lines
1.5 KiB
Dart
64 lines
1.5 KiB
Dart
// To parse this JSON data, do
|
|
//
|
|
// final verificationResponse = verificationResponseFromJson(jsonString);
|
|
|
|
import 'dart:convert';
|
|
|
|
VerificationResponse verificationResponseFromJson(String str) =>
|
|
VerificationResponse.fromJson(json.decode(str));
|
|
|
|
String verificationResponseToJson(VerificationResponse data) =>
|
|
json.encode(data.toJson());
|
|
|
|
class VerificationResponse {
|
|
int? status;
|
|
String? message;
|
|
String? verification_code;
|
|
String? accessToken;
|
|
User? user;
|
|
|
|
VerificationResponse({
|
|
this.status,
|
|
this.message,
|
|
this.accessToken,
|
|
this.verification_code,
|
|
this.user,
|
|
});
|
|
|
|
factory VerificationResponse.fromJson(Map<String, dynamic> json) =>
|
|
VerificationResponse(
|
|
status: json["status"],
|
|
message: json["message"],
|
|
verification_code: json["verification_code"],
|
|
accessToken: json["access_token"],
|
|
user: json["user"] == null ? null : User.fromJson(json["user"]),
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"status": status,
|
|
"message": message,
|
|
"access_token": accessToken,
|
|
"user": user?.toJson(),
|
|
};
|
|
}
|
|
|
|
class User {
|
|
String? email;
|
|
String? userFullName;
|
|
|
|
User({
|
|
this.email,
|
|
this.userFullName,
|
|
});
|
|
|
|
factory User.fromJson(Map<String, dynamic> json) => User(
|
|
email: json["email"],
|
|
userFullName: json["user_full_name"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"email": email,
|
|
"user_full_name": userFullName,
|
|
};
|
|
}
|