Update User model to allow null values in username, email, and phoneNumber; adjust EditProfile view accordingly

The User model has been updated to allow null values in the username, email, and phoneNumber fields. The corresponding constructor has been updated
This commit is contained in:
MohammadTaha Basiri 2024-04-15 22:30:41 +03:30
parent bebdd280fd
commit f749dbaf0e
2 changed files with 3 additions and 3 deletions

View File

@ -43,11 +43,11 @@ class User {
}) {
return User(
id: id ?? this.id,
username: this.username,
username: username ?? this.username,
phoneNumber: phoneNumber ?? this.phoneNumber,
photo: photo,
fullName: fullName ?? this.fullName,
email: email,
email: email ?? this.email,
);
}
}

View File

@ -147,7 +147,7 @@ class _EditProfileState extends State<EditProfile> {
Positioned(
left: 20,
right: 20,
bottom: MediaQuery.of(context).viewInsets.bottom + 20,
bottom: 20,
child: DidvanButton(
key: UniqueKey(),
title: 'ذخیره تغییرات',