262 lines
8.4 KiB
Dart
262 lines
8.4 KiB
Dart
// 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_state.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
T _$identity<T>(T value) => value;
|
|
|
|
final _privateConstructorUsedError = UnsupportedError(
|
|
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
|
);
|
|
|
|
/// @nodoc
|
|
mixin _$ChatState {
|
|
List<ChatSessionEntity> get sessions => throw _privateConstructorUsedError;
|
|
ChatSessionEntity? get activeSession => throw _privateConstructorUsedError;
|
|
List<ChatMessageEntity> get messages => throw _privateConstructorUsedError;
|
|
bool get isTyping => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of ChatState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$ChatStateCopyWith<ChatState> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $ChatStateCopyWith<$Res> {
|
|
factory $ChatStateCopyWith(ChatState value, $Res Function(ChatState) then) =
|
|
_$ChatStateCopyWithImpl<$Res, ChatState>;
|
|
@useResult
|
|
$Res call({
|
|
List<ChatSessionEntity> sessions,
|
|
ChatSessionEntity? activeSession,
|
|
List<ChatMessageEntity> messages,
|
|
bool isTyping,
|
|
});
|
|
|
|
$ChatSessionEntityCopyWith<$Res>? get activeSession;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$ChatStateCopyWithImpl<$Res, $Val extends ChatState>
|
|
implements $ChatStateCopyWith<$Res> {
|
|
_$ChatStateCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of ChatState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? sessions = null,
|
|
Object? activeSession = freezed,
|
|
Object? messages = null,
|
|
Object? isTyping = null,
|
|
}) {
|
|
return _then(
|
|
_value.copyWith(
|
|
sessions: null == sessions
|
|
? _value.sessions
|
|
: sessions // ignore: cast_nullable_to_non_nullable
|
|
as List<ChatSessionEntity>,
|
|
activeSession: freezed == activeSession
|
|
? _value.activeSession
|
|
: activeSession // ignore: cast_nullable_to_non_nullable
|
|
as ChatSessionEntity?,
|
|
messages: null == messages
|
|
? _value.messages
|
|
: messages // ignore: cast_nullable_to_non_nullable
|
|
as List<ChatMessageEntity>,
|
|
isTyping: null == isTyping
|
|
? _value.isTyping
|
|
: isTyping // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
)
|
|
as $Val,
|
|
);
|
|
}
|
|
|
|
/// Create a copy of ChatState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$ChatSessionEntityCopyWith<$Res>? get activeSession {
|
|
if (_value.activeSession == null) {
|
|
return null;
|
|
}
|
|
|
|
return $ChatSessionEntityCopyWith<$Res>(_value.activeSession!, (value) {
|
|
return _then(_value.copyWith(activeSession: value) as $Val);
|
|
});
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$ChatStateImplCopyWith<$Res>
|
|
implements $ChatStateCopyWith<$Res> {
|
|
factory _$$ChatStateImplCopyWith(
|
|
_$ChatStateImpl value,
|
|
$Res Function(_$ChatStateImpl) then,
|
|
) = __$$ChatStateImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
List<ChatSessionEntity> sessions,
|
|
ChatSessionEntity? activeSession,
|
|
List<ChatMessageEntity> messages,
|
|
bool isTyping,
|
|
});
|
|
|
|
@override
|
|
$ChatSessionEntityCopyWith<$Res>? get activeSession;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$ChatStateImplCopyWithImpl<$Res>
|
|
extends _$ChatStateCopyWithImpl<$Res, _$ChatStateImpl>
|
|
implements _$$ChatStateImplCopyWith<$Res> {
|
|
__$$ChatStateImplCopyWithImpl(
|
|
_$ChatStateImpl _value,
|
|
$Res Function(_$ChatStateImpl) _then,
|
|
) : super(_value, _then);
|
|
|
|
/// Create a copy of ChatState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? sessions = null,
|
|
Object? activeSession = freezed,
|
|
Object? messages = null,
|
|
Object? isTyping = null,
|
|
}) {
|
|
return _then(
|
|
_$ChatStateImpl(
|
|
sessions: null == sessions
|
|
? _value._sessions
|
|
: sessions // ignore: cast_nullable_to_non_nullable
|
|
as List<ChatSessionEntity>,
|
|
activeSession: freezed == activeSession
|
|
? _value.activeSession
|
|
: activeSession // ignore: cast_nullable_to_non_nullable
|
|
as ChatSessionEntity?,
|
|
messages: null == messages
|
|
? _value._messages
|
|
: messages // ignore: cast_nullable_to_non_nullable
|
|
as List<ChatMessageEntity>,
|
|
isTyping: null == isTyping
|
|
? _value.isTyping
|
|
: isTyping // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$ChatStateImpl implements _ChatState {
|
|
const _$ChatStateImpl({
|
|
final List<ChatSessionEntity> sessions = const [],
|
|
this.activeSession,
|
|
final List<ChatMessageEntity> messages = const [],
|
|
this.isTyping = false,
|
|
}) : _sessions = sessions,
|
|
_messages = messages;
|
|
|
|
final List<ChatSessionEntity> _sessions;
|
|
@override
|
|
@JsonKey()
|
|
List<ChatSessionEntity> get sessions {
|
|
if (_sessions is EqualUnmodifiableListView) return _sessions;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_sessions);
|
|
}
|
|
|
|
@override
|
|
final ChatSessionEntity? activeSession;
|
|
final List<ChatMessageEntity> _messages;
|
|
@override
|
|
@JsonKey()
|
|
List<ChatMessageEntity> get messages {
|
|
if (_messages is EqualUnmodifiableListView) return _messages;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_messages);
|
|
}
|
|
|
|
@override
|
|
@JsonKey()
|
|
final bool isTyping;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ChatState(sessions: $sessions, activeSession: $activeSession, messages: $messages, isTyping: $isTyping)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$ChatStateImpl &&
|
|
const DeepCollectionEquality().equals(other._sessions, _sessions) &&
|
|
(identical(other.activeSession, activeSession) ||
|
|
other.activeSession == activeSession) &&
|
|
const DeepCollectionEquality().equals(other._messages, _messages) &&
|
|
(identical(other.isTyping, isTyping) ||
|
|
other.isTyping == isTyping));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
const DeepCollectionEquality().hash(_sessions),
|
|
activeSession,
|
|
const DeepCollectionEquality().hash(_messages),
|
|
isTyping,
|
|
);
|
|
|
|
/// Create a copy of ChatState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$ChatStateImplCopyWith<_$ChatStateImpl> get copyWith =>
|
|
__$$ChatStateImplCopyWithImpl<_$ChatStateImpl>(this, _$identity);
|
|
}
|
|
|
|
abstract class _ChatState implements ChatState {
|
|
const factory _ChatState({
|
|
final List<ChatSessionEntity> sessions,
|
|
final ChatSessionEntity? activeSession,
|
|
final List<ChatMessageEntity> messages,
|
|
final bool isTyping,
|
|
}) = _$ChatStateImpl;
|
|
|
|
@override
|
|
List<ChatSessionEntity> get sessions;
|
|
@override
|
|
ChatSessionEntity? get activeSession;
|
|
@override
|
|
List<ChatMessageEntity> get messages;
|
|
@override
|
|
bool get isTyping;
|
|
|
|
/// Create a copy of ChatState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$ChatStateImplCopyWith<_$ChatStateImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|