...
This commit is contained in:
@@ -5,14 +5,16 @@ class UserInfo extends Equatable {
|
||||
final String nickname;
|
||||
final int avatarIndex;
|
||||
final int colorValue;
|
||||
final bool isReady; // [추가] 준비 상태
|
||||
final bool isReady;
|
||||
final String? profileImageBase64; // [추가] 커스텀 프로필 이미지 (Base64)
|
||||
|
||||
const UserInfo({
|
||||
required this.id,
|
||||
required this.nickname,
|
||||
this.avatarIndex = 0,
|
||||
this.colorValue = 0xFF2196F3,
|
||||
this.isReady = false, // 기본값 false
|
||||
this.isReady = false,
|
||||
this.profileImageBase64, // 생성자 추가
|
||||
});
|
||||
|
||||
factory UserInfo.fromJson(Map<String, dynamic> json) {
|
||||
@@ -21,7 +23,8 @@ class UserInfo extends Equatable {
|
||||
nickname: json['nickname'] as String,
|
||||
avatarIndex: json['avatarIndex'] as int? ?? 0,
|
||||
colorValue: json['colorValue'] as int? ?? 0xFF2196F3,
|
||||
isReady: json['isReady'] as bool? ?? false, // JSON 파싱 추가
|
||||
isReady: json['isReady'] as bool? ?? false,
|
||||
profileImageBase64: json['profileImageBase64'] as String?, // 파싱 추가
|
||||
);
|
||||
}
|
||||
|
||||
@@ -31,7 +34,8 @@ class UserInfo extends Equatable {
|
||||
'nickname': nickname,
|
||||
'avatarIndex': avatarIndex,
|
||||
'colorValue': colorValue,
|
||||
'isReady': isReady, // JSON 변환 추가
|
||||
'isReady': isReady,
|
||||
'profileImageBase64': profileImageBase64, // 변환 추가
|
||||
};
|
||||
}
|
||||
|
||||
@@ -40,7 +44,8 @@ class UserInfo extends Equatable {
|
||||
String? nickname,
|
||||
int? avatarIndex,
|
||||
int? colorValue,
|
||||
bool? isReady, // copyWith 추가
|
||||
bool? isReady,
|
||||
String? profileImageBase64, // copyWith 추가
|
||||
}) {
|
||||
return UserInfo(
|
||||
id: id ?? this.id,
|
||||
@@ -48,9 +53,10 @@ class UserInfo extends Equatable {
|
||||
avatarIndex: avatarIndex ?? this.avatarIndex,
|
||||
colorValue: colorValue ?? this.colorValue,
|
||||
isReady: isReady ?? this.isReady,
|
||||
profileImageBase64: profileImageBase64 ?? this.profileImageBase64,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, nickname, avatarIndex, colorValue, isReady];
|
||||
List<Object?> get props => [id, nickname, avatarIndex, colorValue, isReady, profileImageBase64];
|
||||
}
|
||||
Reference in New Issue
Block a user