fix(llc, ui): fix failing tests

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-07-27 18:35:15 +05:30
committed by xsahil03x
parent 467e892079
commit 7449540f34
5 changed files with 27 additions and 13 deletions
@@ -220,7 +220,7 @@ class Message extends Equatable {
final DateTime? deletedAt;
/// A Map of translations.
@JsonKey(includeIfNull: false, toJson: Serializer.readOnly)
@JsonKey(includeIfNull: false)
final Map<String, String>? i18n;
/// Known top level fields.
@@ -110,6 +110,6 @@ Map<String, dynamic> _$MessageToJson(Message instance) {
val['pinned_by'] = readonly(instance.pinnedBy);
val['extra_data'] = instance.extraData;
writeNotNull('deleted_at', readonly(instance.deletedAt));
writeNotNull('i18n', readonly(instance.i18n));
writeNotNull('i18n', instance.i18n);
return val;
}
@@ -87,7 +87,11 @@ class User extends Equatable {
/// The language this user prefers.
///
/// Defaults to 'en'.
@JsonKey(defaultValue: 'en')
@JsonKey(
includeIfNull: false,
toJson: Serializer.readOnly,
defaultValue: 'en',
)
final String language;
/// Shortcut for user name
@@ -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;
val['language'] = instance.language;
writeNotNull('language', readonly(instance.language));
return val;
}