Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions vrchat_dart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.0.4

- Allows `LimitedUser` to deserialize when `currentAvatarImageUrl` is absent

## 4.0.3

- Uses `dart.library.js_interop` for web conditional imports so the package is Wasm-ready
Expand Down
14 changes: 9 additions & 5 deletions vrchat_dart/lib/src/model/api/limited_user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class LimitedUser {
/// Returns a new [LimitedUser] instance.
const LimitedUser({
// Common required fields (present and required in all variants)
required this.currentAvatarImageUrl,
required this.developerType,
required this.displayName,
required this.id,
Expand All @@ -33,6 +32,7 @@ class LimitedUser {
// Common optional fields (present in all but optional)
this.bio,
this.bioLinks,
this.currentAvatarImageUrl,
this.currentAvatarThumbnailImageUrl,
this.currentAvatarTags,
this.profilePicOverride,
Expand All @@ -57,10 +57,6 @@ class LimitedUser {

// Common required fields

/// When profilePicOverride is not empty, use it instead.
@JsonKey(name: r'currentAvatarImageUrl', required: true, includeIfNull: false)
final String? currentAvatarImageUrl;

/// The developer type of the user.
@JsonKey(name: r'developerType', required: true, includeIfNull: false)
final DeveloperType developerType;
Expand Down Expand Up @@ -103,6 +99,14 @@ class LimitedUser {

// Common optional fields

/// When profilePicOverride is not empty, use it instead.
@JsonKey(
name: r'currentAvatarImageUrl',
required: false,
includeIfNull: false,
)
final String? currentAvatarImageUrl;

/// The user's biography.
@JsonKey(name: r'bio', required: false, includeIfNull: false)
final String? bio;
Expand Down
11 changes: 5 additions & 6 deletions vrchat_dart/lib/src/model/api/limited_user.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vrchat_dart/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: vrchat_dart
description: This is a Dart client that interacts with the unofficial VRChat API
homepage: https://github.com/vrchatapi/vrchatapi-dart
version: 4.0.3
version: 4.0.4

environment:
sdk: ^3.8.0
Expand Down
Loading
Loading