From f749dbaf0e401a52a5358fea9dde6b2b2766fb5f Mon Sep 17 00:00:00 2001 From: MohammadTaha Basiri Date: Mon, 15 Apr 2024 22:30:41 +0330 Subject: [PATCH] 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 --- lib/models/user.dart | 4 ++-- lib/views/profile/edit_profile/edit_profile.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/models/user.dart b/lib/models/user.dart index 92011db..021903d 100644 --- a/lib/models/user.dart +++ b/lib/models/user.dart @@ -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, ); } } diff --git a/lib/views/profile/edit_profile/edit_profile.dart b/lib/views/profile/edit_profile/edit_profile.dart index 65ae45d..6117aac 100644 --- a/lib/views/profile/edit_profile/edit_profile.dart +++ b/lib/views/profile/edit_profile/edit_profile.dart @@ -147,7 +147,7 @@ class _EditProfileState extends State { Positioned( left: 20, right: 20, - bottom: MediaQuery.of(context).viewInsets.bottom + 20, + bottom: 20, child: DidvanButton( key: UniqueKey(), title: 'ذخیره تغییرات',