move jsons to fixtures

This commit is contained in:
Salvatore Giordano
2021-06-17 09:31:53 +02:00
parent 00642a5439
commit 2d6cc796e8
32 changed files with 1530 additions and 1559 deletions
@@ -1,2 +1,2 @@
export 'chat_error_code.dart';
export 'stream_chat_error.dart';
export 'stream_chat_error.dart';
@@ -78,8 +78,7 @@ class ChannelModel {
final DateTime? deletedAt;
/// The count of this channel members
@JsonKey(
includeIfNull: false, toJson: Serializer.readOnly, defaultValue: 0)
@JsonKey(includeIfNull: false, toJson: Serializer.readOnly, defaultValue: 0)
final int memberCount;
/// Map of custom channel extraData
@@ -61,21 +61,16 @@ class OwnUser extends User {
/// List of users muted by the user
@JsonKey(
includeIfNull: false,
toJson: Serializer.readOnly,
defaultValue: <Mute>[])
includeIfNull: false, toJson: Serializer.readOnly, defaultValue: <Mute>[])
final List<Mute> mutes;
/// List of users muted by the user
@JsonKey(
includeIfNull: false,
toJson: Serializer.readOnly,
defaultValue: <Mute>[])
includeIfNull: false, toJson: Serializer.readOnly, defaultValue: <Mute>[])
final List<Mute> channelMutes;
/// Total unread messages by the user
@JsonKey(
includeIfNull: false, toJson: Serializer.readOnly, defaultValue: 0)
@JsonKey(includeIfNull: false, toJson: Serializer.readOnly, defaultValue: 0)
final int totalUnreadCount;
/// Total unread channels by the user
@@ -22,8 +22,8 @@ class User extends Equatable {
updatedAt = updatedAt ?? DateTime.now();
/// Create a new instance from a json
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(
Serializer.moveToExtraDataFromRoot(json, topLevelFields));
factory User.fromJson(Map<String, dynamic> json) =>
_$UserFromJson(Serializer.moveToExtraDataFromRoot(json, topLevelFields));
/// Known top level fields.
/// Useful for [Serializer] methods.