mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-13 09:49:25 -04:00
316 lines
11 KiB
Dart
316 lines
11 KiB
Dart
// dart format width=80
|
|
// coverage:ignore-file
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// ignore_for_file: type=lint
|
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
|
|
|
part of 'chat_component_state.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// dart format off
|
|
T _$identity<T>(T value) => value;
|
|
|
|
/// @nodoc
|
|
mixin _$ChatComponentState {
|
|
// Local user
|
|
User? get localUser; // Active remote users
|
|
IMap<UserID, User> get remoteUsers; // Historical remote users
|
|
IMap<UserID, User> get historicalRemoteUsers; // Unknown users
|
|
IMap<UserID, User> get unknownUsers; // Messages state
|
|
AsyncValue<WindowState<Message>> get messageWindow; // Title of the chat
|
|
String get title;
|
|
|
|
/// Create a copy of ChatComponentState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$ChatComponentStateCopyWith<ChatComponentState> get copyWith =>
|
|
_$ChatComponentStateCopyWithImpl<ChatComponentState>(
|
|
this as ChatComponentState, _$identity);
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is ChatComponentState &&
|
|
(identical(other.localUser, localUser) ||
|
|
other.localUser == localUser) &&
|
|
(identical(other.remoteUsers, remoteUsers) ||
|
|
other.remoteUsers == remoteUsers) &&
|
|
(identical(other.historicalRemoteUsers, historicalRemoteUsers) ||
|
|
other.historicalRemoteUsers == historicalRemoteUsers) &&
|
|
(identical(other.unknownUsers, unknownUsers) ||
|
|
other.unknownUsers == unknownUsers) &&
|
|
(identical(other.messageWindow, messageWindow) ||
|
|
other.messageWindow == messageWindow) &&
|
|
(identical(other.title, title) || other.title == title));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, localUser, remoteUsers,
|
|
historicalRemoteUsers, unknownUsers, messageWindow, title);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ChatComponentState(localUser: $localUser, remoteUsers: $remoteUsers, historicalRemoteUsers: $historicalRemoteUsers, unknownUsers: $unknownUsers, messageWindow: $messageWindow, title: $title)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $ChatComponentStateCopyWith<$Res> {
|
|
factory $ChatComponentStateCopyWith(
|
|
ChatComponentState value, $Res Function(ChatComponentState) _then) =
|
|
_$ChatComponentStateCopyWithImpl;
|
|
@useResult
|
|
$Res call(
|
|
{User? localUser,
|
|
IMap<String, User> remoteUsers,
|
|
IMap<String, User> historicalRemoteUsers,
|
|
IMap<String, User> unknownUsers,
|
|
AsyncValue<WindowState<Message>> messageWindow,
|
|
String title});
|
|
|
|
$UserCopyWith<$Res>? get localUser;
|
|
$AsyncValueCopyWith<WindowState<Message>, $Res> get messageWindow;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$ChatComponentStateCopyWithImpl<$Res>
|
|
implements $ChatComponentStateCopyWith<$Res> {
|
|
_$ChatComponentStateCopyWithImpl(this._self, this._then);
|
|
|
|
final ChatComponentState _self;
|
|
final $Res Function(ChatComponentState) _then;
|
|
|
|
/// Create a copy of ChatComponentState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? localUser = freezed,
|
|
Object? remoteUsers = null,
|
|
Object? historicalRemoteUsers = null,
|
|
Object? unknownUsers = null,
|
|
Object? messageWindow = null,
|
|
Object? title = null,
|
|
}) {
|
|
return _then(_self.copyWith(
|
|
localUser: freezed == localUser
|
|
? _self.localUser
|
|
: localUser // ignore: cast_nullable_to_non_nullable
|
|
as User?,
|
|
remoteUsers: null == remoteUsers
|
|
? _self.remoteUsers!
|
|
: remoteUsers // ignore: cast_nullable_to_non_nullable
|
|
as IMap<String, User>,
|
|
historicalRemoteUsers: null == historicalRemoteUsers
|
|
? _self.historicalRemoteUsers!
|
|
: historicalRemoteUsers // ignore: cast_nullable_to_non_nullable
|
|
as IMap<String, User>,
|
|
unknownUsers: null == unknownUsers
|
|
? _self.unknownUsers!
|
|
: unknownUsers // ignore: cast_nullable_to_non_nullable
|
|
as IMap<String, User>,
|
|
messageWindow: null == messageWindow
|
|
? _self.messageWindow
|
|
: messageWindow // ignore: cast_nullable_to_non_nullable
|
|
as AsyncValue<WindowState<Message>>,
|
|
title: null == title
|
|
? _self.title
|
|
: title // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
|
|
/// Create a copy of ChatComponentState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$UserCopyWith<$Res>? get localUser {
|
|
if (_self.localUser == null) {
|
|
return null;
|
|
}
|
|
|
|
return $UserCopyWith<$Res>(_self.localUser!, (value) {
|
|
return _then(_self.copyWith(localUser: value));
|
|
});
|
|
}
|
|
|
|
/// Create a copy of ChatComponentState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$AsyncValueCopyWith<WindowState<Message>, $Res> get messageWindow {
|
|
return $AsyncValueCopyWith<WindowState<Message>, $Res>(_self.messageWindow,
|
|
(value) {
|
|
return _then(_self.copyWith(messageWindow: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _ChatComponentState implements ChatComponentState {
|
|
const _ChatComponentState(
|
|
{required this.localUser,
|
|
required this.remoteUsers,
|
|
required this.historicalRemoteUsers,
|
|
required this.unknownUsers,
|
|
required this.messageWindow,
|
|
required this.title});
|
|
|
|
// Local user
|
|
@override
|
|
final User? localUser;
|
|
// Active remote users
|
|
@override
|
|
final IMap<String, User> remoteUsers;
|
|
// Historical remote users
|
|
@override
|
|
final IMap<String, User> historicalRemoteUsers;
|
|
// Unknown users
|
|
@override
|
|
final IMap<String, User> unknownUsers;
|
|
// Messages state
|
|
@override
|
|
final AsyncValue<WindowState<Message>> messageWindow;
|
|
// Title of the chat
|
|
@override
|
|
final String title;
|
|
|
|
/// Create a copy of ChatComponentState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$ChatComponentStateCopyWith<_ChatComponentState> get copyWith =>
|
|
__$ChatComponentStateCopyWithImpl<_ChatComponentState>(this, _$identity);
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _ChatComponentState &&
|
|
(identical(other.localUser, localUser) ||
|
|
other.localUser == localUser) &&
|
|
(identical(other.remoteUsers, remoteUsers) ||
|
|
other.remoteUsers == remoteUsers) &&
|
|
(identical(other.historicalRemoteUsers, historicalRemoteUsers) ||
|
|
other.historicalRemoteUsers == historicalRemoteUsers) &&
|
|
(identical(other.unknownUsers, unknownUsers) ||
|
|
other.unknownUsers == unknownUsers) &&
|
|
(identical(other.messageWindow, messageWindow) ||
|
|
other.messageWindow == messageWindow) &&
|
|
(identical(other.title, title) || other.title == title));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, localUser, remoteUsers,
|
|
historicalRemoteUsers, unknownUsers, messageWindow, title);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ChatComponentState(localUser: $localUser, remoteUsers: $remoteUsers, historicalRemoteUsers: $historicalRemoteUsers, unknownUsers: $unknownUsers, messageWindow: $messageWindow, title: $title)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$ChatComponentStateCopyWith<$Res>
|
|
implements $ChatComponentStateCopyWith<$Res> {
|
|
factory _$ChatComponentStateCopyWith(
|
|
_ChatComponentState value, $Res Function(_ChatComponentState) _then) =
|
|
__$ChatComponentStateCopyWithImpl;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{User? localUser,
|
|
IMap<String, User> remoteUsers,
|
|
IMap<String, User> historicalRemoteUsers,
|
|
IMap<String, User> unknownUsers,
|
|
AsyncValue<WindowState<Message>> messageWindow,
|
|
String title});
|
|
|
|
@override
|
|
$UserCopyWith<$Res>? get localUser;
|
|
@override
|
|
$AsyncValueCopyWith<WindowState<Message>, $Res> get messageWindow;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$ChatComponentStateCopyWithImpl<$Res>
|
|
implements _$ChatComponentStateCopyWith<$Res> {
|
|
__$ChatComponentStateCopyWithImpl(this._self, this._then);
|
|
|
|
final _ChatComponentState _self;
|
|
final $Res Function(_ChatComponentState) _then;
|
|
|
|
/// Create a copy of ChatComponentState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({
|
|
Object? localUser = freezed,
|
|
Object? remoteUsers = null,
|
|
Object? historicalRemoteUsers = null,
|
|
Object? unknownUsers = null,
|
|
Object? messageWindow = null,
|
|
Object? title = null,
|
|
}) {
|
|
return _then(_ChatComponentState(
|
|
localUser: freezed == localUser
|
|
? _self.localUser
|
|
: localUser // ignore: cast_nullable_to_non_nullable
|
|
as User?,
|
|
remoteUsers: null == remoteUsers
|
|
? _self.remoteUsers
|
|
: remoteUsers // ignore: cast_nullable_to_non_nullable
|
|
as IMap<String, User>,
|
|
historicalRemoteUsers: null == historicalRemoteUsers
|
|
? _self.historicalRemoteUsers
|
|
: historicalRemoteUsers // ignore: cast_nullable_to_non_nullable
|
|
as IMap<String, User>,
|
|
unknownUsers: null == unknownUsers
|
|
? _self.unknownUsers
|
|
: unknownUsers // ignore: cast_nullable_to_non_nullable
|
|
as IMap<String, User>,
|
|
messageWindow: null == messageWindow
|
|
? _self.messageWindow
|
|
: messageWindow // ignore: cast_nullable_to_non_nullable
|
|
as AsyncValue<WindowState<Message>>,
|
|
title: null == title
|
|
? _self.title
|
|
: title // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
|
|
/// Create a copy of ChatComponentState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$UserCopyWith<$Res>? get localUser {
|
|
if (_self.localUser == null) {
|
|
return null;
|
|
}
|
|
|
|
return $UserCopyWith<$Res>(_self.localUser!, (value) {
|
|
return _then(_self.copyWith(localUser: value));
|
|
});
|
|
}
|
|
|
|
/// Create a copy of ChatComponentState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$AsyncValueCopyWith<WindowState<Message>, $Res> get messageWindow {
|
|
return $AsyncValueCopyWith<WindowState<Message>, $Res>(_self.messageWindow,
|
|
(value) {
|
|
return _then(_self.copyWith(messageWindow: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
// dart format on
|