Fix: Handle missing file and sharedCollection count

This commit is contained in:
Neeraj Gupta 2022-09-21 19:41:58 +05:30
parent 240c978299
commit 59840aafbb
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -55,8 +55,8 @@ class UserDetails {
return UserDetails(
map['email'] as String,
map['usage'] as int,
map['fileCount'] as int ?? 0,
map['sharedCollectionsCount'] as int ?? 0,
(map['fileCount'] ?? 0) as int,
(map['sharedCollectionsCount'] ?? 0) as int,
Subscription.fromMap(map['subscription']),
FamilyData.fromMap(map['familyData']),
);