add check condition isnotempty

This commit is contained in:
Valentin CZERYBA 2025-01-05 21:02:39 +01:00
parent 83c65be610
commit db3cb20255

View File

@ -96,10 +96,12 @@ class _EditProfileState extends State<EditProfile>
var confirmedPassword = inputPasswordConfirmed.text;
var birth = DateTime.parse(formatDate(inputBirth.text));
if ((password.isNotEmpty) && (confirmedPassword.isNotEmpty)) {
if (password != confirmedPassword) {
showAlertDialog(context, "Erreur", "Mot de passe different");
return;
}
}
var urlPut = Uri.parse("${globals.api}/users/me");