From a6852d716fa04ca40265b5397115fc4045452cdb Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Mon, 9 Mar 2026 15:42:33 +0100 Subject: [PATCH] fix: handle null fields in PlexHome deserialization --- lib/models/plex_home.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/models/plex_home.dart b/lib/models/plex_home.dart index eadf3a89..fca1d3ca 100644 --- a/lib/models/plex_home.dart +++ b/lib/models/plex_home.dart @@ -25,11 +25,11 @@ class PlexHome { return PlexHome( id: (json['id'] as num?)?.toInt() ?? 0, - name: json['name'] as String, + name: json['name'] as String? ?? '', guestUserID: (json['guestUserID'] as num?)?.toInt(), - guestUserUUID: json['guestUserUUID'] as String, - guestEnabled: json['guestEnabled'] as bool, - subscription: json['subscription'] as bool, + guestUserUUID: json['guestUserUUID'] as String? ?? '', + guestEnabled: json['guestEnabled'] as bool? ?? false, + subscription: json['subscription'] as bool? ?? false, users: users, ); }