after rediense

This commit is contained in:
Felipe
2024-02-26 16:32:31 -05:00
parent a1e367bdf3
commit 11d9ee6d35
11 changed files with 256 additions and 223 deletions
@@ -7,14 +7,18 @@ class MyUserEntity extends Equatable {
final String? name;
final String? nickname;
final String? picture;
final String? birthday;
final String? gender;
const MyUserEntity({
required this.id,
this.email,
this.phone,
this.name,
this.nickname,
this.picture,
required this.email,
required this.phone,
required this.name,
required this.nickname,
required this.picture,
required this.birthday,
required this.gender,
});
Map<String, Object?> toDocument() {
@@ -25,6 +29,8 @@ class MyUserEntity extends Equatable {
'name': name,
'nickname': name?.trim().toLowerCase(),
'picture': picture,
'birthday': birthday,
'gender': gender,
};
}
@@ -36,11 +42,14 @@ class MyUserEntity extends Equatable {
name: doc['name'] as String?,
nickname: doc['nickname'] as String?,
picture: doc['picture'] as String?,
birthday: doc['birthday'] as String?,
gender: doc['gender'] as String?,
);
}
@override
List<Object?> get props => [id, email, phone, name, nickname, picture];
List<Object?> get props =>
[id, email, phone, name, nickname, picture, birthday, gender];
@override
String toString() {
@@ -51,6 +60,8 @@ class MyUserEntity extends Equatable {
name: $name
nickname: $nickname
picture: $picture
birthday: $birthday
gender: $gender
}''';
}
}