forked from eatvio/eatvio_app
feature(registration): remove .env
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'chat_message_model.freezed.dart';
|
||||
|
||||
part 'chat_message_model.g.dart';
|
||||
|
||||
@freezed
|
||||
|
||||
@@ -31,15 +31,12 @@ mixin _$ChatMessageModel {
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$ChatMessageModelCopyWith<ChatMessageModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$ChatMessageModelCopyWith<ChatMessageModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatMessageModelCopyWith<$Res> {
|
||||
factory $ChatMessageModelCopyWith(
|
||||
ChatMessageModel value, $Res Function(ChatMessageModel) then) =
|
||||
_$ChatMessageModelCopyWithImpl<$Res, ChatMessageModel>;
|
||||
factory $ChatMessageModelCopyWith(ChatMessageModel value, $Res Function(ChatMessageModel) then) = _$ChatMessageModelCopyWithImpl<$Res, ChatMessageModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@@ -50,8 +47,7 @@ abstract class $ChatMessageModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel>
|
||||
implements $ChatMessageModelCopyWith<$Res> {
|
||||
class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel> implements $ChatMessageModelCopyWith<$Res> {
|
||||
_$ChatMessageModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
@@ -94,10 +90,8 @@ class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatMessageModelImplCopyWith<$Res>
|
||||
implements $ChatMessageModelCopyWith<$Res> {
|
||||
factory _$$ChatMessageModelImplCopyWith(_$ChatMessageModelImpl value,
|
||||
$Res Function(_$ChatMessageModelImpl) then) =
|
||||
abstract class _$$ChatMessageModelImplCopyWith<$Res> implements $ChatMessageModelCopyWith<$Res> {
|
||||
factory _$$ChatMessageModelImplCopyWith(_$ChatMessageModelImpl value, $Res Function(_$ChatMessageModelImpl) then) =
|
||||
__$$ChatMessageModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
@@ -110,12 +104,9 @@ abstract class _$$ChatMessageModelImplCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatMessageModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatMessageModelCopyWithImpl<$Res, _$ChatMessageModelImpl>
|
||||
class __$$ChatMessageModelImplCopyWithImpl<$Res> extends _$ChatMessageModelCopyWithImpl<$Res, _$ChatMessageModelImpl>
|
||||
implements _$$ChatMessageModelImplCopyWith<$Res> {
|
||||
__$$ChatMessageModelImplCopyWithImpl(_$ChatMessageModelImpl _value,
|
||||
$Res Function(_$ChatMessageModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$ChatMessageModelImplCopyWithImpl(_$ChatMessageModelImpl _value, $Res Function(_$ChatMessageModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -162,8 +153,7 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
|
||||
@JsonKey(name: 'updated_at') required this.updatedAt})
|
||||
: _mediaData = mediaData;
|
||||
|
||||
factory _$ChatMessageModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatMessageModelImplFromJson(json);
|
||||
factory _$ChatMessageModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatMessageModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -199,25 +189,19 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
|
||||
other is _$ChatMessageModelImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.data, data) || other.data == data) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._mediaData, _mediaData) &&
|
||||
(identical(other.authorId, authorId) ||
|
||||
other.authorId == authorId) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt));
|
||||
const DeepCollectionEquality().equals(other._mediaData, _mediaData) &&
|
||||
(identical(other.authorId, authorId) || other.authorId == authorId) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, data,
|
||||
const DeepCollectionEquality().hash(_mediaData), authorId, updatedAt);
|
||||
int get hashCode => Object.hash(runtimeType, id, data, const DeepCollectionEquality().hash(_mediaData), authorId, updatedAt);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
|
||||
__$$ChatMessageModelImplCopyWithImpl<_$ChatMessageModelImpl>(
|
||||
this, _$identity);
|
||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith => __$$ChatMessageModelImplCopyWithImpl<_$ChatMessageModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -229,15 +213,13 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
|
||||
|
||||
abstract class _ChatMessageModel implements ChatMessageModel {
|
||||
const factory _ChatMessageModel(
|
||||
{required final int id,
|
||||
required final String data,
|
||||
@JsonKey(name: 'media_data') required final List<dynamic>? mediaData,
|
||||
@JsonKey(name: 'author_id') required final int authorId,
|
||||
@JsonKey(name: 'updated_at') required final String updatedAt}) =
|
||||
_$ChatMessageModelImpl;
|
||||
{required final int id,
|
||||
required final String data,
|
||||
@JsonKey(name: 'media_data') required final List<dynamic>? mediaData,
|
||||
@JsonKey(name: 'author_id') required final int authorId,
|
||||
@JsonKey(name: 'updated_at') required final String updatedAt}) = _$ChatMessageModelImpl;
|
||||
|
||||
factory _ChatMessageModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatMessageModelImpl.fromJson;
|
||||
factory _ChatMessageModel.fromJson(Map<String, dynamic> json) = _$ChatMessageModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
@@ -254,6 +236,5 @@ abstract class _ChatMessageModel implements ChatMessageModel {
|
||||
String get updatedAt;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@ part of 'chat_message_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatMessageModelImpl _$$ChatMessageModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ChatMessageModelImpl(
|
||||
_$ChatMessageModelImpl _$$ChatMessageModelImplFromJson(Map<String, dynamic> json) => _$ChatMessageModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
data: json['data'] as String,
|
||||
mediaData: json['media_data'] as List<dynamic>?,
|
||||
@@ -16,9 +14,7 @@ _$ChatMessageModelImpl _$$ChatMessageModelImplFromJson(
|
||||
updatedAt: json['updated_at'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatMessageModelImplToJson(
|
||||
_$ChatMessageModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatMessageModelImplToJson(_$ChatMessageModelImpl instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'data': instance.data,
|
||||
'media_data': instance.mediaData,
|
||||
|
||||
@@ -3,7 +3,6 @@ import 'package:eatvio_app/features/chat/models/chat_meta_model.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'chat_messages_model.freezed.dart';
|
||||
|
||||
part 'chat_messages_model.g.dart';
|
||||
|
||||
@freezed
|
||||
|
||||
@@ -26,26 +26,20 @@ mixin _$ChatMessagesModel {
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$ChatMessagesModelCopyWith<ChatMessagesModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$ChatMessagesModelCopyWith<ChatMessagesModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatMessagesModelCopyWith<$Res> {
|
||||
factory $ChatMessagesModelCopyWith(
|
||||
ChatMessagesModel value, $Res Function(ChatMessagesModel) then) =
|
||||
_$ChatMessagesModelCopyWithImpl<$Res, ChatMessagesModel>;
|
||||
factory $ChatMessagesModelCopyWith(ChatMessagesModel value, $Res Function(ChatMessagesModel) then) = _$ChatMessagesModelCopyWithImpl<$Res, ChatMessagesModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'data') List<ChatMessageModel> messagesList,
|
||||
ChatMetaModel meta});
|
||||
$Res call({@JsonKey(name: 'data') List<ChatMessageModel> messagesList, ChatMetaModel meta});
|
||||
|
||||
$ChatMetaModelCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel>
|
||||
implements $ChatMessagesModelCopyWith<$Res> {
|
||||
class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel> implements $ChatMessagesModelCopyWith<$Res> {
|
||||
_$ChatMessagesModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
@@ -81,28 +75,21 @@ class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatMessagesModelImplCopyWith<$Res>
|
||||
implements $ChatMessagesModelCopyWith<$Res> {
|
||||
factory _$$ChatMessagesModelImplCopyWith(_$ChatMessagesModelImpl value,
|
||||
$Res Function(_$ChatMessagesModelImpl) then) =
|
||||
abstract class _$$ChatMessagesModelImplCopyWith<$Res> implements $ChatMessagesModelCopyWith<$Res> {
|
||||
factory _$$ChatMessagesModelImplCopyWith(_$ChatMessagesModelImpl value, $Res Function(_$ChatMessagesModelImpl) then) =
|
||||
__$$ChatMessagesModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'data') List<ChatMessageModel> messagesList,
|
||||
ChatMetaModel meta});
|
||||
$Res call({@JsonKey(name: 'data') List<ChatMessageModel> messagesList, ChatMetaModel meta});
|
||||
|
||||
@override
|
||||
$ChatMetaModelCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatMessagesModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatMessagesModelCopyWithImpl<$Res, _$ChatMessagesModelImpl>
|
||||
class __$$ChatMessagesModelImplCopyWithImpl<$Res> extends _$ChatMessagesModelCopyWithImpl<$Res, _$ChatMessagesModelImpl>
|
||||
implements _$$ChatMessagesModelImplCopyWith<$Res> {
|
||||
__$$ChatMessagesModelImplCopyWithImpl(_$ChatMessagesModelImpl _value,
|
||||
$Res Function(_$ChatMessagesModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$ChatMessagesModelImplCopyWithImpl(_$ChatMessagesModelImpl _value, $Res Function(_$ChatMessagesModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -126,14 +113,9 @@ class __$$ChatMessagesModelImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ChatMessagesModelImpl implements _ChatMessagesModel {
|
||||
const _$ChatMessagesModelImpl(
|
||||
{@JsonKey(name: 'data')
|
||||
required final List<ChatMessageModel> messagesList,
|
||||
required this.meta})
|
||||
: _messagesList = messagesList;
|
||||
const _$ChatMessagesModelImpl({@JsonKey(name: 'data') required final List<ChatMessageModel> messagesList, required this.meta}) : _messagesList = messagesList;
|
||||
|
||||
factory _$ChatMessagesModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatMessagesModelImplFromJson(json);
|
||||
factory _$ChatMessagesModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatMessagesModelImplFromJson(json);
|
||||
|
||||
final List<ChatMessageModel> _messagesList;
|
||||
@override
|
||||
@@ -157,22 +139,18 @@ class _$ChatMessagesModelImpl implements _ChatMessagesModel {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatMessagesModelImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._messagesList, _messagesList) &&
|
||||
const DeepCollectionEquality().equals(other._messagesList, _messagesList) &&
|
||||
(identical(other.meta, meta) || other.meta == meta));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_messagesList), meta);
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_messagesList), meta);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
|
||||
__$$ChatMessagesModelImplCopyWithImpl<_$ChatMessagesModelImpl>(
|
||||
this, _$identity);
|
||||
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith => __$$ChatMessagesModelImplCopyWithImpl<_$ChatMessagesModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -183,13 +161,10 @@ class _$ChatMessagesModelImpl implements _ChatMessagesModel {
|
||||
}
|
||||
|
||||
abstract class _ChatMessagesModel implements ChatMessagesModel {
|
||||
const factory _ChatMessagesModel(
|
||||
{@JsonKey(name: 'data')
|
||||
required final List<ChatMessageModel> messagesList,
|
||||
required final ChatMetaModel meta}) = _$ChatMessagesModelImpl;
|
||||
const factory _ChatMessagesModel({@JsonKey(name: 'data') required final List<ChatMessageModel> messagesList, required final ChatMetaModel meta}) =
|
||||
_$ChatMessagesModelImpl;
|
||||
|
||||
factory _ChatMessagesModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatMessagesModelImpl.fromJson;
|
||||
factory _ChatMessagesModel.fromJson(Map<String, dynamic> json) = _$ChatMessagesModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
@@ -198,6 +173,5 @@ abstract class _ChatMessagesModel implements ChatMessagesModel {
|
||||
ChatMetaModel get meta;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,18 +6,12 @@ part of 'chat_messages_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatMessagesModelImpl _$$ChatMessagesModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ChatMessagesModelImpl(
|
||||
messagesList: (json['data'] as List<dynamic>)
|
||||
.map((e) => ChatMessageModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
_$ChatMessagesModelImpl _$$ChatMessagesModelImplFromJson(Map<String, dynamic> json) => _$ChatMessagesModelImpl(
|
||||
messagesList: (json['data'] as List<dynamic>).map((e) => ChatMessageModel.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
meta: ChatMetaModel.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatMessagesModelImplToJson(
|
||||
_$ChatMessagesModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatMessagesModelImplToJson(_$ChatMessagesModelImpl instance) => <String, dynamic>{
|
||||
'data': instance.messagesList,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'chat_meta_model.freezed.dart';
|
||||
|
||||
part 'chat_meta_model.g.dart';
|
||||
|
||||
@freezed
|
||||
|
||||
@@ -25,22 +25,18 @@ mixin _$ChatMetaModel {
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$ChatMetaModelCopyWith<ChatMetaModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$ChatMetaModelCopyWith<ChatMetaModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatMetaModelCopyWith<$Res> {
|
||||
factory $ChatMetaModelCopyWith(
|
||||
ChatMetaModel value, $Res Function(ChatMetaModel) then) =
|
||||
_$ChatMetaModelCopyWithImpl<$Res, ChatMetaModel>;
|
||||
factory $ChatMetaModelCopyWith(ChatMetaModel value, $Res Function(ChatMetaModel) then) = _$ChatMetaModelCopyWithImpl<$Res, ChatMetaModel>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "last_page") int lastPage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel>
|
||||
implements $ChatMetaModelCopyWith<$Res> {
|
||||
class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel> implements $ChatMetaModelCopyWith<$Res> {
|
||||
_$ChatMetaModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
@@ -63,23 +59,16 @@ class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatMetaModelImplCopyWith<$Res>
|
||||
implements $ChatMetaModelCopyWith<$Res> {
|
||||
factory _$$ChatMetaModelImplCopyWith(
|
||||
_$ChatMetaModelImpl value, $Res Function(_$ChatMetaModelImpl) then) =
|
||||
__$$ChatMetaModelImplCopyWithImpl<$Res>;
|
||||
abstract class _$$ChatMetaModelImplCopyWith<$Res> implements $ChatMetaModelCopyWith<$Res> {
|
||||
factory _$$ChatMetaModelImplCopyWith(_$ChatMetaModelImpl value, $Res Function(_$ChatMetaModelImpl) then) = __$$ChatMetaModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "last_page") int lastPage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatMetaModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatMetaModelCopyWithImpl<$Res, _$ChatMetaModelImpl>
|
||||
implements _$$ChatMetaModelImplCopyWith<$Res> {
|
||||
__$$ChatMetaModelImplCopyWithImpl(
|
||||
_$ChatMetaModelImpl _value, $Res Function(_$ChatMetaModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$ChatMetaModelImplCopyWithImpl<$Res> extends _$ChatMetaModelCopyWithImpl<$Res, _$ChatMetaModelImpl> implements _$$ChatMetaModelImplCopyWith<$Res> {
|
||||
__$$ChatMetaModelImplCopyWithImpl(_$ChatMetaModelImpl _value, $Res Function(_$ChatMetaModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -98,11 +87,9 @@ class __$$ChatMetaModelImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ChatMetaModelImpl implements _ChatMetaModel {
|
||||
const _$ChatMetaModelImpl(
|
||||
{@JsonKey(name: "last_page") required this.lastPage});
|
||||
const _$ChatMetaModelImpl({@JsonKey(name: "last_page") required this.lastPage});
|
||||
|
||||
factory _$ChatMetaModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatMetaModelImplFromJson(json);
|
||||
factory _$ChatMetaModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatMetaModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "last_page")
|
||||
@@ -116,10 +103,7 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatMetaModelImpl &&
|
||||
(identical(other.lastPage, lastPage) ||
|
||||
other.lastPage == lastPage));
|
||||
(other.runtimeType == runtimeType && other is _$ChatMetaModelImpl && (identical(other.lastPage, lastPage) || other.lastPage == lastPage));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@@ -129,8 +113,7 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
|
||||
__$$ChatMetaModelImplCopyWithImpl<_$ChatMetaModelImpl>(this, _$identity);
|
||||
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith => __$$ChatMetaModelImplCopyWithImpl<_$ChatMetaModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -141,18 +124,14 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
|
||||
}
|
||||
|
||||
abstract class _ChatMetaModel implements ChatMetaModel {
|
||||
const factory _ChatMetaModel(
|
||||
{@JsonKey(name: "last_page") required final int lastPage}) =
|
||||
_$ChatMetaModelImpl;
|
||||
const factory _ChatMetaModel({@JsonKey(name: "last_page") required final int lastPage}) = _$ChatMetaModelImpl;
|
||||
|
||||
factory _ChatMetaModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatMetaModelImpl.fromJson;
|
||||
factory _ChatMetaModel.fromJson(Map<String, dynamic> json) = _$ChatMetaModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "last_page")
|
||||
int get lastPage;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,12 +6,10 @@ part of 'chat_meta_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatMetaModelImpl _$$ChatMetaModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ChatMetaModelImpl(
|
||||
_$ChatMetaModelImpl _$$ChatMetaModelImplFromJson(Map<String, dynamic> json) => _$ChatMetaModelImpl(
|
||||
lastPage: (json['last_page'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatMetaModelImplToJson(_$ChatMetaModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatMetaModelImplToJson(_$ChatMetaModelImpl instance) => <String, dynamic>{
|
||||
'last_page': instance.lastPage,
|
||||
};
|
||||
|
||||
@@ -3,7 +3,6 @@ import 'package:eatvio_app/features/chat/models/chat_user_model.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'chat_room_model.freezed.dart';
|
||||
|
||||
part 'chat_room_model.g.dart';
|
||||
|
||||
@freezed
|
||||
|
||||
@@ -22,34 +22,25 @@ ChatRoomModel _$ChatRoomModelFromJson(Map<String, dynamic> json) {
|
||||
mixin _$ChatRoomModel {
|
||||
String get id => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
ChatRoomSettingsModel get chatRoomSettings =>
|
||||
throw _privateConstructorUsedError;
|
||||
ChatRoomSettingsModel get chatRoomSettings => throw _privateConstructorUsedError;
|
||||
Map<String, ChatUserModel> get users => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$ChatRoomModelCopyWith<ChatRoomModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$ChatRoomModelCopyWith<ChatRoomModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatRoomModelCopyWith<$Res> {
|
||||
factory $ChatRoomModelCopyWith(
|
||||
ChatRoomModel value, $Res Function(ChatRoomModel) then) =
|
||||
_$ChatRoomModelCopyWithImpl<$Res, ChatRoomModel>;
|
||||
factory $ChatRoomModelCopyWith(ChatRoomModel value, $Res Function(ChatRoomModel) then) = _$ChatRoomModelCopyWithImpl<$Res, ChatRoomModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String id,
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
ChatRoomSettingsModel chatRoomSettings,
|
||||
Map<String, ChatUserModel> users});
|
||||
$Res call({String id, @JsonKey(name: 'chat_room_setting') ChatRoomSettingsModel chatRoomSettings, Map<String, ChatUserModel> users});
|
||||
|
||||
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel>
|
||||
implements $ChatRoomModelCopyWith<$Res> {
|
||||
class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel> implements $ChatRoomModelCopyWith<$Res> {
|
||||
_$ChatRoomModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
@@ -83,38 +74,26 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel>
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings {
|
||||
return $ChatRoomSettingsModelCopyWith<$Res>(_value.chatRoomSettings,
|
||||
(value) {
|
||||
return $ChatRoomSettingsModelCopyWith<$Res>(_value.chatRoomSettings, (value) {
|
||||
return _then(_value.copyWith(chatRoomSettings: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomModelImplCopyWith<$Res>
|
||||
implements $ChatRoomModelCopyWith<$Res> {
|
||||
factory _$$ChatRoomModelImplCopyWith(
|
||||
_$ChatRoomModelImpl value, $Res Function(_$ChatRoomModelImpl) then) =
|
||||
__$$ChatRoomModelImplCopyWithImpl<$Res>;
|
||||
abstract class _$$ChatRoomModelImplCopyWith<$Res> implements $ChatRoomModelCopyWith<$Res> {
|
||||
factory _$$ChatRoomModelImplCopyWith(_$ChatRoomModelImpl value, $Res Function(_$ChatRoomModelImpl) then) = __$$ChatRoomModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String id,
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
ChatRoomSettingsModel chatRoomSettings,
|
||||
Map<String, ChatUserModel> users});
|
||||
$Res call({String id, @JsonKey(name: 'chat_room_setting') ChatRoomSettingsModel chatRoomSettings, Map<String, ChatUserModel> users});
|
||||
|
||||
@override
|
||||
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomModelCopyWithImpl<$Res, _$ChatRoomModelImpl>
|
||||
implements _$$ChatRoomModelImplCopyWith<$Res> {
|
||||
__$$ChatRoomModelImplCopyWithImpl(
|
||||
_$ChatRoomModelImpl _value, $Res Function(_$ChatRoomModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$ChatRoomModelImplCopyWithImpl<$Res> extends _$ChatRoomModelCopyWithImpl<$Res, _$ChatRoomModelImpl> implements _$$ChatRoomModelImplCopyWith<$Res> {
|
||||
__$$ChatRoomModelImplCopyWithImpl(_$ChatRoomModelImpl _value, $Res Function(_$ChatRoomModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -144,13 +123,10 @@ class __$$ChatRoomModelImplCopyWithImpl<$Res>
|
||||
@JsonSerializable()
|
||||
class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
const _$ChatRoomModelImpl(
|
||||
{required this.id,
|
||||
@JsonKey(name: 'chat_room_setting') required this.chatRoomSettings,
|
||||
required final Map<String, ChatUserModel> users})
|
||||
{required this.id, @JsonKey(name: 'chat_room_setting') required this.chatRoomSettings, required final Map<String, ChatUserModel> users})
|
||||
: _users = users;
|
||||
|
||||
factory _$ChatRoomModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatRoomModelImplFromJson(json);
|
||||
factory _$ChatRoomModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatRoomModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String id;
|
||||
@@ -176,21 +152,18 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomModelImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.chatRoomSettings, chatRoomSettings) ||
|
||||
other.chatRoomSettings == chatRoomSettings) &&
|
||||
(identical(other.chatRoomSettings, chatRoomSettings) || other.chatRoomSettings == chatRoomSettings) &&
|
||||
const DeepCollectionEquality().equals(other._users, _users));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, chatRoomSettings,
|
||||
const DeepCollectionEquality().hash(_users));
|
||||
int get hashCode => Object.hash(runtimeType, id, chatRoomSettings, const DeepCollectionEquality().hash(_users));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
|
||||
__$$ChatRoomModelImplCopyWithImpl<_$ChatRoomModelImpl>(this, _$identity);
|
||||
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith => __$$ChatRoomModelImplCopyWithImpl<_$ChatRoomModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -203,12 +176,10 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
abstract class _ChatRoomModel implements ChatRoomModel {
|
||||
const factory _ChatRoomModel(
|
||||
{required final String id,
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
required final ChatRoomSettingsModel chatRoomSettings,
|
||||
@JsonKey(name: 'chat_room_setting') required final ChatRoomSettingsModel chatRoomSettings,
|
||||
required final Map<String, ChatUserModel> users}) = _$ChatRoomModelImpl;
|
||||
|
||||
factory _ChatRoomModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatRoomModelImpl.fromJson;
|
||||
factory _ChatRoomModel.fromJson(Map<String, dynamic> json) = _$ChatRoomModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get id;
|
||||
@@ -219,6 +190,5 @@ abstract class _ChatRoomModel implements ChatRoomModel {
|
||||
Map<String, ChatUserModel> get users;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,19 +6,15 @@ part of 'chat_room_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatRoomModelImpl _$$ChatRoomModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ChatRoomModelImpl(
|
||||
_$ChatRoomModelImpl _$$ChatRoomModelImplFromJson(Map<String, dynamic> json) => _$ChatRoomModelImpl(
|
||||
id: json['id'] as String,
|
||||
chatRoomSettings: ChatRoomSettingsModel.fromJson(
|
||||
json['chat_room_setting'] as Map<String, dynamic>),
|
||||
chatRoomSettings: ChatRoomSettingsModel.fromJson(json['chat_room_setting'] as Map<String, dynamic>),
|
||||
users: (json['users'] as Map<String, dynamic>).map(
|
||||
(k, e) =>
|
||||
MapEntry(k, ChatUserModel.fromJson(e as Map<String, dynamic>)),
|
||||
(k, e) => MapEntry(k, ChatUserModel.fromJson(e as Map<String, dynamic>)),
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatRoomModelImplToJson(_$ChatRoomModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatRoomModelImplToJson(_$ChatRoomModelImpl instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'chat_room_setting': instance.chatRoomSettings,
|
||||
'users': instance.users,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'chat_room_settings_model.freezed.dart';
|
||||
|
||||
part 'chat_room_settings_model.g.dart';
|
||||
|
||||
@freezed
|
||||
|
||||
@@ -14,8 +14,7 @@ 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');
|
||||
|
||||
ChatRoomSettingsModel _$ChatRoomSettingsModelFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
ChatRoomSettingsModel _$ChatRoomSettingsModelFromJson(Map<String, dynamic> json) {
|
||||
return _ChatRoomSettingsModel.fromJson(json);
|
||||
}
|
||||
|
||||
@@ -32,14 +31,12 @@ mixin _$ChatRoomSettingsModel {
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$ChatRoomSettingsModelCopyWith<ChatRoomSettingsModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$ChatRoomSettingsModelCopyWith<ChatRoomSettingsModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
factory $ChatRoomSettingsModelCopyWith(ChatRoomSettingsModel value,
|
||||
$Res Function(ChatRoomSettingsModel) then) =
|
||||
factory $ChatRoomSettingsModelCopyWith(ChatRoomSettingsModel value, $Res Function(ChatRoomSettingsModel) then) =
|
||||
_$ChatRoomSettingsModelCopyWithImpl<$Res, ChatRoomSettingsModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -51,9 +48,7 @@ abstract class $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatRoomSettingsModelCopyWithImpl<$Res,
|
||||
$Val extends ChatRoomSettingsModel>
|
||||
implements $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
class _$ChatRoomSettingsModelCopyWithImpl<$Res, $Val extends ChatRoomSettingsModel> implements $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
_$ChatRoomSettingsModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
@@ -96,11 +91,8 @@ class _$ChatRoomSettingsModelCopyWithImpl<$Res,
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomSettingsModelImplCopyWith<$Res>
|
||||
implements $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
factory _$$ChatRoomSettingsModelImplCopyWith(
|
||||
_$ChatRoomSettingsModelImpl value,
|
||||
$Res Function(_$ChatRoomSettingsModelImpl) then) =
|
||||
abstract class _$$ChatRoomSettingsModelImplCopyWith<$Res> implements $ChatRoomSettingsModelCopyWith<$Res> {
|
||||
factory _$$ChatRoomSettingsModelImplCopyWith(_$ChatRoomSettingsModelImpl value, $Res Function(_$ChatRoomSettingsModelImpl) then) =
|
||||
__$$ChatRoomSettingsModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
@@ -113,13 +105,9 @@ abstract class _$$ChatRoomSettingsModelImplCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomSettingsModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomSettingsModelCopyWithImpl<$Res,
|
||||
_$ChatRoomSettingsModelImpl>
|
||||
class __$$ChatRoomSettingsModelImplCopyWithImpl<$Res> extends _$ChatRoomSettingsModelCopyWithImpl<$Res, _$ChatRoomSettingsModelImpl>
|
||||
implements _$$ChatRoomSettingsModelImplCopyWith<$Res> {
|
||||
__$$ChatRoomSettingsModelImplCopyWithImpl(_$ChatRoomSettingsModelImpl _value,
|
||||
$Res Function(_$ChatRoomSettingsModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$ChatRoomSettingsModelImplCopyWithImpl(_$ChatRoomSettingsModelImpl _value, $Res Function(_$ChatRoomSettingsModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -165,8 +153,7 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
|
||||
@JsonKey(name: 'access_level') required this.accessLevel,
|
||||
@JsonKey(name: 'updated_at') required this.updatedAt});
|
||||
|
||||
factory _$ChatRoomSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatRoomSettingsModelImplFromJson(json);
|
||||
factory _$ChatRoomSettingsModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatRoomSettingsModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -193,26 +180,21 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomSettingsModelImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.roomName, roomName) ||
|
||||
other.roomName == roomName) &&
|
||||
(identical(other.roomName, roomName) || other.roomName == roomName) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.accessLevel, accessLevel) ||
|
||||
other.accessLevel == accessLevel) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt));
|
||||
(identical(other.accessLevel, accessLevel) || other.accessLevel == accessLevel) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, roomName, state, accessLevel, updatedAt);
|
||||
int get hashCode => Object.hash(runtimeType, id, roomName, state, accessLevel, updatedAt);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
|
||||
get copyWith => __$$ChatRoomSettingsModelImplCopyWithImpl<
|
||||
_$ChatRoomSettingsModelImpl>(this, _$identity);
|
||||
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl> get copyWith =>
|
||||
__$$ChatRoomSettingsModelImplCopyWithImpl<_$ChatRoomSettingsModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -224,15 +206,13 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
|
||||
|
||||
abstract class _ChatRoomSettingsModel implements ChatRoomSettingsModel {
|
||||
const factory _ChatRoomSettingsModel(
|
||||
{required final int id,
|
||||
@JsonKey(name: 'room_name') required final String roomName,
|
||||
required final String state,
|
||||
@JsonKey(name: 'access_level') required final String accessLevel,
|
||||
@JsonKey(name: 'updated_at') required final String updatedAt}) =
|
||||
_$ChatRoomSettingsModelImpl;
|
||||
{required final int id,
|
||||
@JsonKey(name: 'room_name') required final String roomName,
|
||||
required final String state,
|
||||
@JsonKey(name: 'access_level') required final String accessLevel,
|
||||
@JsonKey(name: 'updated_at') required final String updatedAt}) = _$ChatRoomSettingsModelImpl;
|
||||
|
||||
factory _ChatRoomSettingsModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatRoomSettingsModelImpl.fromJson;
|
||||
factory _ChatRoomSettingsModel.fromJson(Map<String, dynamic> json) = _$ChatRoomSettingsModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
@@ -249,6 +229,5 @@ abstract class _ChatRoomSettingsModel implements ChatRoomSettingsModel {
|
||||
String get updatedAt;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@ part of 'chat_room_settings_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ChatRoomSettingsModelImpl(
|
||||
_$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson(Map<String, dynamic> json) => _$ChatRoomSettingsModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
roomName: json['room_name'] as String,
|
||||
state: json['state'] as String,
|
||||
@@ -16,9 +14,7 @@ _$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson(
|
||||
updatedAt: json['updated_at'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatRoomSettingsModelImplToJson(
|
||||
_$ChatRoomSettingsModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatRoomSettingsModelImplToJson(_$ChatRoomSettingsModelImpl instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'room_name': instance.roomName,
|
||||
'state': instance.state,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'chat_user_model.freezed.dart';
|
||||
|
||||
part 'chat_user_model.g.dart';
|
||||
|
||||
@freezed
|
||||
@@ -9,10 +8,8 @@ class ChatUserModel with _$ChatUserModel {
|
||||
const factory ChatUserModel({
|
||||
required int id,
|
||||
required String name,
|
||||
@JsonKey(name: 'profile_photo_path')
|
||||
String? profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url')
|
||||
String? profilePhotoUrl,
|
||||
@JsonKey(name: 'profile_photo_path') String? profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') String? profilePhotoUrl,
|
||||
}) = _ChatUserModel;
|
||||
|
||||
factory ChatUserModel.fromJson(Map<String, Object?> json) => _$ChatUserModelFromJson(json);
|
||||
|
||||
@@ -29,26 +29,18 @@ mixin _$ChatUserModel {
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$ChatUserModelCopyWith<ChatUserModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$ChatUserModelCopyWith<ChatUserModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatUserModelCopyWith<$Res> {
|
||||
factory $ChatUserModelCopyWith(
|
||||
ChatUserModel value, $Res Function(ChatUserModel) then) =
|
||||
_$ChatUserModelCopyWithImpl<$Res, ChatUserModel>;
|
||||
factory $ChatUserModelCopyWith(ChatUserModel value, $Res Function(ChatUserModel) then) = _$ChatUserModelCopyWithImpl<$Res, ChatUserModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
String name,
|
||||
@JsonKey(name: 'profile_photo_path') String? profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') String? profilePhotoUrl});
|
||||
$Res call({int id, String name, @JsonKey(name: 'profile_photo_path') String? profilePhotoPath, @JsonKey(name: 'profile_photo_url') String? profilePhotoUrl});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel>
|
||||
implements $ChatUserModelCopyWith<$Res> {
|
||||
class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel> implements $ChatUserModelCopyWith<$Res> {
|
||||
_$ChatUserModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
@@ -86,27 +78,16 @@ class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatUserModelImplCopyWith<$Res>
|
||||
implements $ChatUserModelCopyWith<$Res> {
|
||||
factory _$$ChatUserModelImplCopyWith(
|
||||
_$ChatUserModelImpl value, $Res Function(_$ChatUserModelImpl) then) =
|
||||
__$$ChatUserModelImplCopyWithImpl<$Res>;
|
||||
abstract class _$$ChatUserModelImplCopyWith<$Res> implements $ChatUserModelCopyWith<$Res> {
|
||||
factory _$$ChatUserModelImplCopyWith(_$ChatUserModelImpl value, $Res Function(_$ChatUserModelImpl) then) = __$$ChatUserModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
String name,
|
||||
@JsonKey(name: 'profile_photo_path') String? profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') String? profilePhotoUrl});
|
||||
$Res call({int id, String name, @JsonKey(name: 'profile_photo_path') String? profilePhotoPath, @JsonKey(name: 'profile_photo_url') String? profilePhotoUrl});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatUserModelImplCopyWithImpl<$Res>
|
||||
extends _$ChatUserModelCopyWithImpl<$Res, _$ChatUserModelImpl>
|
||||
implements _$$ChatUserModelImplCopyWith<$Res> {
|
||||
__$$ChatUserModelImplCopyWithImpl(
|
||||
_$ChatUserModelImpl _value, $Res Function(_$ChatUserModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$ChatUserModelImplCopyWithImpl<$Res> extends _$ChatUserModelCopyWithImpl<$Res, _$ChatUserModelImpl> implements _$$ChatUserModelImplCopyWith<$Res> {
|
||||
__$$ChatUserModelImplCopyWithImpl(_$ChatUserModelImpl _value, $Res Function(_$ChatUserModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -146,8 +127,7 @@ class _$ChatUserModelImpl implements _ChatUserModel {
|
||||
@JsonKey(name: 'profile_photo_path') this.profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') this.profilePhotoUrl});
|
||||
|
||||
factory _$ChatUserModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatUserModelImplFromJson(json);
|
||||
factory _$ChatUserModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatUserModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -172,22 +152,18 @@ class _$ChatUserModelImpl implements _ChatUserModel {
|
||||
other is _$ChatUserModelImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.profilePhotoPath, profilePhotoPath) ||
|
||||
other.profilePhotoPath == profilePhotoPath) &&
|
||||
(identical(other.profilePhotoUrl, profilePhotoUrl) ||
|
||||
other.profilePhotoUrl == profilePhotoUrl));
|
||||
(identical(other.profilePhotoPath, profilePhotoPath) || other.profilePhotoPath == profilePhotoPath) &&
|
||||
(identical(other.profilePhotoUrl, profilePhotoUrl) || other.profilePhotoUrl == profilePhotoUrl));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
|
||||
int get hashCode => Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
|
||||
__$$ChatUserModelImplCopyWithImpl<_$ChatUserModelImpl>(this, _$identity);
|
||||
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith => __$$ChatUserModelImplCopyWithImpl<_$ChatUserModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -199,14 +175,12 @@ class _$ChatUserModelImpl implements _ChatUserModel {
|
||||
|
||||
abstract class _ChatUserModel implements ChatUserModel {
|
||||
const factory _ChatUserModel(
|
||||
{required final int id,
|
||||
required final String name,
|
||||
@JsonKey(name: 'profile_photo_path') final String? profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') final String? profilePhotoUrl}) =
|
||||
_$ChatUserModelImpl;
|
||||
{required final int id,
|
||||
required final String name,
|
||||
@JsonKey(name: 'profile_photo_path') final String? profilePhotoPath,
|
||||
@JsonKey(name: 'profile_photo_url') final String? profilePhotoUrl}) = _$ChatUserModelImpl;
|
||||
|
||||
factory _ChatUserModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatUserModelImpl.fromJson;
|
||||
factory _ChatUserModel.fromJson(Map<String, dynamic> json) = _$ChatUserModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
@@ -220,6 +194,5 @@ abstract class _ChatUserModel implements ChatUserModel {
|
||||
String? get profilePhotoUrl;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,16 +6,14 @@ part of 'chat_user_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatUserModelImpl _$$ChatUserModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ChatUserModelImpl(
|
||||
_$ChatUserModelImpl _$$ChatUserModelImplFromJson(Map<String, dynamic> json) => _$ChatUserModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
profilePhotoPath: json['profile_photo_path'] as String?,
|
||||
profilePhotoUrl: json['profile_photo_url'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatUserModelImplToJson(_$ChatUserModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$ChatUserModelImplToJson(_$ChatUserModelImpl instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'profile_photo_path': instance.profilePhotoPath,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'websocket_info_model.freezed.dart';
|
||||
|
||||
part 'websocket_info_model.g.dart';
|
||||
|
||||
@freezed
|
||||
@@ -11,8 +10,7 @@ class WebsocketInfoModel with _$WebsocketInfoModel {
|
||||
required String host,
|
||||
required String port,
|
||||
required String cluster,
|
||||
@JsonKey(name: 'user_id')
|
||||
required int userId,
|
||||
@JsonKey(name: 'user_id') required int userId,
|
||||
}) = _WebsocketInfoModel;
|
||||
|
||||
factory WebsocketInfoModel.fromJson(Map<String, Object?> json) => _$WebsocketInfoModelFromJson(json);
|
||||
|
||||
@@ -29,27 +29,19 @@ mixin _$WebsocketInfoModel {
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$WebsocketInfoModelCopyWith<WebsocketInfoModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
$WebsocketInfoModelCopyWith<WebsocketInfoModel> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $WebsocketInfoModelCopyWith<$Res> {
|
||||
factory $WebsocketInfoModelCopyWith(
|
||||
WebsocketInfoModel value, $Res Function(WebsocketInfoModel) then) =
|
||||
factory $WebsocketInfoModelCopyWith(WebsocketInfoModel value, $Res Function(WebsocketInfoModel) then) =
|
||||
_$WebsocketInfoModelCopyWithImpl<$Res, WebsocketInfoModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String key,
|
||||
String host,
|
||||
String port,
|
||||
String cluster,
|
||||
@JsonKey(name: 'user_id') int userId});
|
||||
$Res call({String key, String host, String port, String cluster, @JsonKey(name: 'user_id') int userId});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel>
|
||||
implements $WebsocketInfoModelCopyWith<$Res> {
|
||||
class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel> implements $WebsocketInfoModelCopyWith<$Res> {
|
||||
_$WebsocketInfoModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
@@ -92,28 +84,18 @@ class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$WebsocketInfoModelImplCopyWith<$Res>
|
||||
implements $WebsocketInfoModelCopyWith<$Res> {
|
||||
factory _$$WebsocketInfoModelImplCopyWith(_$WebsocketInfoModelImpl value,
|
||||
$Res Function(_$WebsocketInfoModelImpl) then) =
|
||||
abstract class _$$WebsocketInfoModelImplCopyWith<$Res> implements $WebsocketInfoModelCopyWith<$Res> {
|
||||
factory _$$WebsocketInfoModelImplCopyWith(_$WebsocketInfoModelImpl value, $Res Function(_$WebsocketInfoModelImpl) then) =
|
||||
__$$WebsocketInfoModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String key,
|
||||
String host,
|
||||
String port,
|
||||
String cluster,
|
||||
@JsonKey(name: 'user_id') int userId});
|
||||
$Res call({String key, String host, String port, String cluster, @JsonKey(name: 'user_id') int userId});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$WebsocketInfoModelImplCopyWithImpl<$Res>
|
||||
extends _$WebsocketInfoModelCopyWithImpl<$Res, _$WebsocketInfoModelImpl>
|
||||
class __$$WebsocketInfoModelImplCopyWithImpl<$Res> extends _$WebsocketInfoModelCopyWithImpl<$Res, _$WebsocketInfoModelImpl>
|
||||
implements _$$WebsocketInfoModelImplCopyWith<$Res> {
|
||||
__$$WebsocketInfoModelImplCopyWithImpl(_$WebsocketInfoModelImpl _value,
|
||||
$Res Function(_$WebsocketInfoModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$WebsocketInfoModelImplCopyWithImpl(_$WebsocketInfoModelImpl _value, $Res Function(_$WebsocketInfoModelImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -153,14 +135,9 @@ class __$$WebsocketInfoModelImplCopyWithImpl<$Res>
|
||||
@JsonSerializable()
|
||||
class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
|
||||
const _$WebsocketInfoModelImpl(
|
||||
{required this.key,
|
||||
required this.host,
|
||||
required this.port,
|
||||
required this.cluster,
|
||||
@JsonKey(name: 'user_id') required this.userId});
|
||||
{required this.key, required this.host, required this.port, required this.cluster, @JsonKey(name: 'user_id') required this.userId});
|
||||
|
||||
factory _$WebsocketInfoModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$WebsocketInfoModelImplFromJson(json);
|
||||
factory _$WebsocketInfoModelImpl.fromJson(Map<String, dynamic> json) => _$$WebsocketInfoModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String key;
|
||||
@@ -193,15 +170,13 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, key, host, port, cluster, userId);
|
||||
int get hashCode => Object.hash(runtimeType, key, host, port, cluster, userId);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
|
||||
__$$WebsocketInfoModelImplCopyWithImpl<_$WebsocketInfoModelImpl>(
|
||||
this, _$identity);
|
||||
__$$WebsocketInfoModelImplCopyWithImpl<_$WebsocketInfoModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -213,15 +188,13 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
|
||||
|
||||
abstract class _WebsocketInfoModel implements WebsocketInfoModel {
|
||||
const factory _WebsocketInfoModel(
|
||||
{required final String key,
|
||||
required final String host,
|
||||
required final String port,
|
||||
required final String cluster,
|
||||
@JsonKey(name: 'user_id') required final int userId}) =
|
||||
_$WebsocketInfoModelImpl;
|
||||
{required final String key,
|
||||
required final String host,
|
||||
required final String port,
|
||||
required final String cluster,
|
||||
@JsonKey(name: 'user_id') required final int userId}) = _$WebsocketInfoModelImpl;
|
||||
|
||||
factory _WebsocketInfoModel.fromJson(Map<String, dynamic> json) =
|
||||
_$WebsocketInfoModelImpl.fromJson;
|
||||
factory _WebsocketInfoModel.fromJson(Map<String, dynamic> json) = _$WebsocketInfoModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get key;
|
||||
@@ -236,6 +209,5 @@ abstract class _WebsocketInfoModel implements WebsocketInfoModel {
|
||||
int get userId;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@ part of 'websocket_info_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$WebsocketInfoModelImpl(
|
||||
_$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson(Map<String, dynamic> json) => _$WebsocketInfoModelImpl(
|
||||
key: json['key'] as String,
|
||||
host: json['host'] as String,
|
||||
port: json['port'] as String,
|
||||
@@ -16,9 +14,7 @@ _$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson(
|
||||
userId: (json['user_id'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$WebsocketInfoModelImplToJson(
|
||||
_$WebsocketInfoModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
Map<String, dynamic> _$$WebsocketInfoModelImplToJson(_$WebsocketInfoModelImpl instance) => <String, dynamic>{
|
||||
'key': instance.key,
|
||||
'host': instance.host,
|
||||
'port': instance.port,
|
||||
|
||||
@@ -20,9 +20,7 @@ mixin _$ChatRoomState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@@ -30,9 +28,7 @@ mixin _$ChatRoomState {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@@ -40,9 +36,7 @@ mixin _$ChatRoomState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
@@ -76,14 +70,11 @@ mixin _$ChatRoomState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChatRoomStateCopyWith<$Res> {
|
||||
factory $ChatRoomStateCopyWith(
|
||||
ChatRoomState value, $Res Function(ChatRoomState) then) =
|
||||
_$ChatRoomStateCopyWithImpl<$Res, ChatRoomState>;
|
||||
factory $ChatRoomStateCopyWith(ChatRoomState value, $Res Function(ChatRoomState) then) = _$ChatRoomStateCopyWithImpl<$Res, ChatRoomState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState>
|
||||
implements $ChatRoomStateCopyWith<$Res> {
|
||||
class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState> implements $ChatRoomStateCopyWith<$Res> {
|
||||
_$ChatRoomStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
@@ -94,18 +85,12 @@ class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState>
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateImplCopyWith(
|
||||
_$ChatRoomStateImpl value, $Res Function(_$ChatRoomStateImpl) then) =
|
||||
__$$ChatRoomStateImplCopyWithImpl<$Res>;
|
||||
factory _$$ChatRoomStateImplCopyWith(_$ChatRoomStateImpl value, $Res Function(_$ChatRoomStateImpl) then) = __$$ChatRoomStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateImpl>
|
||||
implements _$$ChatRoomStateImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateImplCopyWithImpl(
|
||||
_$ChatRoomStateImpl _value, $Res Function(_$ChatRoomStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
class __$$ChatRoomStateImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateImpl> implements _$$ChatRoomStateImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateImplCopyWithImpl(_$ChatRoomStateImpl _value, $Res Function(_$ChatRoomStateImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -120,8 +105,7 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$ChatRoomStateImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChatRoomStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -132,9 +116,7 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return $default();
|
||||
@@ -145,9 +127,7 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return $default?.call();
|
||||
@@ -158,9 +138,7 @@ class _$ChatRoomStateImpl implements _ChatRoomState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -214,18 +192,14 @@ abstract class _ChatRoomState implements ChatRoomState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateLoadingImplCopyWith(_$ChatRoomStateLoadingImpl value,
|
||||
$Res Function(_$ChatRoomStateLoadingImpl) then) =
|
||||
factory _$$ChatRoomStateLoadingImplCopyWith(_$ChatRoomStateLoadingImpl value, $Res Function(_$ChatRoomStateLoadingImpl) then) =
|
||||
__$$ChatRoomStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadingImpl>
|
||||
class __$$ChatRoomStateLoadingImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadingImpl>
|
||||
implements _$$ChatRoomStateLoadingImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateLoadingImplCopyWithImpl(_$ChatRoomStateLoadingImpl _value,
|
||||
$Res Function(_$ChatRoomStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$ChatRoomStateLoadingImplCopyWithImpl(_$ChatRoomStateLoadingImpl _value, $Res Function(_$ChatRoomStateLoadingImpl) _then) : super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -240,9 +214,7 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomStateLoadingImpl);
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChatRoomStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -253,9 +225,7 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loading();
|
||||
@@ -266,9 +236,7 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loading?.call();
|
||||
@@ -279,9 +247,7 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -335,26 +301,18 @@ abstract class ChatRoomStateLoading implements ChatRoomState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateLoadedImplCopyWith(_$ChatRoomStateLoadedImpl value,
|
||||
$Res Function(_$ChatRoomStateLoadedImpl) then) =
|
||||
factory _$$ChatRoomStateLoadedImplCopyWith(_$ChatRoomStateLoadedImpl value, $Res Function(_$ChatRoomStateLoadedImpl) then) =
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool isTyping,
|
||||
bool isLoading});
|
||||
$Res call({ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading});
|
||||
|
||||
$ChatRoomModelCopyWith<$Res> get chatRoom;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadedImpl>
|
||||
class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadedImpl>
|
||||
implements _$$ChatRoomStateLoadedImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl(_$ChatRoomStateLoadedImpl _value,
|
||||
$Res Function(_$ChatRoomStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl(_$ChatRoomStateLoadedImpl _value, $Res Function(_$ChatRoomStateLoadedImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -396,11 +354,7 @@ class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
|
||||
class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
||||
const _$ChatRoomStateLoadedImpl(
|
||||
{required this.chatRoom,
|
||||
required final List<ChatMessageModel> chatMessages,
|
||||
required this.isTyping,
|
||||
required this.isLoading})
|
||||
const _$ChatRoomStateLoadedImpl({required this.chatRoom, required final List<ChatMessageModel> chatMessages, required this.isTyping, required this.isLoading})
|
||||
: _chatMessages = chatMessages;
|
||||
|
||||
@override
|
||||
@@ -428,35 +382,27 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomStateLoadedImpl &&
|
||||
(identical(other.chatRoom, chatRoom) ||
|
||||
other.chatRoom == chatRoom) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._chatMessages, _chatMessages) &&
|
||||
(identical(other.isTyping, isTyping) ||
|
||||
other.isTyping == isTyping) &&
|
||||
(identical(other.isLoading, isLoading) ||
|
||||
other.isLoading == isLoading));
|
||||
(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom) &&
|
||||
const DeepCollectionEquality().equals(other._chatMessages, _chatMessages) &&
|
||||
(identical(other.isTyping, isTyping) || other.isTyping == isTyping) &&
|
||||
(identical(other.isLoading, isLoading) || other.isLoading == isLoading));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, chatRoom,
|
||||
const DeepCollectionEquality().hash(_chatMessages), isTyping, isLoading);
|
||||
int get hashCode => Object.hash(runtimeType, chatRoom, const DeepCollectionEquality().hash(_chatMessages), isTyping, isLoading);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl<_$ChatRoomStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
__$$ChatRoomStateLoadedImplCopyWithImpl<_$ChatRoomStateLoadedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loaded(chatRoom, chatMessages, isTyping, isLoading);
|
||||
@@ -467,9 +413,7 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loaded?.call(chatRoom, chatMessages, isTyping, isLoading);
|
||||
@@ -480,9 +424,7 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -542,26 +484,21 @@ abstract class ChatRoomStateLoaded implements ChatRoomState {
|
||||
bool get isTyping;
|
||||
bool get isLoading;
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatRoomStateErrorImplCopyWith<$Res> {
|
||||
factory _$$ChatRoomStateErrorImplCopyWith(_$ChatRoomStateErrorImpl value,
|
||||
$Res Function(_$ChatRoomStateErrorImpl) then) =
|
||||
factory _$$ChatRoomStateErrorImplCopyWith(_$ChatRoomStateErrorImpl value, $Res Function(_$ChatRoomStateErrorImpl) then) =
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChatRoomStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateErrorImpl>
|
||||
class __$$ChatRoomStateErrorImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateErrorImpl>
|
||||
implements _$$ChatRoomStateErrorImplCopyWith<$Res> {
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl(_$ChatRoomStateErrorImpl _value,
|
||||
$Res Function(_$ChatRoomStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl(_$ChatRoomStateErrorImpl _value, $Res Function(_$ChatRoomStateErrorImpl) _then) : super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
@@ -595,8 +532,7 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChatRoomStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -606,17 +542,14 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl<_$ChatRoomStateErrorImpl>(
|
||||
this, _$identity);
|
||||
__$$ChatRoomStateErrorImplCopyWithImpl<_$ChatRoomStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading) loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return error(errorMessage);
|
||||
@@ -627,9 +560,7 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return error?.call(errorMessage);
|
||||
@@ -640,9 +571,7 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(ChatRoomModel chatRoom, List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)? loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -691,11 +620,9 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
|
||||
}
|
||||
|
||||
abstract class ChatRoomStateError implements ChatRoomState {
|
||||
const factory ChatRoomStateError({required final String errorMessage}) =
|
||||
_$ChatRoomStateErrorImpl;
|
||||
const factory ChatRoomStateError({required final String errorMessage}) = _$ChatRoomStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/bloc/chat_room_cubit/chat_room_state.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/widgets/chat_bubble_widget.dart';
|
||||
import 'package:eatvio_app/locator_service.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lazy_load_scrollview/lazy_load_scrollview.dart';
|
||||
|
||||
@@ -155,9 +155,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
children: [
|
||||
SizedBox(width: 8),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
|
||||
},
|
||||
onTap: () {},
|
||||
borderRadius: BorderRadiusStyle.circleBorder17,
|
||||
child: Ink(
|
||||
height: 32,
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:eatvio_app/app_router.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/models/chat_entry.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/models/chat_select_model.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'dart:convert';
|
||||
|
||||
import '/core/app_export.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
part 'chat_select_event.dart';
|
||||
|
||||
part 'chat_select_state.dart';
|
||||
|
||||
/// A bloc that manages the state of a ChatSelect according to the event that is dispatched to it.
|
||||
@@ -59,7 +59,7 @@ class ChatSelectBloc extends Bloc<ChatSelectEvent, ChatSelectState> {
|
||||
AppRouter.navigatorKey.currentContext?.goNamed('authScreen');
|
||||
}
|
||||
final response = await http.get(
|
||||
Uri.parse(dotenv.env['SERVER_ROOT']! + '/chat/index'),
|
||||
Uri.parse(baseUrl + '/api/chat/index'),
|
||||
headers: {
|
||||
'Authorization': 'Bearer $token',
|
||||
},
|
||||
|
||||
@@ -20,8 +20,7 @@ class ChatSelectState extends Equatable {
|
||||
}
|
||||
|
||||
class ChatSelectInitialState extends ChatSelectState {
|
||||
ChatSelectInitialState({required ChatSelectModel chatSelectModelObj})
|
||||
: super(chatSelectModelObj: chatSelectModelObj);
|
||||
ChatSelectInitialState({required ChatSelectModel chatSelectModelObj}) : super(chatSelectModelObj: chatSelectModelObj);
|
||||
}
|
||||
|
||||
class ChatSelectLoadedState extends ChatSelectState {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomSearchView extends StatelessWidget {
|
||||
CustomSearchView({
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/models/chat_entry.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/widgets/chat_entry_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'bloc/chat_select_bloc.dart';
|
||||
import 'models/chat_select_model.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'chat_search_view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'bloc/chat_select_bloc.dart';
|
||||
import 'chat_search_view.dart';
|
||||
import 'models/chat_select_model.dart';
|
||||
|
||||
class ChatSelectScreen extends StatelessWidget {
|
||||
const ChatSelectScreen({Key? key}) : super(key: key);
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// ignore_for_file: must_be_immutable
|
||||
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/models/chat_entry.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
class ChatEntryWidget extends StatelessWidget {
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:dismissible_page/dismissible_page.dart';
|
||||
import 'package:eatvio_app/core/app_export.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:photo_view/photo_view.dart';
|
||||
import 'package:photo_view/photo_view_gallery.dart';
|
||||
@@ -84,7 +83,7 @@ class _PhotoViewScreenState extends State<PhotoViewScreen> {
|
||||
color: Colors.white,
|
||||
),
|
||||
title: Text(
|
||||
widget.imageUrls[index].replaceAll(dotenv.env['STORAGE_URL']! + 'chat_files/', ''),
|
||||
widget.imageUrls[index].replaceAll(baseUrl + '/storage/' + 'chat_files/', ''),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:dismissible_page/dismissible_page.dart';
|
||||
import 'package:eatvio_app/core/constants/constants.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart';
|
||||
import 'package:eatvio_app/theme/app_decoration.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class ChatBubbleWidget extends StatelessWidget {
|
||||
@@ -48,7 +48,7 @@ class ChatBubbleWidget extends StatelessWidget {
|
||||
contentPadding: EdgeInsets.zero,
|
||||
horizontalTitleGap: 8,
|
||||
onTap: () async {
|
||||
if (!await launchUrl(Uri.parse(dotenv.env['STORAGE_URL']! + mediaData[index].toString()))) {
|
||||
if (!await launchUrl(Uri.parse(baseUrl + '/storage/' + mediaData[index].toString()))) {
|
||||
throw Exception('Could not launch ${mediaData[index].toString()}');
|
||||
}
|
||||
},
|
||||
@@ -75,18 +75,18 @@ class ChatBubbleWidget extends StatelessWidget {
|
||||
onTap: () {
|
||||
context.pushTransparentRoute(
|
||||
PhotoViewScreen(
|
||||
imageUrls: mediaData.map((e) => dotenv.env['STORAGE_URL']! + e.toString()).toList(),
|
||||
imageUrls: mediaData.map((e) => baseUrl + '/storage/' + e.toString()).toList(),
|
||||
index: index,
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Hero(
|
||||
tag: dotenv.env['STORAGE_URL']! + '${mediaData[index]}',
|
||||
tag: baseUrl + '/storage/' + '${mediaData[index]}',
|
||||
transitionOnUserGestures: true,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadiusStyle.roundedBorder8,
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: dotenv.env['STORAGE_URL']! + '${mediaData[index]}',
|
||||
imageUrl: baseUrl + '/storage/' + '${mediaData[index]}',
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:eatvio_app/features/chat/models/chat_messages_model.dart';
|
||||
import 'package:eatvio_app/features/chat/models/chat_room_model.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:eatvio_app/features/chat/models/websocket_info_model.dart';
|
||||
import 'package:retrofit/retrofit.dart';
|
||||
|
||||
@@ -12,24 +12,24 @@ part 'chat_service.g.dart';
|
||||
abstract class ChatService {
|
||||
factory ChatService(Dio dio, {String baseUrl}) = _ChatService;
|
||||
|
||||
@GET('/chat/show/{id}')
|
||||
@GET('/api/chat/show/{id}')
|
||||
Future<Map<String, ChatRoomModel>> getChatRoom({
|
||||
@Path() required String id,
|
||||
});
|
||||
|
||||
@POST('/chat/{id}/message/send')
|
||||
@POST('/api/chat/{id}/message/send')
|
||||
Future<void> sendMessage({
|
||||
@Path() required String id,
|
||||
@Part() String? data,
|
||||
@Part() List<File>? filesList,
|
||||
});
|
||||
|
||||
@GET('/chat/show/{id}/messages?page={page}')
|
||||
@GET('/api/chat/show/{id}/messages?page={page}')
|
||||
Future<ChatMessagesModel> getChatMessages({
|
||||
@Path() required String id,
|
||||
@Path() required int page,
|
||||
});
|
||||
|
||||
@GET('/profile/ws/params')
|
||||
@GET('/api/profile/ws/params')
|
||||
Future<WebsocketInfoModel> getWebsocket();
|
||||
}
|
||||
|
||||
@@ -24,25 +24,23 @@ class _ChatService implements ChatService {
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(
|
||||
_setStreamType<Map<String, ChatRoomModel>>(Options(
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<Map<String, ChatRoomModel>>(Options(
|
||||
method: 'GET',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/chat/show/${id}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
var _value = _result.data!.map((k, dynamic v) =>
|
||||
MapEntry(k, ChatRoomModel.fromJson(v as Map<String, dynamic>)));
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/chat/show/${id}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
var _value = _result.data!.map((k, dynamic v) => MapEntry(k, ChatRoomModel.fromJson(v as Map<String, dynamic>)));
|
||||
return _value;
|
||||
}
|
||||
|
||||
@@ -78,7 +76,7 @@ class _ChatService implements ChatService {
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/chat/${id}/message/send',
|
||||
'/api/chat/${id}/message/send',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
@@ -98,23 +96,22 @@ class _ChatService implements ChatService {
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _result = await _dio
|
||||
.fetch<Map<String, dynamic>>(_setStreamType<ChatMessagesModel>(Options(
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<ChatMessagesModel>(Options(
|
||||
method: 'GET',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/chat/show/${id}/messages?page=${page}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/chat/show/${id}/messages?page=${page}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
final _value = ChatMessagesModel.fromJson(_result.data!);
|
||||
return _value;
|
||||
}
|
||||
@@ -125,31 +122,28 @@ class _ChatService implements ChatService {
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _result = await _dio
|
||||
.fetch<Map<String, dynamic>>(_setStreamType<WebsocketInfoModel>(Options(
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<WebsocketInfoModel>(Options(
|
||||
method: 'GET',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/profile/ws/params',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/profile/ws/params',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(
|
||||
baseUrl: _combineBaseUrls(
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
))));
|
||||
final _value = WebsocketInfoModel.fromJson(_result.data!);
|
||||
return _value;
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user