User class

Constructors

User({required Map<String, dynamic> data, required String uid, required String name, required String email, required String phoneNumber, required String displayName, required String photoUrl, required String profileBackgroundImageUrl, required List<String> photoUrls, required String stateMessage, bool isDisabled = false, required int birthYear, required int birthMonth, required int birthDay, required int createdAt, required int order, bool isAdmin = false, bool isVerified = false, List<String>? blocks, required String gender, required int noOfLikes, required String idUrl, required int idUploadedAt, required String occupation, required String countryCode, required String siDo, required String siGunGu, required double latitude, required double longitude, required String geohash3, required String geohash4, required String geohash5, required String geohash6, required String geohash7, required String languageCode, required int ping})
User.fromJson(Map json, {String? uid})
factory
User.fromSnapshot(DataSnapshot snapshot)
factory
User.fromUid(String uid)
사용자 uid 로 부터, User 을 만들어, 빈 User 을 리턴한다.
factory

Properties

age String
no setter
birth String
no setter
birthDay int
getter/setter pair
birthMonth int
getter/setter pair
birthYear int
getter/setter pair
blocks List<String>?
getter/setter pair
countryCode String
The countryCode will be the basis of the nationality of the user.
getter/setter pair
createdAt int
getter/setter pair
data Map<String, dynamic>
data 는 사용자 정보 문서 node 의 전체 값을 가지고 있다. 그래서, 필요할 때, data'email' 과 같이, 필드를 직접 접근할 수 있다.
getter/setter pair
disabled bool
no setter
displayName String
사용자가 직접 입력하는 별명
getter/setter pair
email String
getter/setter pair
gender String
gender can be "M" or "F" or "".
getter/setter pair
geohash3 String
When the user's location was updated, geohash data is also updated.
getter/setter pair
geohash4 String
geohash4 is used for searching nearby users within 20k meters
getter/setter pair
geohash5 String
geohash5 is used for searching nearby users within 5k meters
getter/setter pair
geohash6 String
geohash6 is used for searching nearby users within 1k meters
getter/setter pair
geohash7 String
geohash7 is used for searching nearby users within 200 meters
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
idUploadedAt int
ID 카드(신분증) 업로드 후, 업로드 시간 저장
getter/setter pair
idUrl String
신분증 업로드한 url
getter/setter pair
isAdmin bool
getter/setter pair
isDisabled bool
사용자가 비활성화 되었는지 여부
getter/setter pair
isFemale bool
no setter
isMale bool
no setter
isVerified bool
getter/setter pair
languageCode String
getter/setter pair
latitude double
User's latitude and longitude
getter/setter pair
longitude double
getter/setter pair
name String
name 사용자의 본 명.
getter/setter pair
noOfLikes int
getter/setter pair
notVerified bool
no setter
occupation String
getter/setter pair
order int
getter/setter pair
phoneNumber String
getter/setter pair
photoRef → DatabaseReference
See README.md
no setter
photoUrl String
The primary photo URL of the user.
getter/setter pair
photoUrls List<String>
Extra photo URLs of the user. User can upload multiple photos of themselves.
getter/setter pair
ping int
ping is an int value that is used to update user document.
getter/setter pair
profileBackgroundImageUrl String
The background image URL of the user profile. This is used as the background image of the user profile.
getter/setter pair
ref → DatabaseReference
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
siDo String
getter/setter pair
siGunGu String
getter/setter pair
stateMessage String
getter/setter pair
uid String
final

Methods

blocked(String otherUserUid) bool
blockUser(String otherUserUid) Future
Block a user
deletePhotoUrl() Future<void>
Delete user data.
deleteVerification() Future<void>
신분증 업로드한 사진 URL 과 idUpdatedAt 을 삭제.
hasBlocked(String otherUserUid) bool
Alias of isBlocked
isBlocked(String otherUserUid) bool
Returns true if the user is blocked.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reload() Future<User>
Reload user data and apply it to this instance.
setUnverified() Future<void>
인증 취소
setVerificationIdUrl(String url) Future<User>
신분증 업로드
setVerified() Future<void>
인증 완료 설정
toggleBlock(String otherUserUid) Future<bool>
Blocks or unblocks
toggleLike(String otherUserUid) Future<bool?>
Like other user
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override
unblockUser(String otherUserUid) Future
Unblock a user
update({String? name, String? displayName, String? photoUrl, String? profileBackgroundImageUrl, List<String>? photoUrls, String? stateMessage, int? birthYear, int? birthMonth, int? birthDay, String? gender, bool? isAdmin, bool? isVerified, dynamic createdAt, dynamic order, int? idUploadedAt, String? idUrl, String? occupation, String? countryCode, String? siDo, String? siGunGu, double? latitude, double? longitude, String? languageCode, int? ping}) Future<User>
Update user data.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

mutualLikeRef ↔ DatabaseReference
getter/setter pair
rootRef ↔ DatabaseReference
Paths and Refs
getter/setter pair
userProfilePhotosRef ↔ DatabaseReference
getter/setter pair
usersRef ↔ DatabaseReference
getter/setter pair
whoILikeRef ↔ DatabaseReference
getter/setter pair
whoLikeMeRef ↔ DatabaseReference
getter/setter pair

Static Methods

create({required String uid, String? displayName, String? photoUrl}) Future<User>
Create user document
get(String uid) Future<User?>
사용자 정보 node 전체를 User 에 담아 리턴한다.
getField<T>(String uid, String field) Future<T?>
입력된 전화번호 문자열을 바탕으로 사용자 정보(문서, 값)를 찾아 사용자 모델로 리턴한다. 사용자의 특정 필만 가져와서 리턴한다.
iLikeRef(String b) → DatabaseReference
user(String uid) String
userField(String uid, String field) String
userRef(String uid) → DatabaseReference
whoILikePath(String a, String b) String
내가 다른 사람을 좋아요 할 때, 그 정보를 저장하는 노드 경로

Constants

mutualLike → const String
node → const String
userProfilePhotos → const String
data paths
whoILike → const String
whoLikeMe → const String