forked from eatvio/eatvio_app
feat(order info): added order info screen
This commit is contained in:
@@ -12,8 +12,7 @@ part of 'chat_message_model.dart';
|
||||
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',
|
||||
);
|
||||
'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');
|
||||
|
||||
ChatMessageModel _$ChatMessageModelFromJson(Map<String, dynamic> json) {
|
||||
return _ChatMessageModel.fromJson(json);
|
||||
@@ -49,20 +48,18 @@ mixin _$ChatMessageModel {
|
||||
/// @nodoc
|
||||
abstract class $ChatMessageModelCopyWith<$Res> {
|
||||
factory $ChatMessageModelCopyWith(
|
||||
ChatMessageModel value,
|
||||
$Res Function(ChatMessageModel) then,
|
||||
) = _$ChatMessageModelCopyWithImpl<$Res, ChatMessageModel>;
|
||||
ChatMessageModel value, $Res Function(ChatMessageModel) then) =
|
||||
_$ChatMessageModelCopyWithImpl<$Res, ChatMessageModel>;
|
||||
@useResult
|
||||
$Res call({
|
||||
int id,
|
||||
String data,
|
||||
@JsonKey(name: 'media_data') List<dynamic>? mediaData,
|
||||
@JsonKey(name: 'author_id') int authorId,
|
||||
@JsonKey(name: 'updated_at', fromJson: parseDate) DateTime updatedAt,
|
||||
@JsonKey(name: 'read_by_to_user', defaultValue: false) bool isRead,
|
||||
@JsonKey(name: 'is_author_message_auth_user') bool? isCurrentUserAuthor,
|
||||
@JsonKey(name: 'room_id') String? roomId,
|
||||
});
|
||||
$Res call(
|
||||
{int id,
|
||||
String data,
|
||||
@JsonKey(name: 'media_data') List<dynamic>? mediaData,
|
||||
@JsonKey(name: 'author_id') int authorId,
|
||||
@JsonKey(name: 'updated_at', fromJson: parseDate) DateTime updatedAt,
|
||||
@JsonKey(name: 'read_by_to_user', defaultValue: false) bool isRead,
|
||||
@JsonKey(name: 'is_author_message_auth_user') bool? isCurrentUserAuthor,
|
||||
@JsonKey(name: 'room_id') String? roomId});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -89,83 +86,69 @@ class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel>
|
||||
Object? isCurrentUserAuthor = freezed,
|
||||
Object? roomId = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
id:
|
||||
null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
data:
|
||||
null == data
|
||||
? _value.data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
mediaData:
|
||||
freezed == mediaData
|
||||
? _value.mediaData
|
||||
: mediaData // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>?,
|
||||
authorId:
|
||||
null == authorId
|
||||
? _value.authorId
|
||||
: authorId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
updatedAt:
|
||||
null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
isRead:
|
||||
null == isRead
|
||||
? _value.isRead
|
||||
: isRead // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
isCurrentUserAuthor:
|
||||
freezed == isCurrentUserAuthor
|
||||
? _value.isCurrentUserAuthor
|
||||
: isCurrentUserAuthor // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
roomId:
|
||||
freezed == roomId
|
||||
? _value.roomId
|
||||
: roomId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
data: null == data
|
||||
? _value.data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
mediaData: freezed == mediaData
|
||||
? _value.mediaData
|
||||
: mediaData // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>?,
|
||||
authorId: null == authorId
|
||||
? _value.authorId
|
||||
: authorId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
updatedAt: null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
isRead: null == isRead
|
||||
? _value.isRead
|
||||
: isRead // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
isCurrentUserAuthor: freezed == isCurrentUserAuthor
|
||||
? _value.isCurrentUserAuthor
|
||||
: isCurrentUserAuthor // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
roomId: freezed == roomId
|
||||
? _value.roomId
|
||||
: roomId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChatMessageModelImplCopyWith<$Res>
|
||||
implements $ChatMessageModelCopyWith<$Res> {
|
||||
factory _$$ChatMessageModelImplCopyWith(
|
||||
_$ChatMessageModelImpl value,
|
||||
$Res Function(_$ChatMessageModelImpl) then,
|
||||
) = __$$ChatMessageModelImplCopyWithImpl<$Res>;
|
||||
factory _$$ChatMessageModelImplCopyWith(_$ChatMessageModelImpl value,
|
||||
$Res Function(_$ChatMessageModelImpl) then) =
|
||||
__$$ChatMessageModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
int id,
|
||||
String data,
|
||||
@JsonKey(name: 'media_data') List<dynamic>? mediaData,
|
||||
@JsonKey(name: 'author_id') int authorId,
|
||||
@JsonKey(name: 'updated_at', fromJson: parseDate) DateTime updatedAt,
|
||||
@JsonKey(name: 'read_by_to_user', defaultValue: false) bool isRead,
|
||||
@JsonKey(name: 'is_author_message_auth_user') bool? isCurrentUserAuthor,
|
||||
@JsonKey(name: 'room_id') String? roomId,
|
||||
});
|
||||
$Res call(
|
||||
{int id,
|
||||
String data,
|
||||
@JsonKey(name: 'media_data') List<dynamic>? mediaData,
|
||||
@JsonKey(name: 'author_id') int authorId,
|
||||
@JsonKey(name: 'updated_at', fromJson: parseDate) DateTime updatedAt,
|
||||
@JsonKey(name: 'read_by_to_user', defaultValue: false) bool isRead,
|
||||
@JsonKey(name: 'is_author_message_auth_user') bool? isCurrentUserAuthor,
|
||||
@JsonKey(name: 'room_id') String? roomId});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
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);
|
||||
|
||||
/// Create a copy of ChatMessageModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -181,67 +164,58 @@ class __$$ChatMessageModelImplCopyWithImpl<$Res>
|
||||
Object? isCurrentUserAuthor = freezed,
|
||||
Object? roomId = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_$ChatMessageModelImpl(
|
||||
id:
|
||||
null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
data:
|
||||
null == data
|
||||
? _value.data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
mediaData:
|
||||
freezed == mediaData
|
||||
? _value._mediaData
|
||||
: mediaData // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>?,
|
||||
authorId:
|
||||
null == authorId
|
||||
? _value.authorId
|
||||
: authorId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
updatedAt:
|
||||
null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
isRead:
|
||||
null == isRead
|
||||
? _value.isRead
|
||||
: isRead // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
isCurrentUserAuthor:
|
||||
freezed == isCurrentUserAuthor
|
||||
? _value.isCurrentUserAuthor
|
||||
: isCurrentUserAuthor // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
roomId:
|
||||
freezed == roomId
|
||||
? _value.roomId
|
||||
: roomId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
),
|
||||
);
|
||||
return _then(_$ChatMessageModelImpl(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
data: null == data
|
||||
? _value.data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
mediaData: freezed == mediaData
|
||||
? _value._mediaData
|
||||
: mediaData // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>?,
|
||||
authorId: null == authorId
|
||||
? _value.authorId
|
||||
: authorId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
updatedAt: null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
isRead: null == isRead
|
||||
? _value.isRead
|
||||
: isRead // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
isCurrentUserAuthor: freezed == isCurrentUserAuthor
|
||||
? _value.isCurrentUserAuthor
|
||||
: isCurrentUserAuthor // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
roomId: freezed == roomId
|
||||
? _value.roomId
|
||||
: roomId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ChatMessageModelImpl implements _ChatMessageModel {
|
||||
const _$ChatMessageModelImpl({
|
||||
required this.id,
|
||||
required this.data,
|
||||
@JsonKey(name: 'media_data') required final List<dynamic>? mediaData,
|
||||
@JsonKey(name: 'author_id') required this.authorId,
|
||||
@JsonKey(name: 'updated_at', fromJson: parseDate) required this.updatedAt,
|
||||
@JsonKey(name: 'read_by_to_user', defaultValue: false) required this.isRead,
|
||||
@JsonKey(name: 'is_author_message_auth_user')
|
||||
required this.isCurrentUserAuthor,
|
||||
@JsonKey(name: 'room_id') required this.roomId,
|
||||
}) : _mediaData = mediaData;
|
||||
const _$ChatMessageModelImpl(
|
||||
{required this.id,
|
||||
required this.data,
|
||||
@JsonKey(name: 'media_data') required final List<dynamic>? mediaData,
|
||||
@JsonKey(name: 'author_id') required this.authorId,
|
||||
@JsonKey(name: 'updated_at', fromJson: parseDate) required this.updatedAt,
|
||||
@JsonKey(name: 'read_by_to_user', defaultValue: false)
|
||||
required this.isRead,
|
||||
@JsonKey(name: 'is_author_message_auth_user')
|
||||
required this.isCurrentUserAuthor,
|
||||
@JsonKey(name: 'room_id') required this.roomId})
|
||||
: _mediaData = mediaData;
|
||||
|
||||
factory _$ChatMessageModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatMessageModelImplFromJson(json);
|
||||
@@ -289,10 +263,8 @@ 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,
|
||||
) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._mediaData, _mediaData) &&
|
||||
(identical(other.authorId, authorId) ||
|
||||
other.authorId == authorId) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
@@ -306,16 +278,15 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
data,
|
||||
const DeepCollectionEquality().hash(_mediaData),
|
||||
authorId,
|
||||
updatedAt,
|
||||
isRead,
|
||||
isCurrentUserAuthor,
|
||||
roomId,
|
||||
);
|
||||
runtimeType,
|
||||
id,
|
||||
data,
|
||||
const DeepCollectionEquality().hash(_mediaData),
|
||||
authorId,
|
||||
updatedAt,
|
||||
isRead,
|
||||
isCurrentUserAuthor,
|
||||
roomId);
|
||||
|
||||
/// Create a copy of ChatMessageModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -324,30 +295,30 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
|
||||
__$$ChatMessageModelImplCopyWithImpl<_$ChatMessageModelImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$ChatMessageModelImplToJson(this);
|
||||
return _$$ChatMessageModelImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
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', fromJson: parseDate)
|
||||
required final DateTime updatedAt,
|
||||
@JsonKey(name: 'read_by_to_user', defaultValue: false)
|
||||
required final bool isRead,
|
||||
@JsonKey(name: 'is_author_message_auth_user')
|
||||
required final bool? isCurrentUserAuthor,
|
||||
@JsonKey(name: 'room_id') required final String? roomId,
|
||||
}) = _$ChatMessageModelImpl;
|
||||
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', fromJson: parseDate)
|
||||
required final DateTime updatedAt,
|
||||
@JsonKey(name: 'read_by_to_user', defaultValue: false)
|
||||
required final bool isRead,
|
||||
@JsonKey(name: 'is_author_message_auth_user')
|
||||
required final bool? isCurrentUserAuthor,
|
||||
@JsonKey(name: 'room_id') required final String? roomId}) =
|
||||
_$ChatMessageModelImpl;
|
||||
|
||||
factory _ChatMessageModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatMessageModelImpl.fromJson;
|
||||
|
||||
Reference in New Issue
Block a user