forked from eatvio/eatvio_app
refactor: profile model
This commit is contained in:
@@ -23,8 +23,12 @@ mixin _$ChatRoomPreviewModel {
|
||||
@JsonKey(name: "chatRooms")
|
||||
List<ChatRoom> get chatRooms => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ChatRoomPreviewModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ChatRoomPreviewModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatRoomPreviewModelCopyWith<ChatRoomPreviewModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -49,6 +53,8 @@ class _$ChatRoomPreviewModelCopyWithImpl<$Res,
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of ChatRoomPreviewModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -82,6 +88,8 @@ class __$$ChatRoomPreviewModelImplCopyWithImpl<$Res>
|
||||
$Res Function(_$ChatRoomPreviewModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatRoomPreviewModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -129,12 +137,14 @@ class _$ChatRoomPreviewModelImpl implements _ChatRoomPreviewModel {
|
||||
.equals(other._chatRooms, _chatRooms));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of ChatRoomPreviewModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl>
|
||||
@@ -161,8 +171,11 @@ abstract class _ChatRoomPreviewModel implements ChatRoomPreviewModel {
|
||||
@override
|
||||
@JsonKey(name: "chatRooms")
|
||||
List<ChatRoom> get chatRooms;
|
||||
|
||||
/// Create a copy of ChatRoomPreviewModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -182,8 +195,12 @@ mixin _$ChatRoom {
|
||||
@JsonKey(name: "users")
|
||||
Users get users => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ChatRoom to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ChatRoom
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatRoomCopyWith<ChatRoom> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -212,6 +229,8 @@ class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of ChatRoom
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -240,6 +259,8 @@ class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom>
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of ChatRoom
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$UsersCopyWith<$Res> get users {
|
||||
@@ -275,6 +296,8 @@ class __$$ChatRoomImplCopyWithImpl<$Res>
|
||||
_$ChatRoomImpl _value, $Res Function(_$ChatRoomImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatRoom
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -347,12 +370,14 @@ class _$ChatRoomImpl implements _ChatRoom {
|
||||
(identical(other.users, users) || other.users == users));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, roomName,
|
||||
const DeepCollectionEquality().hash(lastMessage), users);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of ChatRoom
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith =>
|
||||
@@ -388,8 +413,11 @@ abstract class _ChatRoom implements ChatRoom {
|
||||
@override
|
||||
@JsonKey(name: "users")
|
||||
Users get users;
|
||||
|
||||
/// Create a copy of ChatRoom
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -415,8 +443,12 @@ mixin _$LastMessageClass {
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this LastMessageClass to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of LastMessageClass
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$LastMessageClassCopyWith<LastMessageClass> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -448,6 +480,8 @@ class _$LastMessageClassCopyWithImpl<$Res, $Val extends LastMessageClass>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of LastMessageClass
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -519,6 +553,8 @@ class __$$LastMessageClassImplCopyWithImpl<$Res>
|
||||
$Res Function(_$LastMessageClassImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of LastMessageClass
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -633,7 +669,7 @@ class _$LastMessageClassImpl implements _LastMessageClass {
|
||||
other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
@@ -645,7 +681,9 @@ class _$LastMessageClassImpl implements _LastMessageClass {
|
||||
readByToUser,
|
||||
updatedAt);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of LastMessageClass
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith =>
|
||||
@@ -696,8 +734,11 @@ abstract class _LastMessageClass implements LastMessageClass {
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt;
|
||||
|
||||
/// Create a copy of LastMessageClass
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -713,8 +754,12 @@ mixin _$Users {
|
||||
@JsonKey(name: "to_chat_user")
|
||||
ChatUser get toChatUser => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Users to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of Users
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$UsersCopyWith<Users> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -741,6 +786,8 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of Users
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -759,6 +806,8 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users>
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of Users
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ChatUserCopyWith<$Res> get fromChatUser {
|
||||
@@ -767,6 +816,8 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users>
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of Users
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ChatUserCopyWith<$Res> get toChatUser {
|
||||
@@ -801,6 +852,8 @@ class __$$UsersImplCopyWithImpl<$Res>
|
||||
_$UsersImpl _value, $Res Function(_$UsersImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Users
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -853,11 +906,13 @@ class _$UsersImpl implements _Users {
|
||||
other.toChatUser == toChatUser));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, fromChatUser, toChatUser);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of Users
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$UsersImplCopyWith<_$UsersImpl> get copyWith =>
|
||||
@@ -885,8 +940,11 @@ abstract class _Users implements Users {
|
||||
@override
|
||||
@JsonKey(name: "to_chat_user")
|
||||
ChatUser get toChatUser;
|
||||
|
||||
/// Create a copy of Users
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$UsersImplCopyWith<_$UsersImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -906,8 +964,12 @@ mixin _$ChatUser {
|
||||
@JsonKey(name: "profile_photo_url")
|
||||
String get profilePhotoUrl => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ChatUser to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
/// Create a copy of ChatUser
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ChatUserCopyWith<ChatUser> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -934,6 +996,8 @@ class _$ChatUserCopyWithImpl<$Res, $Val extends ChatUser>
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of ChatUser
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -986,6 +1050,8 @@ class __$$ChatUserImplCopyWithImpl<$Res>
|
||||
_$ChatUserImpl _value, $Res Function(_$ChatUserImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of ChatUser
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -1058,12 +1124,14 @@ class _$ChatUserImpl implements _ChatUser {
|
||||
other.profilePhotoUrl == profilePhotoUrl));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
/// Create a copy of ChatUser
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith =>
|
||||
@@ -1101,8 +1169,11 @@ abstract class _ChatUser implements ChatUser {
|
||||
@override
|
||||
@JsonKey(name: "profile_photo_url")
|
||||
String get profilePhotoUrl;
|
||||
|
||||
/// Create a copy of ChatUser
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user