class ProfileModel { const ProfileModel({ required this.userId, required this.username, required this.bio, required this.avatarUrl, }); final String userId; final String username; final String bio; final String avatarUrl; factory ProfileModel.fromJson(Map json) { return ProfileModel( userId: (json['user_id'] as String?) ?? '', username: (json['username'] as String?) ?? '', bio: (json['bio'] as String?) ?? '', avatarUrl: (json['avatar_url'] as String?) ?? '', ); } ProfileModel copyWith({ String? username, String? bio, String? avatarUrl, }) { return ProfileModel( userId: userId, username: username ?? this.username, bio: bio ?? this.bio, avatarUrl: avatarUrl ?? this.avatarUrl, ); } }