move jsons to fixtures
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user