fix: JsonKey for User.language

This commit is contained in:
groovinchip
2021-07-21 12:28:04 -04:00
parent 25aa6f2a90
commit f109a47909
2 changed files with 2 additions and 3 deletions
@@ -86,8 +86,7 @@ class User extends Equatable {
/// The language this user prefers.
///
/// Defaults to 'en'.
@JsonKey(
includeIfNull: false, toJson: Serializer.readOnly, defaultValue: 'en')
@JsonKey(defaultValue: 'en')
final String? language;
@override
@@ -48,6 +48,6 @@ Map<String, dynamic> _$UserToJson(User instance) {
writeNotNull('online', readonly(instance.online));
writeNotNull('banned', readonly(instance.banned));
val['extra_data'] = instance.extraData;
writeNotNull('language', readonly(instance.language));
val['language'] = instance.language;
return val;
}