veilidchat/lib/chat/models/chat_component_state.freezed.dart
2025-03-22 21:43:37 -04:00

366 lines
14 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 {
// GlobalKey for the chat
GlobalKey<ChatState> get chatKey; // ScrollController for the chat
AutoScrollController
get scrollController; // TextEditingController for the chat
InputTextFieldController get textEditingController; // Local user
User? get localUser; // Active remote users
IMap<TypedKey, User> get remoteUsers; // Historical remote users
IMap<TypedKey, User> get historicalRemoteUsers; // Unknown users
IMap<TypedKey, 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.chatKey, chatKey) || other.chatKey == chatKey) &&
(identical(other.scrollController, scrollController) ||
other.scrollController == scrollController) &&
(identical(other.textEditingController, textEditingController) ||
other.textEditingController == textEditingController) &&
(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,
chatKey,
scrollController,
textEditingController,
localUser,
remoteUsers,
historicalRemoteUsers,
unknownUsers,
messageWindow,
title);
@override
String toString() {
return 'ChatComponentState(chatKey: $chatKey, scrollController: $scrollController, textEditingController: $textEditingController, 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(
{GlobalKey<ChatState> chatKey,
AutoScrollController scrollController,
InputTextFieldController textEditingController,
User? localUser,
IMap<Typed<FixedEncodedString43>, User> remoteUsers,
IMap<Typed<FixedEncodedString43>, User> historicalRemoteUsers,
IMap<Typed<FixedEncodedString43>, User> unknownUsers,
AsyncValue<WindowState<Message>> messageWindow,
String title});
$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? chatKey = null,
Object? scrollController = null,
Object? textEditingController = null,
Object? localUser = freezed,
Object? remoteUsers = null,
Object? historicalRemoteUsers = null,
Object? unknownUsers = null,
Object? messageWindow = null,
Object? title = null,
}) {
return _then(_self.copyWith(
chatKey: null == chatKey
? _self.chatKey
: chatKey // ignore: cast_nullable_to_non_nullable
as GlobalKey<ChatState>,
scrollController: null == scrollController
? _self.scrollController
: scrollController // ignore: cast_nullable_to_non_nullable
as AutoScrollController,
textEditingController: null == textEditingController
? _self.textEditingController
: textEditingController // ignore: cast_nullable_to_non_nullable
as InputTextFieldController,
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<Typed<FixedEncodedString43>, User>,
historicalRemoteUsers: null == historicalRemoteUsers
? _self.historicalRemoteUsers!
: historicalRemoteUsers // ignore: cast_nullable_to_non_nullable
as IMap<Typed<FixedEncodedString43>, User>,
unknownUsers: null == unknownUsers
? _self.unknownUsers!
: unknownUsers // ignore: cast_nullable_to_non_nullable
as IMap<Typed<FixedEncodedString43>, 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')
$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.chatKey,
required this.scrollController,
required this.textEditingController,
required this.localUser,
required this.remoteUsers,
required this.historicalRemoteUsers,
required this.unknownUsers,
required this.messageWindow,
required this.title});
// GlobalKey for the chat
@override
final GlobalKey<ChatState> chatKey;
// ScrollController for the chat
@override
final AutoScrollController scrollController;
// TextEditingController for the chat
@override
final InputTextFieldController textEditingController;
// Local user
@override
final User? localUser;
// Active remote users
@override
final IMap<Typed<FixedEncodedString43>, User> remoteUsers;
// Historical remote users
@override
final IMap<Typed<FixedEncodedString43>, User> historicalRemoteUsers;
// Unknown users
@override
final IMap<Typed<FixedEncodedString43>, 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.chatKey, chatKey) || other.chatKey == chatKey) &&
(identical(other.scrollController, scrollController) ||
other.scrollController == scrollController) &&
(identical(other.textEditingController, textEditingController) ||
other.textEditingController == textEditingController) &&
(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,
chatKey,
scrollController,
textEditingController,
localUser,
remoteUsers,
historicalRemoteUsers,
unknownUsers,
messageWindow,
title);
@override
String toString() {
return 'ChatComponentState(chatKey: $chatKey, scrollController: $scrollController, textEditingController: $textEditingController, 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(
{GlobalKey<ChatState> chatKey,
AutoScrollController scrollController,
InputTextFieldController textEditingController,
User? localUser,
IMap<Typed<FixedEncodedString43>, User> remoteUsers,
IMap<Typed<FixedEncodedString43>, User> historicalRemoteUsers,
IMap<Typed<FixedEncodedString43>, User> unknownUsers,
AsyncValue<WindowState<Message>> messageWindow,
String title});
@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? chatKey = null,
Object? scrollController = null,
Object? textEditingController = null,
Object? localUser = freezed,
Object? remoteUsers = null,
Object? historicalRemoteUsers = null,
Object? unknownUsers = null,
Object? messageWindow = null,
Object? title = null,
}) {
return _then(_ChatComponentState(
chatKey: null == chatKey
? _self.chatKey
: chatKey // ignore: cast_nullable_to_non_nullable
as GlobalKey<ChatState>,
scrollController: null == scrollController
? _self.scrollController
: scrollController // ignore: cast_nullable_to_non_nullable
as AutoScrollController,
textEditingController: null == textEditingController
? _self.textEditingController
: textEditingController // ignore: cast_nullable_to_non_nullable
as InputTextFieldController,
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<Typed<FixedEncodedString43>, User>,
historicalRemoteUsers: null == historicalRemoteUsers
? _self.historicalRemoteUsers
: historicalRemoteUsers // ignore: cast_nullable_to_non_nullable
as IMap<Typed<FixedEncodedString43>, User>,
unknownUsers: null == unknownUsers
? _self.unknownUsers
: unknownUsers // ignore: cast_nullable_to_non_nullable
as IMap<Typed<FixedEncodedString43>, 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')
$AsyncValueCopyWith<WindowState<Message>, $Res> get messageWindow {
return $AsyncValueCopyWith<WindowState<Message>, $Res>(_self.messageWindow,
(value) {
return _then(_self.copyWith(messageWindow: value));
});
}
}
// dart format on