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:
parent
bebdd280fd
commit
f749dbaf0e
|
|
@ -43,11 +43,11 @@ class User {
|
||||||
}) {
|
}) {
|
||||||
return User(
|
return User(
|
||||||
id: id ?? this.id,
|
id: id ?? this.id,
|
||||||
username: this.username,
|
username: username ?? this.username,
|
||||||
phoneNumber: phoneNumber ?? this.phoneNumber,
|
phoneNumber: phoneNumber ?? this.phoneNumber,
|
||||||
photo: photo,
|
photo: photo,
|
||||||
fullName: fullName ?? this.fullName,
|
fullName: fullName ?? this.fullName,
|
||||||
email: email,
|
email: email ?? this.email,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ class _EditProfileState extends State<EditProfile> {
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 20,
|
left: 20,
|
||||||
right: 20,
|
right: 20,
|
||||||
bottom: MediaQuery.of(context).viewInsets.bottom + 20,
|
bottom: 20,
|
||||||
child: DidvanButton(
|
child: DidvanButton(
|
||||||
key: UniqueKey(),
|
key: UniqueKey(),
|
||||||
title: 'ذخیره تغییرات',
|
title: 'ذخیره تغییرات',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue