From db3cb202551e05b6a54d57aa1fe6bf767dd98b3a Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sun, 5 Jan 2025 21:02:39 +0100 Subject: [PATCH] add check condition isnotempty --- covas_mobile/lib/pages/EditProfile.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/covas_mobile/lib/pages/EditProfile.dart b/covas_mobile/lib/pages/EditProfile.dart index 2770ad2..2f72190 100644 --- a/covas_mobile/lib/pages/EditProfile.dart +++ b/covas_mobile/lib/pages/EditProfile.dart @@ -96,9 +96,11 @@ class _EditProfileState extends State var confirmedPassword = inputPasswordConfirmed.text; var birth = DateTime.parse(formatDate(inputBirth.text)); - if (password != confirmedPassword) { - showAlertDialog(context, "Erreur", "Mot de passe different"); - return; + if ((password.isNotEmpty) && (confirmedPassword.isNotEmpty)) { + if (password != confirmedPassword) { + showAlertDialog(context, "Erreur", "Mot de passe different"); + return; + } } var urlPut = Uri.parse("${globals.api}/users/me");