mobileapplicationPassvault/lib/modelclasses/sso_validation_model.dart

53 lines
1.1 KiB
Dart
Raw Normal View History

2024-04-12 05:23:32 +00:00
import 'dart:convert';
Ssovalidationmodel ssovalidationmodelFromJson(String str) =>
Ssovalidationmodel.fromJson(json.decode(str));
String ssovalidationmodelToJson(Ssovalidationmodel data) =>
json.encode(data.toJson());
class Ssovalidationmodel {
Success success;
Ssovalidationmodel({
required this.success,
});
factory Ssovalidationmodel.fromJson(Map<String, dynamic> json) =>
Ssovalidationmodel(
success: Success.fromJson(json["success"]),
);
Map<String, dynamic> toJson() => {
"success": success.toJson(),
};
}
class Success {
String token;
int id;
String name;
String email;
Success({
required this.token,
required this.id,
required this.name,
required this.email,
});
factory Success.fromJson(Map<String, dynamic> json) => Success(
token: json["token"],
id: json["id"],
name: json["name"],
email: json["email"],
);
Map<String, dynamic> toJson() => {
"token": token,
"id": id,
"name": name,
"email": email,
};
}