refactor: remove unused elements

This commit is contained in:
mso7nueh
2024-09-11 16:39:15 +03:00
parent 09cfacb022
commit 69472f422e
182 changed files with 2443 additions and 5482 deletions

View File

@@ -25,7 +25,6 @@ import 'package:eatvio_app/features/registration/presentation/pages/registration
import 'package:eatvio_app/old/auth/auth_screen/auth_screen.dart';
import 'package:eatvio_app/old/diets/diet_create_screen/diet_create_screen.dart';
import 'package:eatvio_app/old/diets/diet_select_screen/diet_select_screen.dart';
import 'package:eatvio_app/old/feed/blog_post_edit_screen/blog_post_edit_screen.dart';
import 'package:eatvio_app/old/glossary/glossary_screen/glossary_screen.dart';
import 'package:eatvio_app/old/plans/plan_select_screen/plan_select_screen.dart';
import 'package:eatvio_app/old/profile/my_profile_screen/my_settings_screen.dart';
@@ -155,14 +154,6 @@ class AppRouter {
name: 'blogPostScreen',
builder: (context, state) => BlogPostScreen(blogPost: state.extra as FeedBlogPostModel),
),
GoRoute(
path: '/blog-post-edit-screen',
name: 'blogPostEditScreen',
builder: (context, state) => BlogPostEditScreen.builder(
context,
state.extra,
),
),
GoRoute(
path: '/chat-screen',
name: 'chatScreen',

View File

@@ -1,25 +0,0 @@
import 'package:eatvio_app/main.dart';
import 'package:flutter/material.dart';
class ServerException implements Exception {}
class CacheException implements Exception {}
class NetworkException implements Exception {}
///can be used for throwing [NoInternetException]
class NoInternetException implements Exception {
late String _message;
NoInternetException([String message = 'NoInternetException Occurred']) {
if (globalMessengerKey.currentState != null) {
globalMessengerKey.currentState!.showSnackBar(SnackBar(content: Text(message)));
}
this._message = message;
}
@override
String toString() {
return _message;
}
}

View File

@@ -1,8 +0,0 @@
abstract class Failure {}
// General failures
class ServerFailure extends Failure {}
class CacheFailure extends Failure {}
class NetworkFailure extends Failure {}

View File

@@ -24,6 +24,7 @@ mixin _$InitializationState {
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -70,18 +71,17 @@ mixin _$InitializationState {
/// @nodoc
abstract class $InitializationStateCopyWith<$Res> {
factory $InitializationStateCopyWith(
InitializationState value, $Res Function(InitializationState) then) =
factory $InitializationStateCopyWith(InitializationState value, $Res Function(InitializationState) then) =
_$InitializationStateCopyWithImpl<$Res, InitializationState>;
}
/// @nodoc
class _$InitializationStateCopyWithImpl<$Res, $Val extends InitializationState>
implements $InitializationStateCopyWith<$Res> {
class _$InitializationStateCopyWithImpl<$Res, $Val extends InitializationState> implements $InitializationStateCopyWith<$Res> {
_$InitializationStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -91,18 +91,14 @@ class _$InitializationStateCopyWithImpl<$Res, $Val extends InitializationState>
/// @nodoc
abstract class _$$InitializationStateImplCopyWith<$Res> {
factory _$$InitializationStateImplCopyWith(_$InitializationStateImpl value,
$Res Function(_$InitializationStateImpl) then) =
factory _$$InitializationStateImplCopyWith(_$InitializationStateImpl value, $Res Function(_$InitializationStateImpl) then) =
__$$InitializationStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$InitializationStateImplCopyWithImpl<$Res>
extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateImpl>
class __$$InitializationStateImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateImpl>
implements _$$InitializationStateImplCopyWith<$Res> {
__$$InitializationStateImplCopyWithImpl(_$InitializationStateImpl _value,
$Res Function(_$InitializationStateImpl) _then)
: super(_value, _then);
__$$InitializationStateImplCopyWithImpl(_$InitializationStateImpl _value, $Res Function(_$InitializationStateImpl) _then) : super(_value, _then);
/// Create a copy of InitializationState
/// with the given fields replaced by the non-null parameter values.
@@ -120,9 +116,7 @@ class _$InitializationStateImpl implements _InitializationState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$InitializationStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$InitializationStateImpl);
}
@override
@@ -209,20 +203,14 @@ abstract class _InitializationState implements InitializationState {
/// @nodoc
abstract class _$$InitializationStateLoadingImplCopyWith<$Res> {
factory _$$InitializationStateLoadingImplCopyWith(
_$InitializationStateLoadingImpl value,
$Res Function(_$InitializationStateLoadingImpl) then) =
factory _$$InitializationStateLoadingImplCopyWith(_$InitializationStateLoadingImpl value, $Res Function(_$InitializationStateLoadingImpl) then) =
__$$InitializationStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$InitializationStateLoadingImplCopyWithImpl<$Res>
extends _$InitializationStateCopyWithImpl<$Res,
_$InitializationStateLoadingImpl>
class __$$InitializationStateLoadingImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateLoadingImpl>
implements _$$InitializationStateLoadingImplCopyWith<$Res> {
__$$InitializationStateLoadingImplCopyWithImpl(
_$InitializationStateLoadingImpl _value,
$Res Function(_$InitializationStateLoadingImpl) _then)
__$$InitializationStateLoadingImplCopyWithImpl(_$InitializationStateLoadingImpl _value, $Res Function(_$InitializationStateLoadingImpl) _then)
: super(_value, _then);
/// Create a copy of InitializationState
@@ -241,9 +229,7 @@ class _$InitializationStateLoadingImpl implements InitializationStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$InitializationStateLoadingImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$InitializationStateLoadingImpl);
}
@override
@@ -330,22 +316,17 @@ abstract class InitializationStateLoading implements InitializationState {
/// @nodoc
abstract class _$$InitializationStateSuccessImplCopyWith<$Res> {
factory _$$InitializationStateSuccessImplCopyWith(
_$InitializationStateSuccessImpl value,
$Res Function(_$InitializationStateSuccessImpl) then) =
factory _$$InitializationStateSuccessImplCopyWith(_$InitializationStateSuccessImpl value, $Res Function(_$InitializationStateSuccessImpl) then) =
__$$InitializationStateSuccessImplCopyWithImpl<$Res>;
@useResult
$Res call({PusherChannelsClient client});
}
/// @nodoc
class __$$InitializationStateSuccessImplCopyWithImpl<$Res>
extends _$InitializationStateCopyWithImpl<$Res,
_$InitializationStateSuccessImpl>
class __$$InitializationStateSuccessImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateSuccessImpl>
implements _$$InitializationStateSuccessImplCopyWith<$Res> {
__$$InitializationStateSuccessImplCopyWithImpl(
_$InitializationStateSuccessImpl _value,
$Res Function(_$InitializationStateSuccessImpl) _then)
__$$InitializationStateSuccessImplCopyWithImpl(_$InitializationStateSuccessImpl _value, $Res Function(_$InitializationStateSuccessImpl) _then)
: super(_value, _then);
/// Create a copy of InitializationState
@@ -380,9 +361,7 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$InitializationStateSuccessImpl &&
(identical(other.client, client) || other.client == client));
(other.runtimeType == runtimeType && other is _$InitializationStateSuccessImpl && (identical(other.client, client) || other.client == client));
}
@override
@@ -393,9 +372,8 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
get copyWith => __$$InitializationStateSuccessImplCopyWithImpl<
_$InitializationStateSuccessImpl>(this, _$identity);
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl> get copyWith =>
__$$InitializationStateSuccessImplCopyWithImpl<_$InitializationStateSuccessImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -473,37 +451,29 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
}
abstract class InitializationStateSuccess implements InitializationState {
const factory InitializationStateSuccess(
{required final PusherChannelsClient client}) =
_$InitializationStateSuccessImpl;
const factory InitializationStateSuccess({required final PusherChannelsClient client}) = _$InitializationStateSuccessImpl;
PusherChannelsClient get client;
/// Create a copy of InitializationState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
get copyWith => throw _privateConstructorUsedError;
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$InitializationStateErrorImplCopyWith<$Res> {
factory _$$InitializationStateErrorImplCopyWith(
_$InitializationStateErrorImpl value,
$Res Function(_$InitializationStateErrorImpl) then) =
factory _$$InitializationStateErrorImplCopyWith(_$InitializationStateErrorImpl value, $Res Function(_$InitializationStateErrorImpl) then) =
__$$InitializationStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$InitializationStateErrorImplCopyWithImpl<$Res>
extends _$InitializationStateCopyWithImpl<$Res,
_$InitializationStateErrorImpl>
class __$$InitializationStateErrorImplCopyWithImpl<$Res> extends _$InitializationStateCopyWithImpl<$Res, _$InitializationStateErrorImpl>
implements _$$InitializationStateErrorImplCopyWith<$Res> {
__$$InitializationStateErrorImplCopyWithImpl(
_$InitializationStateErrorImpl _value,
$Res Function(_$InitializationStateErrorImpl) _then)
__$$InitializationStateErrorImplCopyWithImpl(_$InitializationStateErrorImpl _value, $Res Function(_$InitializationStateErrorImpl) _then)
: super(_value, _then);
/// Create a copy of InitializationState
@@ -540,8 +510,7 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$InitializationStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -552,9 +521,8 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
get copyWith => __$$InitializationStateErrorImplCopyWithImpl<
_$InitializationStateErrorImpl>(this, _$identity);
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl> get copyWith =>
__$$InitializationStateErrorImplCopyWithImpl<_$InitializationStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -632,14 +600,12 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
}
abstract class InitializationStateError implements InitializationState {
const factory InitializationStateError({required final String errorMessage}) =
_$InitializationStateErrorImpl;
const factory InitializationStateError({required final String errorMessage}) = _$InitializationStateErrorImpl;
String get errorMessage;
/// Create a copy of InitializationState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
get copyWith => throw _privateConstructorUsedError;
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -1,7 +1,7 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'base_models.freezed.dart';
part 'base_models.g.dart';
part 'pagination_model.freezed.dart';
part 'pagination_model.g.dart';
@freezed
class Links with _$Links {

View File

@@ -3,7 +3,7 @@
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'base_models.dart';
part of 'pagination_model.dart';
// **************************************************************************
// FreezedGenerator
@@ -22,10 +22,13 @@ Links _$LinksFromJson(Map<String, dynamic> json) {
mixin _$Links {
@JsonKey(name: "first")
String get first => throw _privateConstructorUsedError;
@JsonKey(name: "last")
String get last => throw _privateConstructorUsedError;
@JsonKey(name: "prev")
dynamic get prev => throw _privateConstructorUsedError;
@JsonKey(name: "next")
dynamic get next => throw _privateConstructorUsedError;
@@ -40,23 +43,20 @@ mixin _$Links {
/// @nodoc
abstract class $LinksCopyWith<$Res> {
factory $LinksCopyWith(Links value, $Res Function(Links) then) =
_$LinksCopyWithImpl<$Res, Links>;
factory $LinksCopyWith(Links value, $Res Function(Links) then) = _$LinksCopyWithImpl<$Res, Links>;
@useResult
$Res call(
{@JsonKey(name: "first") String first,
@JsonKey(name: "last") String last,
@JsonKey(name: "prev") dynamic prev,
@JsonKey(name: "next") dynamic next});
{@JsonKey(name: "first") String first, @JsonKey(name: "last") String last, @JsonKey(name: "prev") dynamic prev, @JsonKey(name: "next") dynamic next});
}
/// @nodoc
class _$LinksCopyWithImpl<$Res, $Val extends Links>
implements $LinksCopyWith<$Res> {
class _$LinksCopyWithImpl<$Res, $Val extends Links> implements $LinksCopyWith<$Res> {
_$LinksCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -93,25 +93,17 @@ class _$LinksCopyWithImpl<$Res, $Val extends Links>
/// @nodoc
abstract class _$$LinksImplCopyWith<$Res> implements $LinksCopyWith<$Res> {
factory _$$LinksImplCopyWith(
_$LinksImpl value, $Res Function(_$LinksImpl) then) =
__$$LinksImplCopyWithImpl<$Res>;
factory _$$LinksImplCopyWith(_$LinksImpl value, $Res Function(_$LinksImpl) then) = __$$LinksImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: "first") String first,
@JsonKey(name: "last") String last,
@JsonKey(name: "prev") dynamic prev,
@JsonKey(name: "next") dynamic next});
{@JsonKey(name: "first") String first, @JsonKey(name: "last") String last, @JsonKey(name: "prev") dynamic prev, @JsonKey(name: "next") dynamic next});
}
/// @nodoc
class __$$LinksImplCopyWithImpl<$Res>
extends _$LinksCopyWithImpl<$Res, _$LinksImpl>
implements _$$LinksImplCopyWith<$Res> {
__$$LinksImplCopyWithImpl(
_$LinksImpl _value, $Res Function(_$LinksImpl) _then)
: super(_value, _then);
class __$$LinksImplCopyWithImpl<$Res> extends _$LinksCopyWithImpl<$Res, _$LinksImpl> implements _$$LinksImplCopyWith<$Res> {
__$$LinksImplCopyWithImpl(_$LinksImpl _value, $Res Function(_$LinksImpl) _then) : super(_value, _then);
/// Create a copy of Links
/// with the given fields replaced by the non-null parameter values.
@@ -153,8 +145,7 @@ class _$LinksImpl implements _Links {
@JsonKey(name: "prev") required this.prev,
@JsonKey(name: "next") required this.next});
factory _$LinksImpl.fromJson(Map<String, dynamic> json) =>
_$$LinksImplFromJson(json);
factory _$LinksImpl.fromJson(Map<String, dynamic> json) => _$$LinksImplFromJson(json);
@override
@JsonKey(name: "first")
@@ -187,20 +178,14 @@ class _$LinksImpl implements _Links {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
first,
last,
const DeepCollectionEquality().hash(prev),
const DeepCollectionEquality().hash(next));
int get hashCode => Object.hash(runtimeType, first, last, const DeepCollectionEquality().hash(prev), const DeepCollectionEquality().hash(next));
/// Create a copy of Links
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
__$$LinksImplCopyWithImpl<_$LinksImpl>(this, _$identity);
_$$LinksImplCopyWith<_$LinksImpl> get copyWith => __$$LinksImplCopyWithImpl<_$LinksImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -222,12 +207,15 @@ abstract class _Links implements Links {
@override
@JsonKey(name: "first")
String get first;
@override
@JsonKey(name: "last")
String get last;
@override
@JsonKey(name: "prev")
dynamic get prev;
@override
@JsonKey(name: "next")
dynamic get next;
@@ -236,8 +224,7 @@ abstract class _Links implements Links {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$LinksImplCopyWith<_$LinksImpl> get copyWith => throw _privateConstructorUsedError;
}
Meta _$MetaFromJson(Map<String, dynamic> json) {
@@ -248,18 +235,25 @@ Meta _$MetaFromJson(Map<String, dynamic> json) {
mixin _$Meta {
@JsonKey(name: "current_page")
int get currentPage => throw _privateConstructorUsedError;
@JsonKey(name: "from")
dynamic get from => throw _privateConstructorUsedError;
@JsonKey(name: "last_page")
int get lastPage => throw _privateConstructorUsedError;
@JsonKey(name: "links")
List<Link> get links => throw _privateConstructorUsedError;
@JsonKey(name: "path")
String? get path => throw _privateConstructorUsedError;
@JsonKey(name: "per_page")
int get perPage => throw _privateConstructorUsedError;
@JsonKey(name: "to")
dynamic get to => throw _privateConstructorUsedError;
@JsonKey(name: "total")
int get total => throw _privateConstructorUsedError;
@@ -274,8 +268,8 @@ mixin _$Meta {
/// @nodoc
abstract class $MetaCopyWith<$Res> {
factory $MetaCopyWith(Meta value, $Res Function(Meta) then) =
_$MetaCopyWithImpl<$Res, Meta>;
factory $MetaCopyWith(Meta value, $Res Function(Meta) then) = _$MetaCopyWithImpl<$Res, Meta>;
@useResult
$Res call(
{@JsonKey(name: "current_page") int currentPage,
@@ -289,12 +283,12 @@ abstract class $MetaCopyWith<$Res> {
}
/// @nodoc
class _$MetaCopyWithImpl<$Res, $Val extends Meta>
implements $MetaCopyWith<$Res> {
class _$MetaCopyWithImpl<$Res, $Val extends Meta> implements $MetaCopyWith<$Res> {
_$MetaCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -351,9 +345,8 @@ class _$MetaCopyWithImpl<$Res, $Val extends Meta>
/// @nodoc
abstract class _$$MetaImplCopyWith<$Res> implements $MetaCopyWith<$Res> {
factory _$$MetaImplCopyWith(
_$MetaImpl value, $Res Function(_$MetaImpl) then) =
__$$MetaImplCopyWithImpl<$Res>;
factory _$$MetaImplCopyWith(_$MetaImpl value, $Res Function(_$MetaImpl) then) = __$$MetaImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -368,11 +361,8 @@ abstract class _$$MetaImplCopyWith<$Res> implements $MetaCopyWith<$Res> {
}
/// @nodoc
class __$$MetaImplCopyWithImpl<$Res>
extends _$MetaCopyWithImpl<$Res, _$MetaImpl>
implements _$$MetaImplCopyWith<$Res> {
__$$MetaImplCopyWithImpl(_$MetaImpl _value, $Res Function(_$MetaImpl) _then)
: super(_value, _then);
class __$$MetaImplCopyWithImpl<$Res> extends _$MetaCopyWithImpl<$Res, _$MetaImpl> implements _$$MetaImplCopyWith<$Res> {
__$$MetaImplCopyWithImpl(_$MetaImpl _value, $Res Function(_$MetaImpl) _then) : super(_value, _then);
/// Create a copy of Meta
/// with the given fields replaced by the non-null parameter values.
@@ -439,8 +429,7 @@ class _$MetaImpl implements _Meta {
@JsonKey(name: "total") required this.total})
: _links = links;
factory _$MetaImpl.fromJson(Map<String, dynamic> json) =>
_$$MetaImplFromJson(json);
factory _$MetaImpl.fromJson(Map<String, dynamic> json) => _$$MetaImplFromJson(json);
@override
@JsonKey(name: "current_page")
@@ -452,6 +441,7 @@ class _$MetaImpl implements _Meta {
@JsonKey(name: "last_page")
final int lastPage;
final List<Link> _links;
@override
@JsonKey(name: "links")
List<Link> get links {
@@ -483,11 +473,9 @@ class _$MetaImpl implements _Meta {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$MetaImpl &&
(identical(other.currentPage, currentPage) ||
other.currentPage == currentPage) &&
(identical(other.currentPage, currentPage) || other.currentPage == currentPage) &&
const DeepCollectionEquality().equals(other.from, from) &&
(identical(other.lastPage, lastPage) ||
other.lastPage == lastPage) &&
(identical(other.lastPage, lastPage) || other.lastPage == lastPage) &&
const DeepCollectionEquality().equals(other._links, _links) &&
(identical(other.path, path) || other.path == path) &&
(identical(other.perPage, perPage) || other.perPage == perPage) &&
@@ -497,24 +485,15 @@ class _$MetaImpl implements _Meta {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
currentPage,
const DeepCollectionEquality().hash(from),
lastPage,
const DeepCollectionEquality().hash(_links),
path,
perPage,
const DeepCollectionEquality().hash(to),
total);
int get hashCode => Object.hash(runtimeType, currentPage, const DeepCollectionEquality().hash(from), lastPage, const DeepCollectionEquality().hash(_links),
path, perPage, const DeepCollectionEquality().hash(to), total);
/// Create a copy of Meta
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
__$$MetaImplCopyWithImpl<_$MetaImpl>(this, _$identity);
_$$MetaImplCopyWith<_$MetaImpl> get copyWith => __$$MetaImplCopyWithImpl<_$MetaImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -540,24 +519,31 @@ abstract class _Meta implements Meta {
@override
@JsonKey(name: "current_page")
int get currentPage;
@override
@JsonKey(name: "from")
dynamic get from;
@override
@JsonKey(name: "last_page")
int get lastPage;
@override
@JsonKey(name: "links")
List<Link> get links;
@override
@JsonKey(name: "path")
String? get path;
@override
@JsonKey(name: "per_page")
int get perPage;
@override
@JsonKey(name: "to")
dynamic get to;
@override
@JsonKey(name: "total")
int get total;
@@ -566,8 +552,7 @@ abstract class _Meta implements Meta {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$MetaImplCopyWith<_$MetaImpl> get copyWith => throw _privateConstructorUsedError;
}
Link _$LinkFromJson(Map<String, dynamic> json) {
@@ -578,8 +563,10 @@ Link _$LinkFromJson(Map<String, dynamic> json) {
mixin _$Link {
@JsonKey(name: "url")
String? get url => throw _privateConstructorUsedError;
@JsonKey(name: "label")
String? get label => throw _privateConstructorUsedError;
@JsonKey(name: "active")
bool? get active => throw _privateConstructorUsedError;
@@ -594,22 +581,19 @@ mixin _$Link {
/// @nodoc
abstract class $LinkCopyWith<$Res> {
factory $LinkCopyWith(Link value, $Res Function(Link) then) =
_$LinkCopyWithImpl<$Res, Link>;
factory $LinkCopyWith(Link value, $Res Function(Link) then) = _$LinkCopyWithImpl<$Res, Link>;
@useResult
$Res call(
{@JsonKey(name: "url") String? url,
@JsonKey(name: "label") String? label,
@JsonKey(name: "active") bool? active});
$Res call({@JsonKey(name: "url") String? url, @JsonKey(name: "label") String? label, @JsonKey(name: "active") bool? active});
}
/// @nodoc
class _$LinkCopyWithImpl<$Res, $Val extends Link>
implements $LinkCopyWith<$Res> {
class _$LinkCopyWithImpl<$Res, $Val extends Link> implements $LinkCopyWith<$Res> {
_$LinkCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -641,23 +625,16 @@ class _$LinkCopyWithImpl<$Res, $Val extends Link>
/// @nodoc
abstract class _$$LinkImplCopyWith<$Res> implements $LinkCopyWith<$Res> {
factory _$$LinkImplCopyWith(
_$LinkImpl value, $Res Function(_$LinkImpl) then) =
__$$LinkImplCopyWithImpl<$Res>;
factory _$$LinkImplCopyWith(_$LinkImpl value, $Res Function(_$LinkImpl) then) = __$$LinkImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: "url") String? url,
@JsonKey(name: "label") String? label,
@JsonKey(name: "active") bool? active});
$Res call({@JsonKey(name: "url") String? url, @JsonKey(name: "label") String? label, @JsonKey(name: "active") bool? active});
}
/// @nodoc
class __$$LinkImplCopyWithImpl<$Res>
extends _$LinkCopyWithImpl<$Res, _$LinkImpl>
implements _$$LinkImplCopyWith<$Res> {
__$$LinkImplCopyWithImpl(_$LinkImpl _value, $Res Function(_$LinkImpl) _then)
: super(_value, _then);
class __$$LinkImplCopyWithImpl<$Res> extends _$LinkCopyWithImpl<$Res, _$LinkImpl> implements _$$LinkImplCopyWith<$Res> {
__$$LinkImplCopyWithImpl(_$LinkImpl _value, $Res Function(_$LinkImpl) _then) : super(_value, _then);
/// Create a copy of Link
/// with the given fields replaced by the non-null parameter values.
@@ -688,13 +665,9 @@ class __$$LinkImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$LinkImpl implements _Link {
const _$LinkImpl(
{@JsonKey(name: "url") this.url,
@JsonKey(name: "label") this.label,
@JsonKey(name: "active") this.active});
const _$LinkImpl({@JsonKey(name: "url") this.url, @JsonKey(name: "label") this.label, @JsonKey(name: "active") this.active});
factory _$LinkImpl.fromJson(Map<String, dynamic> json) =>
_$$LinkImplFromJson(json);
factory _$LinkImpl.fromJson(Map<String, dynamic> json) => _$$LinkImplFromJson(json);
@override
@JsonKey(name: "url")
@@ -730,8 +703,7 @@ class _$LinkImpl implements _Link {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
__$$LinkImplCopyWithImpl<_$LinkImpl>(this, _$identity);
_$$LinkImplCopyWith<_$LinkImpl> get copyWith => __$$LinkImplCopyWithImpl<_$LinkImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -742,19 +714,19 @@ class _$LinkImpl implements _Link {
}
abstract class _Link implements Link {
const factory _Link(
{@JsonKey(name: "url") final String? url,
@JsonKey(name: "label") final String? label,
@JsonKey(name: "active") final bool? active}) = _$LinkImpl;
const factory _Link({@JsonKey(name: "url") final String? url, @JsonKey(name: "label") final String? label, @JsonKey(name: "active") final bool? active}) =
_$LinkImpl;
factory _Link.fromJson(Map<String, dynamic> json) = _$LinkImpl.fromJson;
@override
@JsonKey(name: "url")
String? get url;
@override
@JsonKey(name: "label")
String? get label;
@override
@JsonKey(name: "active")
bool? get active;
@@ -763,6 +735,5 @@ abstract class _Link implements Link {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$LinkImplCopyWith<_$LinkImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -1,6 +1,6 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'base_models.dart';
part of 'pagination_model.dart';
// **************************************************************************
// JsonSerializableGenerator
@@ -13,8 +13,7 @@ _$LinksImpl _$$LinksImplFromJson(Map<String, dynamic> json) => _$LinksImpl(
next: json['next'],
);
Map<String, dynamic> _$$LinksImplToJson(_$LinksImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$LinksImplToJson(_$LinksImpl instance) => <String, dynamic>{
'first': instance.first,
'last': instance.last,
'prev': instance.prev,
@@ -25,17 +24,14 @@ _$MetaImpl _$$MetaImplFromJson(Map<String, dynamic> json) => _$MetaImpl(
currentPage: (json['current_page'] as num).toInt(),
from: json['from'],
lastPage: (json['last_page'] as num).toInt(),
links: (json['links'] as List<dynamic>)
.map((e) => Link.fromJson(e as Map<String, dynamic>))
.toList(),
links: (json['links'] as List<dynamic>).map((e) => Link.fromJson(e as Map<String, dynamic>)).toList(),
path: json['path'] as String?,
perPage: (json['per_page'] as num).toInt(),
to: json['to'],
total: (json['total'] as num).toInt(),
);
Map<String, dynamic> _$$MetaImplToJson(_$MetaImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$MetaImplToJson(_$MetaImpl instance) => <String, dynamic>{
'current_page': instance.currentPage,
'from': instance.from,
'last_page': instance.lastPage,
@@ -52,8 +48,7 @@ _$LinkImpl _$$LinkImplFromJson(Map<String, dynamic> json) => _$LinkImpl(
active: json['active'] as bool?,
);
Map<String, dynamic> _$$LinkImplToJson(_$LinkImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$LinkImplToJson(_$LinkImpl instance) => <String, dynamic>{
'url': instance.url,
'label': instance.label,
'active': instance.active,

View File

@@ -1,15 +0,0 @@
class Logger {
static LogMode _logMode = LogMode.debug;
static void init(LogMode mode) {
Logger._logMode = mode;
}
static void log(dynamic data, {StackTrace? stackTrace}) {
if (_logMode == LogMode.debug) {
print("Error: $data$stackTrace");
}
}
}
enum LogMode { debug, live }

View File

@@ -1,33 +0,0 @@
import 'package:eatvio_app/app_router.dart';
import 'package:flutter/material.dart';
class ProgressDialogUtils {
static bool isProgressVisible = false;
///common method for showing progress dialog
static void showProgressDialog({BuildContext? context, isCancellable = false}) async {
if (!isProgressVisible && AppRouter.navigatorKey.currentState?.overlay?.context != null) {
showDialog(
barrierDismissible: isCancellable,
context: AppRouter.navigatorKey.currentState!.overlay!.context,
builder: (BuildContext context) {
return Center(
child: CircularProgressIndicator.adaptive(
strokeWidth: 4,
valueColor: AlwaysStoppedAnimation<Color>(
Colors.white,
),
),
);
},
);
isProgressVisible = true;
}
}
///common method for hiding progress dialog
static void hideProgressDialog() {
if (isProgressVisible) Navigator.pop(AppRouter.navigatorKey.currentState!.overlay!.context);
isProgressVisible = false;
}
}

View File

@@ -17,33 +17,35 @@ final _privateConstructorUsedError = UnsupportedError(
/// @nodoc
mixin _$SelectionPopupModel {
int? get id => throw _privateConstructorUsedError;
String get title => throw _privateConstructorUsedError;
dynamic get value => throw _privateConstructorUsedError;
bool get isSelected => throw _privateConstructorUsedError;
/// Create a copy of SelectionPopupModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$SelectionPopupModelCopyWith<SelectionPopupModel> get copyWith =>
throw _privateConstructorUsedError;
$SelectionPopupModelCopyWith<SelectionPopupModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SelectionPopupModelCopyWith<$Res> {
factory $SelectionPopupModelCopyWith(
SelectionPopupModel value, $Res Function(SelectionPopupModel) then) =
factory $SelectionPopupModelCopyWith(SelectionPopupModel value, $Res Function(SelectionPopupModel) then) =
_$SelectionPopupModelCopyWithImpl<$Res, SelectionPopupModel>;
@useResult
$Res call({int? id, String title, dynamic value, bool isSelected});
}
/// @nodoc
class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel>
implements $SelectionPopupModelCopyWith<$Res> {
class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel> implements $SelectionPopupModelCopyWith<$Res> {
_$SelectionPopupModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -79,23 +81,19 @@ class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel>
}
/// @nodoc
abstract class _$$SelectionPopupModelImplCopyWith<$Res>
implements $SelectionPopupModelCopyWith<$Res> {
factory _$$SelectionPopupModelImplCopyWith(_$SelectionPopupModelImpl value,
$Res Function(_$SelectionPopupModelImpl) then) =
abstract class _$$SelectionPopupModelImplCopyWith<$Res> implements $SelectionPopupModelCopyWith<$Res> {
factory _$$SelectionPopupModelImplCopyWith(_$SelectionPopupModelImpl value, $Res Function(_$SelectionPopupModelImpl) then) =
__$$SelectionPopupModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({int? id, String title, dynamic value, bool isSelected});
}
/// @nodoc
class __$$SelectionPopupModelImplCopyWithImpl<$Res>
extends _$SelectionPopupModelCopyWithImpl<$Res, _$SelectionPopupModelImpl>
class __$$SelectionPopupModelImplCopyWithImpl<$Res> extends _$SelectionPopupModelCopyWithImpl<$Res, _$SelectionPopupModelImpl>
implements _$$SelectionPopupModelImplCopyWith<$Res> {
__$$SelectionPopupModelImplCopyWithImpl(_$SelectionPopupModelImpl _value,
$Res Function(_$SelectionPopupModelImpl) _then)
: super(_value, _then);
__$$SelectionPopupModelImplCopyWithImpl(_$SelectionPopupModelImpl _value, $Res Function(_$SelectionPopupModelImpl) _then) : super(_value, _then);
/// Create a copy of SelectionPopupModel
/// with the given fields replaced by the non-null parameter values.
@@ -131,8 +129,7 @@ class __$$SelectionPopupModelImplCopyWithImpl<$Res>
/// @nodoc
class _$SelectionPopupModelImpl implements _SelectionPopupModel {
const _$SelectionPopupModelImpl(
{this.id, required this.title, this.value, this.isSelected = false});
const _$SelectionPopupModelImpl({this.id, required this.title, this.value, this.isSelected = false});
@override
final int? id;
@@ -157,13 +154,11 @@ class _$SelectionPopupModelImpl implements _SelectionPopupModel {
(identical(other.id, id) || other.id == id) &&
(identical(other.title, title) || other.title == title) &&
const DeepCollectionEquality().equals(other.value, value) &&
(identical(other.isSelected, isSelected) ||
other.isSelected == isSelected));
(identical(other.isSelected, isSelected) || other.isSelected == isSelected));
}
@override
int get hashCode => Object.hash(runtimeType, id, title,
const DeepCollectionEquality().hash(value), isSelected);
int get hashCode => Object.hash(runtimeType, id, title, const DeepCollectionEquality().hash(value), isSelected);
/// Create a copy of SelectionPopupModel
/// with the given fields replaced by the non-null parameter values.
@@ -171,23 +166,21 @@ class _$SelectionPopupModelImpl implements _SelectionPopupModel {
@override
@pragma('vm:prefer-inline')
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
__$$SelectionPopupModelImplCopyWithImpl<_$SelectionPopupModelImpl>(
this, _$identity);
__$$SelectionPopupModelImplCopyWithImpl<_$SelectionPopupModelImpl>(this, _$identity);
}
abstract class _SelectionPopupModel implements SelectionPopupModel {
const factory _SelectionPopupModel(
{final int? id,
required final String title,
final dynamic value,
final bool isSelected}) = _$SelectionPopupModelImpl;
const factory _SelectionPopupModel({final int? id, required final String title, final dynamic value, final bool isSelected}) = _$SelectionPopupModelImpl;
@override
int? get id;
@override
String get title;
@override
dynamic get value;
@override
bool get isSelected;
@@ -195,6 +188,5 @@ abstract class _SelectionPopupModel implements SelectionPopupModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -24,6 +24,7 @@ mixin _$NewMessagesState {
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -70,18 +71,16 @@ mixin _$NewMessagesState {
/// @nodoc
abstract class $NewMessagesStateCopyWith<$Res> {
factory $NewMessagesStateCopyWith(
NewMessagesState value, $Res Function(NewMessagesState) then) =
_$NewMessagesStateCopyWithImpl<$Res, NewMessagesState>;
factory $NewMessagesStateCopyWith(NewMessagesState value, $Res Function(NewMessagesState) then) = _$NewMessagesStateCopyWithImpl<$Res, NewMessagesState>;
}
/// @nodoc
class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState>
implements $NewMessagesStateCopyWith<$Res> {
class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState> implements $NewMessagesStateCopyWith<$Res> {
_$NewMessagesStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -91,18 +90,14 @@ class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState>
/// @nodoc
abstract class _$$NewMessagesStateImplCopyWith<$Res> {
factory _$$NewMessagesStateImplCopyWith(_$NewMessagesStateImpl value,
$Res Function(_$NewMessagesStateImpl) then) =
factory _$$NewMessagesStateImplCopyWith(_$NewMessagesStateImpl value, $Res Function(_$NewMessagesStateImpl) then) =
__$$NewMessagesStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$NewMessagesStateImplCopyWithImpl<$Res>
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateImpl>
class __$$NewMessagesStateImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateImpl>
implements _$$NewMessagesStateImplCopyWith<$Res> {
__$$NewMessagesStateImplCopyWithImpl(_$NewMessagesStateImpl _value,
$Res Function(_$NewMessagesStateImpl) _then)
: super(_value, _then);
__$$NewMessagesStateImplCopyWithImpl(_$NewMessagesStateImpl _value, $Res Function(_$NewMessagesStateImpl) _then) : super(_value, _then);
/// Create a copy of NewMessagesState
/// with the given fields replaced by the non-null parameter values.
@@ -120,8 +115,7 @@ class _$NewMessagesStateImpl implements _NewMessagesState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$NewMessagesStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NewMessagesStateImpl);
}
@override
@@ -208,19 +202,14 @@ abstract class _NewMessagesState implements NewMessagesState {
/// @nodoc
abstract class _$$NewMessagesStateEmptyImplCopyWith<$Res> {
factory _$$NewMessagesStateEmptyImplCopyWith(
_$NewMessagesStateEmptyImpl value,
$Res Function(_$NewMessagesStateEmptyImpl) then) =
factory _$$NewMessagesStateEmptyImplCopyWith(_$NewMessagesStateEmptyImpl value, $Res Function(_$NewMessagesStateEmptyImpl) then) =
__$$NewMessagesStateEmptyImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$NewMessagesStateEmptyImplCopyWithImpl<$Res>
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateEmptyImpl>
class __$$NewMessagesStateEmptyImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateEmptyImpl>
implements _$$NewMessagesStateEmptyImplCopyWith<$Res> {
__$$NewMessagesStateEmptyImplCopyWithImpl(_$NewMessagesStateEmptyImpl _value,
$Res Function(_$NewMessagesStateEmptyImpl) _then)
: super(_value, _then);
__$$NewMessagesStateEmptyImplCopyWithImpl(_$NewMessagesStateEmptyImpl _value, $Res Function(_$NewMessagesStateEmptyImpl) _then) : super(_value, _then);
/// Create a copy of NewMessagesState
/// with the given fields replaced by the non-null parameter values.
@@ -238,9 +227,7 @@ class _$NewMessagesStateEmptyImpl implements NewMessagesStateEmpty {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$NewMessagesStateEmptyImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NewMessagesStateEmptyImpl);
}
@override
@@ -327,22 +314,17 @@ abstract class NewMessagesStateEmpty implements NewMessagesState {
/// @nodoc
abstract class _$$NewMessagesStateLoadedImplCopyWith<$Res> {
factory _$$NewMessagesStateLoadedImplCopyWith(
_$NewMessagesStateLoadedImpl value,
$Res Function(_$NewMessagesStateLoadedImpl) then) =
factory _$$NewMessagesStateLoadedImplCopyWith(_$NewMessagesStateLoadedImpl value, $Res Function(_$NewMessagesStateLoadedImpl) then) =
__$$NewMessagesStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call({int messagesCount});
}
/// @nodoc
class __$$NewMessagesStateLoadedImplCopyWithImpl<$Res>
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateLoadedImpl>
class __$$NewMessagesStateLoadedImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateLoadedImpl>
implements _$$NewMessagesStateLoadedImplCopyWith<$Res> {
__$$NewMessagesStateLoadedImplCopyWithImpl(
_$NewMessagesStateLoadedImpl _value,
$Res Function(_$NewMessagesStateLoadedImpl) _then)
: super(_value, _then);
__$$NewMessagesStateLoadedImplCopyWithImpl(_$NewMessagesStateLoadedImpl _value, $Res Function(_$NewMessagesStateLoadedImpl) _then) : super(_value, _then);
/// Create a copy of NewMessagesState
/// with the given fields replaced by the non-null parameter values.
@@ -378,8 +360,7 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$NewMessagesStateLoadedImpl &&
(identical(other.messagesCount, messagesCount) ||
other.messagesCount == messagesCount));
(identical(other.messagesCount, messagesCount) || other.messagesCount == messagesCount));
}
@override
@@ -390,9 +371,8 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
get copyWith => __$$NewMessagesStateLoadedImplCopyWithImpl<
_$NewMessagesStateLoadedImpl>(this, _$identity);
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl> get copyWith =>
__$$NewMessagesStateLoadedImplCopyWithImpl<_$NewMessagesStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -470,35 +450,29 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
}
abstract class NewMessagesStateLoaded implements NewMessagesState {
const factory NewMessagesStateLoaded({required final int messagesCount}) =
_$NewMessagesStateLoadedImpl;
const factory NewMessagesStateLoaded({required final int messagesCount}) = _$NewMessagesStateLoadedImpl;
int get messagesCount;
/// Create a copy of NewMessagesState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
get copyWith => throw _privateConstructorUsedError;
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$NewMessagesStateErrorImplCopyWith<$Res> {
factory _$$NewMessagesStateErrorImplCopyWith(
_$NewMessagesStateErrorImpl value,
$Res Function(_$NewMessagesStateErrorImpl) then) =
factory _$$NewMessagesStateErrorImplCopyWith(_$NewMessagesStateErrorImpl value, $Res Function(_$NewMessagesStateErrorImpl) then) =
__$$NewMessagesStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$NewMessagesStateErrorImplCopyWithImpl<$Res>
extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateErrorImpl>
class __$$NewMessagesStateErrorImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateErrorImpl>
implements _$$NewMessagesStateErrorImplCopyWith<$Res> {
__$$NewMessagesStateErrorImplCopyWithImpl(_$NewMessagesStateErrorImpl _value,
$Res Function(_$NewMessagesStateErrorImpl) _then)
: super(_value, _then);
__$$NewMessagesStateErrorImplCopyWithImpl(_$NewMessagesStateErrorImpl _value, $Res Function(_$NewMessagesStateErrorImpl) _then) : super(_value, _then);
/// Create a copy of NewMessagesState
/// with the given fields replaced by the non-null parameter values.
@@ -534,8 +508,7 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$NewMessagesStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -546,9 +519,8 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
get copyWith => __$$NewMessagesStateErrorImplCopyWithImpl<
_$NewMessagesStateErrorImpl>(this, _$identity);
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl> get copyWith =>
__$$NewMessagesStateErrorImplCopyWithImpl<_$NewMessagesStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -626,14 +598,12 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
}
abstract class NewMessagesStateError implements NewMessagesState {
const factory NewMessagesStateError({required final String errorMessage}) =
_$NewMessagesStateErrorImpl;
const factory NewMessagesStateError({required final String errorMessage}) = _$NewMessagesStateErrorImpl;
String get errorMessage;
/// Create a copy of NewMessagesState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
get copyWith => throw _privateConstructorUsedError;
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -20,18 +20,16 @@ mixin _$NotificationsState {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() empty,
required TResult Function(
List<String> notifications, int notificationsCount)
loaded,
required TResult Function(List<String> notifications, int notificationsCount) loaded,
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? empty,
TResult? Function(List<String> notifications, int notificationsCount)?
loaded,
TResult? Function(List<String> notifications, int notificationsCount)? loaded,
TResult? Function(String errorMessage)? error,
}) =>
throw _privateConstructorUsedError;
@@ -39,8 +37,7 @@ mixin _$NotificationsState {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? empty,
TResult Function(List<String> notifications, int notificationsCount)?
loaded,
TResult Function(List<String> notifications, int notificationsCount)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) =>
@@ -74,18 +71,17 @@ mixin _$NotificationsState {
/// @nodoc
abstract class $NotificationsStateCopyWith<$Res> {
factory $NotificationsStateCopyWith(
NotificationsState value, $Res Function(NotificationsState) then) =
factory $NotificationsStateCopyWith(NotificationsState value, $Res Function(NotificationsState) then) =
_$NotificationsStateCopyWithImpl<$Res, NotificationsState>;
}
/// @nodoc
class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState>
implements $NotificationsStateCopyWith<$Res> {
class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState> implements $NotificationsStateCopyWith<$Res> {
_$NotificationsStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -95,18 +91,14 @@ class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState>
/// @nodoc
abstract class _$$NotificationsStateImplCopyWith<$Res> {
factory _$$NotificationsStateImplCopyWith(_$NotificationsStateImpl value,
$Res Function(_$NotificationsStateImpl) then) =
factory _$$NotificationsStateImplCopyWith(_$NotificationsStateImpl value, $Res Function(_$NotificationsStateImpl) then) =
__$$NotificationsStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$NotificationsStateImplCopyWithImpl<$Res>
extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateImpl>
class __$$NotificationsStateImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateImpl>
implements _$$NotificationsStateImplCopyWith<$Res> {
__$$NotificationsStateImplCopyWithImpl(_$NotificationsStateImpl _value,
$Res Function(_$NotificationsStateImpl) _then)
: super(_value, _then);
__$$NotificationsStateImplCopyWithImpl(_$NotificationsStateImpl _value, $Res Function(_$NotificationsStateImpl) _then) : super(_value, _then);
/// Create a copy of NotificationsState
/// with the given fields replaced by the non-null parameter values.
@@ -124,8 +116,7 @@ class _$NotificationsStateImpl implements _NotificationsState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$NotificationsStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NotificationsStateImpl);
}
@override
@@ -136,9 +127,7 @@ class _$NotificationsStateImpl implements _NotificationsState {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() empty,
required TResult Function(
List<String> notifications, int notificationsCount)
loaded,
required TResult Function(List<String> notifications, int notificationsCount) loaded,
required TResult Function(String errorMessage) error,
}) {
return $default();
@@ -149,8 +138,7 @@ class _$NotificationsStateImpl implements _NotificationsState {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? empty,
TResult? Function(List<String> notifications, int notificationsCount)?
loaded,
TResult? Function(List<String> notifications, int notificationsCount)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return $default?.call();
@@ -161,8 +149,7 @@ class _$NotificationsStateImpl implements _NotificationsState {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? empty,
TResult Function(List<String> notifications, int notificationsCount)?
loaded,
TResult Function(List<String> notifications, int notificationsCount)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -216,21 +203,14 @@ abstract class _NotificationsState implements NotificationsState {
/// @nodoc
abstract class _$$NotificationsStateEmptyImplCopyWith<$Res> {
factory _$$NotificationsStateEmptyImplCopyWith(
_$NotificationsStateEmptyImpl value,
$Res Function(_$NotificationsStateEmptyImpl) then) =
factory _$$NotificationsStateEmptyImplCopyWith(_$NotificationsStateEmptyImpl value, $Res Function(_$NotificationsStateEmptyImpl) then) =
__$$NotificationsStateEmptyImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$NotificationsStateEmptyImplCopyWithImpl<$Res>
extends _$NotificationsStateCopyWithImpl<$Res,
_$NotificationsStateEmptyImpl>
class __$$NotificationsStateEmptyImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateEmptyImpl>
implements _$$NotificationsStateEmptyImplCopyWith<$Res> {
__$$NotificationsStateEmptyImplCopyWithImpl(
_$NotificationsStateEmptyImpl _value,
$Res Function(_$NotificationsStateEmptyImpl) _then)
: super(_value, _then);
__$$NotificationsStateEmptyImplCopyWithImpl(_$NotificationsStateEmptyImpl _value, $Res Function(_$NotificationsStateEmptyImpl) _then) : super(_value, _then);
/// Create a copy of NotificationsState
/// with the given fields replaced by the non-null parameter values.
@@ -248,9 +228,7 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$NotificationsStateEmptyImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$NotificationsStateEmptyImpl);
}
@override
@@ -261,9 +239,7 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() empty,
required TResult Function(
List<String> notifications, int notificationsCount)
loaded,
required TResult Function(List<String> notifications, int notificationsCount) loaded,
required TResult Function(String errorMessage) error,
}) {
return empty();
@@ -274,8 +250,7 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? empty,
TResult? Function(List<String> notifications, int notificationsCount)?
loaded,
TResult? Function(List<String> notifications, int notificationsCount)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return empty?.call();
@@ -286,8 +261,7 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? empty,
TResult Function(List<String> notifications, int notificationsCount)?
loaded,
TResult Function(List<String> notifications, int notificationsCount)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -341,22 +315,17 @@ abstract class NotificationsStateEmpty implements NotificationsState {
/// @nodoc
abstract class _$$NotificationsStateLoadedImplCopyWith<$Res> {
factory _$$NotificationsStateLoadedImplCopyWith(
_$NotificationsStateLoadedImpl value,
$Res Function(_$NotificationsStateLoadedImpl) then) =
factory _$$NotificationsStateLoadedImplCopyWith(_$NotificationsStateLoadedImpl value, $Res Function(_$NotificationsStateLoadedImpl) then) =
__$$NotificationsStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call({List<String> notifications, int notificationsCount});
}
/// @nodoc
class __$$NotificationsStateLoadedImplCopyWithImpl<$Res>
extends _$NotificationsStateCopyWithImpl<$Res,
_$NotificationsStateLoadedImpl>
class __$$NotificationsStateLoadedImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateLoadedImpl>
implements _$$NotificationsStateLoadedImplCopyWith<$Res> {
__$$NotificationsStateLoadedImplCopyWithImpl(
_$NotificationsStateLoadedImpl _value,
$Res Function(_$NotificationsStateLoadedImpl) _then)
__$$NotificationsStateLoadedImplCopyWithImpl(_$NotificationsStateLoadedImpl _value, $Res Function(_$NotificationsStateLoadedImpl) _then)
: super(_value, _then);
/// Create a copy of NotificationsState
@@ -383,12 +352,10 @@ class __$$NotificationsStateLoadedImplCopyWithImpl<$Res>
/// @nodoc
class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
const _$NotificationsStateLoadedImpl(
{required final List<String> notifications,
required this.notificationsCount})
: _notifications = notifications;
const _$NotificationsStateLoadedImpl({required final List<String> notifications, required this.notificationsCount}) : _notifications = notifications;
final List<String> _notifications;
@override
List<String> get notifications {
if (_notifications is EqualUnmodifiableListView) return _notifications;
@@ -409,33 +376,27 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$NotificationsStateLoadedImpl &&
const DeepCollectionEquality()
.equals(other._notifications, _notifications) &&
(identical(other.notificationsCount, notificationsCount) ||
other.notificationsCount == notificationsCount));
const DeepCollectionEquality().equals(other._notifications, _notifications) &&
(identical(other.notificationsCount, notificationsCount) || other.notificationsCount == notificationsCount));
}
@override
int get hashCode => Object.hash(runtimeType,
const DeepCollectionEquality().hash(_notifications), notificationsCount);
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_notifications), notificationsCount);
/// Create a copy of NotificationsState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
get copyWith => __$$NotificationsStateLoadedImplCopyWithImpl<
_$NotificationsStateLoadedImpl>(this, _$identity);
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl> get copyWith =>
__$$NotificationsStateLoadedImplCopyWithImpl<_$NotificationsStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() empty,
required TResult Function(
List<String> notifications, int notificationsCount)
loaded,
required TResult Function(List<String> notifications, int notificationsCount) loaded,
required TResult Function(String errorMessage) error,
}) {
return loaded(notifications, notificationsCount);
@@ -446,8 +407,7 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? empty,
TResult? Function(List<String> notifications, int notificationsCount)?
loaded,
TResult? Function(List<String> notifications, int notificationsCount)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return loaded?.call(notifications, notificationsCount);
@@ -458,8 +418,7 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? empty,
TResult Function(List<String> notifications, int notificationsCount)?
loaded,
TResult Function(List<String> notifications, int notificationsCount)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -508,39 +467,31 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
}
abstract class NotificationsStateLoaded implements NotificationsState {
const factory NotificationsStateLoaded(
{required final List<String> notifications,
required final int notificationsCount}) = _$NotificationsStateLoadedImpl;
const factory NotificationsStateLoaded({required final List<String> notifications, required final int notificationsCount}) = _$NotificationsStateLoadedImpl;
List<String> get notifications;
int get notificationsCount;
/// Create a copy of NotificationsState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
get copyWith => throw _privateConstructorUsedError;
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$NotificationsStateErrorImplCopyWith<$Res> {
factory _$$NotificationsStateErrorImplCopyWith(
_$NotificationsStateErrorImpl value,
$Res Function(_$NotificationsStateErrorImpl) then) =
factory _$$NotificationsStateErrorImplCopyWith(_$NotificationsStateErrorImpl value, $Res Function(_$NotificationsStateErrorImpl) then) =
__$$NotificationsStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$NotificationsStateErrorImplCopyWithImpl<$Res>
extends _$NotificationsStateCopyWithImpl<$Res,
_$NotificationsStateErrorImpl>
class __$$NotificationsStateErrorImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateErrorImpl>
implements _$$NotificationsStateErrorImplCopyWith<$Res> {
__$$NotificationsStateErrorImplCopyWithImpl(
_$NotificationsStateErrorImpl _value,
$Res Function(_$NotificationsStateErrorImpl) _then)
: super(_value, _then);
__$$NotificationsStateErrorImplCopyWithImpl(_$NotificationsStateErrorImpl _value, $Res Function(_$NotificationsStateErrorImpl) _then) : super(_value, _then);
/// Create a copy of NotificationsState
/// with the given fields replaced by the non-null parameter values.
@@ -576,8 +527,7 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$NotificationsStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -588,18 +538,15 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
get copyWith => __$$NotificationsStateErrorImplCopyWithImpl<
_$NotificationsStateErrorImpl>(this, _$identity);
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl> get copyWith =>
__$$NotificationsStateErrorImplCopyWithImpl<_$NotificationsStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() empty,
required TResult Function(
List<String> notifications, int notificationsCount)
loaded,
required TResult Function(List<String> notifications, int notificationsCount) loaded,
required TResult Function(String errorMessage) error,
}) {
return error(errorMessage);
@@ -610,8 +557,7 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? empty,
TResult? Function(List<String> notifications, int notificationsCount)?
loaded,
TResult? Function(List<String> notifications, int notificationsCount)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return error?.call(errorMessage);
@@ -622,8 +568,7 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? empty,
TResult Function(List<String> notifications, int notificationsCount)?
loaded,
TResult Function(List<String> notifications, int notificationsCount)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -672,14 +617,12 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
}
abstract class NotificationsStateError implements NotificationsState {
const factory NotificationsStateError({required final String errorMessage}) =
_$NotificationsStateErrorImpl;
const factory NotificationsStateError({required final String errorMessage}) = _$NotificationsStateErrorImpl;
String get errorMessage;
/// Create a copy of NotificationsState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
get copyWith => throw _privateConstructorUsedError;
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -19,4 +19,4 @@ class ProfileAvatarCubit extends Cubit<ProfileAvatarState> {
print(e);
}
}
}
}

View File

@@ -24,6 +24,7 @@ mixin _$ProfileAvatarState {
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -70,18 +71,17 @@ mixin _$ProfileAvatarState {
/// @nodoc
abstract class $ProfileAvatarStateCopyWith<$Res> {
factory $ProfileAvatarStateCopyWith(
ProfileAvatarState value, $Res Function(ProfileAvatarState) then) =
factory $ProfileAvatarStateCopyWith(ProfileAvatarState value, $Res Function(ProfileAvatarState) then) =
_$ProfileAvatarStateCopyWithImpl<$Res, ProfileAvatarState>;
}
/// @nodoc
class _$ProfileAvatarStateCopyWithImpl<$Res, $Val extends ProfileAvatarState>
implements $ProfileAvatarStateCopyWith<$Res> {
class _$ProfileAvatarStateCopyWithImpl<$Res, $Val extends ProfileAvatarState> implements $ProfileAvatarStateCopyWith<$Res> {
_$ProfileAvatarStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -91,18 +91,14 @@ class _$ProfileAvatarStateCopyWithImpl<$Res, $Val extends ProfileAvatarState>
/// @nodoc
abstract class _$$ProfileAvatarStateImplCopyWith<$Res> {
factory _$$ProfileAvatarStateImplCopyWith(_$ProfileAvatarStateImpl value,
$Res Function(_$ProfileAvatarStateImpl) then) =
factory _$$ProfileAvatarStateImplCopyWith(_$ProfileAvatarStateImpl value, $Res Function(_$ProfileAvatarStateImpl) then) =
__$$ProfileAvatarStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$ProfileAvatarStateImplCopyWithImpl<$Res>
extends _$ProfileAvatarStateCopyWithImpl<$Res, _$ProfileAvatarStateImpl>
class __$$ProfileAvatarStateImplCopyWithImpl<$Res> extends _$ProfileAvatarStateCopyWithImpl<$Res, _$ProfileAvatarStateImpl>
implements _$$ProfileAvatarStateImplCopyWith<$Res> {
__$$ProfileAvatarStateImplCopyWithImpl(_$ProfileAvatarStateImpl _value,
$Res Function(_$ProfileAvatarStateImpl) _then)
: super(_value, _then);
__$$ProfileAvatarStateImplCopyWithImpl(_$ProfileAvatarStateImpl _value, $Res Function(_$ProfileAvatarStateImpl) _then) : super(_value, _then);
/// Create a copy of ProfileAvatarState
/// with the given fields replaced by the non-null parameter values.
@@ -120,8 +116,7 @@ class _$ProfileAvatarStateImpl implements _ProfileAvatarState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$ProfileAvatarStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ProfileAvatarStateImpl);
}
@override
@@ -208,20 +203,14 @@ abstract class _ProfileAvatarState implements ProfileAvatarState {
/// @nodoc
abstract class _$$ProfileAvatarStateLoadingImplCopyWith<$Res> {
factory _$$ProfileAvatarStateLoadingImplCopyWith(
_$ProfileAvatarStateLoadingImpl value,
$Res Function(_$ProfileAvatarStateLoadingImpl) then) =
factory _$$ProfileAvatarStateLoadingImplCopyWith(_$ProfileAvatarStateLoadingImpl value, $Res Function(_$ProfileAvatarStateLoadingImpl) then) =
__$$ProfileAvatarStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$ProfileAvatarStateLoadingImplCopyWithImpl<$Res>
extends _$ProfileAvatarStateCopyWithImpl<$Res,
_$ProfileAvatarStateLoadingImpl>
class __$$ProfileAvatarStateLoadingImplCopyWithImpl<$Res> extends _$ProfileAvatarStateCopyWithImpl<$Res, _$ProfileAvatarStateLoadingImpl>
implements _$$ProfileAvatarStateLoadingImplCopyWith<$Res> {
__$$ProfileAvatarStateLoadingImplCopyWithImpl(
_$ProfileAvatarStateLoadingImpl _value,
$Res Function(_$ProfileAvatarStateLoadingImpl) _then)
__$$ProfileAvatarStateLoadingImplCopyWithImpl(_$ProfileAvatarStateLoadingImpl _value, $Res Function(_$ProfileAvatarStateLoadingImpl) _then)
: super(_value, _then);
/// Create a copy of ProfileAvatarState
@@ -240,9 +229,7 @@ class _$ProfileAvatarStateLoadingImpl implements ProfileAvatarStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfileAvatarStateLoadingImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ProfileAvatarStateLoadingImpl);
}
@override
@@ -329,10 +316,9 @@ abstract class ProfileAvatarStateLoading implements ProfileAvatarState {
/// @nodoc
abstract class _$$ProfileAvatarStateLoadedImplCopyWith<$Res> {
factory _$$ProfileAvatarStateLoadedImplCopyWith(
_$ProfileAvatarStateLoadedImpl value,
$Res Function(_$ProfileAvatarStateLoadedImpl) then) =
factory _$$ProfileAvatarStateLoadedImplCopyWith(_$ProfileAvatarStateLoadedImpl value, $Res Function(_$ProfileAvatarStateLoadedImpl) then) =
__$$ProfileAvatarStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call({ProfileModel profile});
@@ -340,13 +326,9 @@ abstract class _$$ProfileAvatarStateLoadedImplCopyWith<$Res> {
}
/// @nodoc
class __$$ProfileAvatarStateLoadedImplCopyWithImpl<$Res>
extends _$ProfileAvatarStateCopyWithImpl<$Res,
_$ProfileAvatarStateLoadedImpl>
class __$$ProfileAvatarStateLoadedImplCopyWithImpl<$Res> extends _$ProfileAvatarStateCopyWithImpl<$Res, _$ProfileAvatarStateLoadedImpl>
implements _$$ProfileAvatarStateLoadedImplCopyWith<$Res> {
__$$ProfileAvatarStateLoadedImplCopyWithImpl(
_$ProfileAvatarStateLoadedImpl _value,
$Res Function(_$ProfileAvatarStateLoadedImpl) _then)
__$$ProfileAvatarStateLoadedImplCopyWithImpl(_$ProfileAvatarStateLoadedImpl _value, $Res Function(_$ProfileAvatarStateLoadedImpl) _then)
: super(_value, _then);
/// Create a copy of ProfileAvatarState
@@ -391,9 +373,7 @@ class _$ProfileAvatarStateLoadedImpl implements ProfileAvatarStateLoaded {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfileAvatarStateLoadedImpl &&
(identical(other.profile, profile) || other.profile == profile));
(other.runtimeType == runtimeType && other is _$ProfileAvatarStateLoadedImpl && (identical(other.profile, profile) || other.profile == profile));
}
@override
@@ -404,9 +384,8 @@ class _$ProfileAvatarStateLoadedImpl implements ProfileAvatarStateLoaded {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl>
get copyWith => __$$ProfileAvatarStateLoadedImplCopyWithImpl<
_$ProfileAvatarStateLoadedImpl>(this, _$identity);
_$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl> get copyWith =>
__$$ProfileAvatarStateLoadedImplCopyWithImpl<_$ProfileAvatarStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -484,37 +463,29 @@ class _$ProfileAvatarStateLoadedImpl implements ProfileAvatarStateLoaded {
}
abstract class ProfileAvatarStateLoaded implements ProfileAvatarState {
const factory ProfileAvatarStateLoaded(
{required final ProfileModel profile}) = _$ProfileAvatarStateLoadedImpl;
const factory ProfileAvatarStateLoaded({required final ProfileModel profile}) = _$ProfileAvatarStateLoadedImpl;
ProfileModel get profile;
/// Create a copy of ProfileAvatarState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl>
get copyWith => throw _privateConstructorUsedError;
_$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$ProfileAvatarStateErrorImplCopyWith<$Res> {
factory _$$ProfileAvatarStateErrorImplCopyWith(
_$ProfileAvatarStateErrorImpl value,
$Res Function(_$ProfileAvatarStateErrorImpl) then) =
factory _$$ProfileAvatarStateErrorImplCopyWith(_$ProfileAvatarStateErrorImpl value, $Res Function(_$ProfileAvatarStateErrorImpl) then) =
__$$ProfileAvatarStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$ProfileAvatarStateErrorImplCopyWithImpl<$Res>
extends _$ProfileAvatarStateCopyWithImpl<$Res,
_$ProfileAvatarStateErrorImpl>
class __$$ProfileAvatarStateErrorImplCopyWithImpl<$Res> extends _$ProfileAvatarStateCopyWithImpl<$Res, _$ProfileAvatarStateErrorImpl>
implements _$$ProfileAvatarStateErrorImplCopyWith<$Res> {
__$$ProfileAvatarStateErrorImplCopyWithImpl(
_$ProfileAvatarStateErrorImpl _value,
$Res Function(_$ProfileAvatarStateErrorImpl) _then)
: super(_value, _then);
__$$ProfileAvatarStateErrorImplCopyWithImpl(_$ProfileAvatarStateErrorImpl _value, $Res Function(_$ProfileAvatarStateErrorImpl) _then) : super(_value, _then);
/// Create a copy of ProfileAvatarState
/// with the given fields replaced by the non-null parameter values.
@@ -550,8 +521,7 @@ class _$ProfileAvatarStateErrorImpl implements ProfileAvatarStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfileAvatarStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -562,9 +532,8 @@ class _$ProfileAvatarStateErrorImpl implements ProfileAvatarStateError {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl>
get copyWith => __$$ProfileAvatarStateErrorImplCopyWithImpl<
_$ProfileAvatarStateErrorImpl>(this, _$identity);
_$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl> get copyWith =>
__$$ProfileAvatarStateErrorImplCopyWithImpl<_$ProfileAvatarStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -642,14 +611,12 @@ class _$ProfileAvatarStateErrorImpl implements ProfileAvatarStateError {
}
abstract class ProfileAvatarStateError implements ProfileAvatarState {
const factory ProfileAvatarStateError({required final String errorMessage}) =
_$ProfileAvatarStateErrorImpl;
const factory ProfileAvatarStateError({required final String errorMessage}) = _$ProfileAvatarStateErrorImpl;
String get errorMessage;
/// Create a copy of ProfileAvatarState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl>
get copyWith => throw _privateConstructorUsedError;
_$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -16,7 +16,6 @@ class CalendarEntryModel {
date = date;
status = status;
id = id;
is_current_day_included_in_the_chosen_diet_progression =
is_current_day_included_in_the_chosen_diet_progression;
is_current_day_included_in_the_chosen_diet_progression = is_current_day_included_in_the_chosen_diet_progression;
}
}

View File

@@ -1,6 +1,7 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'calendar_model.freezed.dart';
part 'calendar_model.g.dart';
@freezed

View File

@@ -21,8 +21,9 @@ CalendarModel _$CalendarModelFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$CalendarModel {
String get date => throw _privateConstructorUsedError;
bool get is_current_day_included_in_the_chosen_diet_progression =>
throw _privateConstructorUsedError;
bool get is_current_day_included_in_the_chosen_diet_progression => throw _privateConstructorUsedError;
Object? get diary => throw _privateConstructorUsedError;
/// Serializes this CalendarModel to a JSON map.
@@ -31,29 +32,24 @@ mixin _$CalendarModel {
/// Create a copy of CalendarModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$CalendarModelCopyWith<CalendarModel> get copyWith =>
throw _privateConstructorUsedError;
$CalendarModelCopyWith<CalendarModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $CalendarModelCopyWith<$Res> {
factory $CalendarModelCopyWith(
CalendarModel value, $Res Function(CalendarModel) then) =
_$CalendarModelCopyWithImpl<$Res, CalendarModel>;
factory $CalendarModelCopyWith(CalendarModel value, $Res Function(CalendarModel) then) = _$CalendarModelCopyWithImpl<$Res, CalendarModel>;
@useResult
$Res call(
{String date,
bool is_current_day_included_in_the_chosen_diet_progression,
Object? diary});
$Res call({String date, bool is_current_day_included_in_the_chosen_diet_progression, Object? diary});
}
/// @nodoc
class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel>
implements $CalendarModelCopyWith<$Res> {
class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel> implements $CalendarModelCopyWith<$Res> {
_$CalendarModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -71,8 +67,7 @@ class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel>
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as String,
is_current_day_included_in_the_chosen_diet_progression: null ==
is_current_day_included_in_the_chosen_diet_progression
is_current_day_included_in_the_chosen_diet_progression: null == is_current_day_included_in_the_chosen_diet_progression
? _value.is_current_day_included_in_the_chosen_diet_progression
: is_current_day_included_in_the_chosen_diet_progression // ignore: cast_nullable_to_non_nullable
as bool,
@@ -82,26 +77,17 @@ class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel>
}
/// @nodoc
abstract class _$$CalendarModelImplCopyWith<$Res>
implements $CalendarModelCopyWith<$Res> {
factory _$$CalendarModelImplCopyWith(
_$CalendarModelImpl value, $Res Function(_$CalendarModelImpl) then) =
__$$CalendarModelImplCopyWithImpl<$Res>;
abstract class _$$CalendarModelImplCopyWith<$Res> implements $CalendarModelCopyWith<$Res> {
factory _$$CalendarModelImplCopyWith(_$CalendarModelImpl value, $Res Function(_$CalendarModelImpl) then) = __$$CalendarModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String date,
bool is_current_day_included_in_the_chosen_diet_progression,
Object? diary});
$Res call({String date, bool is_current_day_included_in_the_chosen_diet_progression, Object? diary});
}
/// @nodoc
class __$$CalendarModelImplCopyWithImpl<$Res>
extends _$CalendarModelCopyWithImpl<$Res, _$CalendarModelImpl>
implements _$$CalendarModelImplCopyWith<$Res> {
__$$CalendarModelImplCopyWithImpl(
_$CalendarModelImpl _value, $Res Function(_$CalendarModelImpl) _then)
: super(_value, _then);
class __$$CalendarModelImplCopyWithImpl<$Res> extends _$CalendarModelCopyWithImpl<$Res, _$CalendarModelImpl> implements _$$CalendarModelImplCopyWith<$Res> {
__$$CalendarModelImplCopyWithImpl(_$CalendarModelImpl _value, $Res Function(_$CalendarModelImpl) _then) : super(_value, _then);
/// Create a copy of CalendarModel
/// with the given fields replaced by the non-null parameter values.
@@ -117,8 +103,7 @@ class __$$CalendarModelImplCopyWithImpl<$Res>
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as String,
is_current_day_included_in_the_chosen_diet_progression: null ==
is_current_day_included_in_the_chosen_diet_progression
is_current_day_included_in_the_chosen_diet_progression: null == is_current_day_included_in_the_chosen_diet_progression
? _value.is_current_day_included_in_the_chosen_diet_progression
: is_current_day_included_in_the_chosen_diet_progression // ignore: cast_nullable_to_non_nullable
as bool,
@@ -130,13 +115,9 @@ class __$$CalendarModelImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$CalendarModelImpl implements _CalendarModel {
const _$CalendarModelImpl(
{required this.date,
required this.is_current_day_included_in_the_chosen_diet_progression,
this.diary});
const _$CalendarModelImpl({required this.date, required this.is_current_day_included_in_the_chosen_diet_progression, this.diary});
factory _$CalendarModelImpl.fromJson(Map<String, dynamic> json) =>
_$$CalendarModelImplFromJson(json);
factory _$CalendarModelImpl.fromJson(Map<String, dynamic> json) => _$$CalendarModelImplFromJson(json);
@override
final String date;
@@ -156,30 +137,21 @@ class _$CalendarModelImpl implements _CalendarModel {
(other.runtimeType == runtimeType &&
other is _$CalendarModelImpl &&
(identical(other.date, date) || other.date == date) &&
(identical(
other
.is_current_day_included_in_the_chosen_diet_progression,
is_current_day_included_in_the_chosen_diet_progression) ||
other.is_current_day_included_in_the_chosen_diet_progression ==
is_current_day_included_in_the_chosen_diet_progression) &&
(identical(other.is_current_day_included_in_the_chosen_diet_progression, is_current_day_included_in_the_chosen_diet_progression) ||
other.is_current_day_included_in_the_chosen_diet_progression == is_current_day_included_in_the_chosen_diet_progression) &&
const DeepCollectionEquality().equals(other.diary, diary));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
date,
is_current_day_included_in_the_chosen_diet_progression,
const DeepCollectionEquality().hash(diary));
int get hashCode => Object.hash(runtimeType, date, is_current_day_included_in_the_chosen_diet_progression, const DeepCollectionEquality().hash(diary));
/// Create a copy of CalendarModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith =>
__$$CalendarModelImplCopyWithImpl<_$CalendarModelImpl>(this, _$identity);
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith => __$$CalendarModelImplCopyWithImpl<_$CalendarModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -190,19 +162,17 @@ class _$CalendarModelImpl implements _CalendarModel {
}
abstract class _CalendarModel implements CalendarModel {
const factory _CalendarModel(
{required final String date,
required final bool
is_current_day_included_in_the_chosen_diet_progression,
final Object? diary}) = _$CalendarModelImpl;
const factory _CalendarModel({required final String date, required final bool is_current_day_included_in_the_chosen_diet_progression, final Object? diary}) =
_$CalendarModelImpl;
factory _CalendarModel.fromJson(Map<String, dynamic> json) =
_$CalendarModelImpl.fromJson;
factory _CalendarModel.fromJson(Map<String, dynamic> json) = _$CalendarModelImpl.fromJson;
@override
String get date;
@override
bool get is_current_day_included_in_the_chosen_diet_progression;
@override
Object? get diary;
@@ -210,6 +180,5 @@ abstract class _CalendarModel implements CalendarModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,19 +6,14 @@ part of 'calendar_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$CalendarModelImpl _$$CalendarModelImplFromJson(Map<String, dynamic> json) =>
_$CalendarModelImpl(
_$CalendarModelImpl _$$CalendarModelImplFromJson(Map<String, dynamic> json) => _$CalendarModelImpl(
date: json['date'] as String,
is_current_day_included_in_the_chosen_diet_progression:
json['is_current_day_included_in_the_chosen_diet_progression']
as bool,
is_current_day_included_in_the_chosen_diet_progression: json['is_current_day_included_in_the_chosen_diet_progression'] as bool,
diary: json['diary'],
);
Map<String, dynamic> _$$CalendarModelImplToJson(_$CalendarModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$CalendarModelImplToJson(_$CalendarModelImpl instance) => <String, dynamic>{
'date': instance.date,
'is_current_day_included_in_the_chosen_diet_progression':
instance.is_current_day_included_in_the_chosen_diet_progression,
'is_current_day_included_in_the_chosen_diet_progression': instance.is_current_day_included_in_the_chosen_diet_progression,
'diary': instance.diary,
};

View File

@@ -24,6 +24,7 @@ mixin _$CalendarState {
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -70,18 +71,16 @@ mixin _$CalendarState {
/// @nodoc
abstract class $CalendarStateCopyWith<$Res> {
factory $CalendarStateCopyWith(
CalendarState value, $Res Function(CalendarState) then) =
_$CalendarStateCopyWithImpl<$Res, CalendarState>;
factory $CalendarStateCopyWith(CalendarState value, $Res Function(CalendarState) then) = _$CalendarStateCopyWithImpl<$Res, CalendarState>;
}
/// @nodoc
class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState>
implements $CalendarStateCopyWith<$Res> {
class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState> implements $CalendarStateCopyWith<$Res> {
_$CalendarStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -91,18 +90,12 @@ class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState>
/// @nodoc
abstract class _$$CalendarStateImplCopyWith<$Res> {
factory _$$CalendarStateImplCopyWith(
_$CalendarStateImpl value, $Res Function(_$CalendarStateImpl) then) =
__$$CalendarStateImplCopyWithImpl<$Res>;
factory _$$CalendarStateImplCopyWith(_$CalendarStateImpl value, $Res Function(_$CalendarStateImpl) then) = __$$CalendarStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$CalendarStateImplCopyWithImpl<$Res>
extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateImpl>
implements _$$CalendarStateImplCopyWith<$Res> {
__$$CalendarStateImplCopyWithImpl(
_$CalendarStateImpl _value, $Res Function(_$CalendarStateImpl) _then)
: super(_value, _then);
class __$$CalendarStateImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateImpl> implements _$$CalendarStateImplCopyWith<$Res> {
__$$CalendarStateImplCopyWithImpl(_$CalendarStateImpl _value, $Res Function(_$CalendarStateImpl) _then) : super(_value, _then);
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@@ -120,8 +113,7 @@ class _$CalendarStateImpl implements _CalendarState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$CalendarStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$CalendarStateImpl);
}
@override
@@ -208,18 +200,14 @@ abstract class _CalendarState implements CalendarState {
/// @nodoc
abstract class _$$CalendarStateLoadingImplCopyWith<$Res> {
factory _$$CalendarStateLoadingImplCopyWith(_$CalendarStateLoadingImpl value,
$Res Function(_$CalendarStateLoadingImpl) then) =
factory _$$CalendarStateLoadingImplCopyWith(_$CalendarStateLoadingImpl value, $Res Function(_$CalendarStateLoadingImpl) then) =
__$$CalendarStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$CalendarStateLoadingImplCopyWithImpl<$Res>
extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateLoadingImpl>
class __$$CalendarStateLoadingImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateLoadingImpl>
implements _$$CalendarStateLoadingImplCopyWith<$Res> {
__$$CalendarStateLoadingImplCopyWithImpl(_$CalendarStateLoadingImpl _value,
$Res Function(_$CalendarStateLoadingImpl) _then)
: super(_value, _then);
__$$CalendarStateLoadingImplCopyWithImpl(_$CalendarStateLoadingImpl _value, $Res Function(_$CalendarStateLoadingImpl) _then) : super(_value, _then);
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@@ -237,9 +225,7 @@ class _$CalendarStateLoadingImpl implements CalendarStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CalendarStateLoadingImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$CalendarStateLoadingImpl);
}
@override
@@ -326,20 +312,17 @@ abstract class CalendarStateLoading implements CalendarState {
/// @nodoc
abstract class _$$CalendarStateLoadedImplCopyWith<$Res> {
factory _$$CalendarStateLoadedImplCopyWith(_$CalendarStateLoadedImpl value,
$Res Function(_$CalendarStateLoadedImpl) then) =
factory _$$CalendarStateLoadedImplCopyWith(_$CalendarStateLoadedImpl value, $Res Function(_$CalendarStateLoadedImpl) then) =
__$$CalendarStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call({List<CalendarModel> calendarList});
}
/// @nodoc
class __$$CalendarStateLoadedImplCopyWithImpl<$Res>
extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateLoadedImpl>
class __$$CalendarStateLoadedImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateLoadedImpl>
implements _$$CalendarStateLoadedImplCopyWith<$Res> {
__$$CalendarStateLoadedImplCopyWithImpl(_$CalendarStateLoadedImpl _value,
$Res Function(_$CalendarStateLoadedImpl) _then)
: super(_value, _then);
__$$CalendarStateLoadedImplCopyWithImpl(_$CalendarStateLoadedImpl _value, $Res Function(_$CalendarStateLoadedImpl) _then) : super(_value, _then);
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@@ -360,11 +343,10 @@ class __$$CalendarStateLoadedImplCopyWithImpl<$Res>
/// @nodoc
class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
const _$CalendarStateLoadedImpl(
{required final List<CalendarModel> calendarList})
: _calendarList = calendarList;
const _$CalendarStateLoadedImpl({required final List<CalendarModel> calendarList}) : _calendarList = calendarList;
final List<CalendarModel> _calendarList;
@override
List<CalendarModel> get calendarList {
if (_calendarList is EqualUnmodifiableListView) return _calendarList;
@@ -380,15 +362,11 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CalendarStateLoadedImpl &&
const DeepCollectionEquality()
.equals(other._calendarList, _calendarList));
(other.runtimeType == runtimeType && other is _$CalendarStateLoadedImpl && const DeepCollectionEquality().equals(other._calendarList, _calendarList));
}
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_calendarList));
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_calendarList));
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@@ -396,8 +374,7 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
@override
@pragma('vm:prefer-inline')
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith =>
__$$CalendarStateLoadedImplCopyWithImpl<_$CalendarStateLoadedImpl>(
this, _$identity);
__$$CalendarStateLoadedImplCopyWithImpl<_$CalendarStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -475,35 +452,29 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
}
abstract class CalendarStateLoaded implements CalendarState {
const factory CalendarStateLoaded(
{required final List<CalendarModel> calendarList}) =
_$CalendarStateLoadedImpl;
const factory CalendarStateLoaded({required final List<CalendarModel> calendarList}) = _$CalendarStateLoadedImpl;
List<CalendarModel> get calendarList;
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$CalendarStateErrorImplCopyWith<$Res> {
factory _$$CalendarStateErrorImplCopyWith(_$CalendarStateErrorImpl value,
$Res Function(_$CalendarStateErrorImpl) then) =
factory _$$CalendarStateErrorImplCopyWith(_$CalendarStateErrorImpl value, $Res Function(_$CalendarStateErrorImpl) then) =
__$$CalendarStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$CalendarStateErrorImplCopyWithImpl<$Res>
extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateErrorImpl>
class __$$CalendarStateErrorImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateErrorImpl>
implements _$$CalendarStateErrorImplCopyWith<$Res> {
__$$CalendarStateErrorImplCopyWithImpl(_$CalendarStateErrorImpl _value,
$Res Function(_$CalendarStateErrorImpl) _then)
: super(_value, _then);
__$$CalendarStateErrorImplCopyWithImpl(_$CalendarStateErrorImpl _value, $Res Function(_$CalendarStateErrorImpl) _then) : super(_value, _then);
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@@ -539,8 +510,7 @@ class _$CalendarStateErrorImpl implements CalendarStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CalendarStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -552,8 +522,7 @@ class _$CalendarStateErrorImpl implements CalendarStateError {
@override
@pragma('vm:prefer-inline')
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith =>
__$$CalendarStateErrorImplCopyWithImpl<_$CalendarStateErrorImpl>(
this, _$identity);
__$$CalendarStateErrorImplCopyWithImpl<_$CalendarStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -631,14 +600,12 @@ class _$CalendarStateErrorImpl implements CalendarStateError {
}
abstract class CalendarStateError implements CalendarState {
const factory CalendarStateError({required final String errorMessage}) =
_$CalendarStateErrorImpl;
const factory CalendarStateError({required final String errorMessage}) = _$CalendarStateErrorImpl;
String get errorMessage;
/// Create a copy of CalendarState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -46,9 +46,7 @@ class _CalendarService implements CalendarService {
final _result = await _dio.fetch<List<dynamic>>(_options);
late List<CalendarModel> _value;
try {
_value = _result.data!
.map((dynamic i) => CalendarModel.fromJson(i as Map<String, dynamic>))
.toList();
_value = _result.data!.map((dynamic i) => CalendarModel.fromJson(i as Map<String, dynamic>)).toList();
} on Object catch (e, s) {
errorLogger?.logError(e, s, _options);
rethrow;
@@ -57,9 +55,7 @@ class _CalendarService implements CalendarService {
}
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 {

View File

@@ -21,11 +21,15 @@ ChatMessageModel _$ChatMessageModelFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$ChatMessageModel {
int get id => throw _privateConstructorUsedError;
String get data => throw _privateConstructorUsedError;
@JsonKey(name: 'media_data')
List<dynamic>? get mediaData => throw _privateConstructorUsedError;
@JsonKey(name: 'author_id')
int get authorId => throw _privateConstructorUsedError;
@JsonKey(name: 'updated_at')
String get updatedAt => throw _privateConstructorUsedError;
@@ -35,15 +39,13 @@ mixin _$ChatMessageModel {
/// Create a copy of ChatMessageModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$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,
@@ -54,12 +56,12 @@ 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
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -100,11 +102,10 @@ 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
$Res call(
@@ -116,12 +117,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);
/// Create a copy of ChatMessageModel
/// with the given fields replaced by the non-null parameter values.
@@ -170,14 +168,14 @@ 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;
@override
final String data;
final List<dynamic>? _mediaData;
@override
@JsonKey(name: 'media_data')
List<dynamic>? get mediaData {
@@ -207,27 +205,21 @@ 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(includeFromJson: false, includeToJson: false)
@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);
/// Create a copy of ChatMessageModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@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() {
@@ -239,26 +231,28 @@ 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;
@override
String get data;
@override
@JsonKey(name: 'media_data')
List<dynamic>? get mediaData;
@override
@JsonKey(name: 'author_id')
int get authorId;
@override
@JsonKey(name: 'updated_at')
String get updatedAt;
@@ -267,6 +261,5 @@ abstract class _ChatMessageModel implements ChatMessageModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,

View File

@@ -22,6 +22,7 @@ ChatMessagesModel _$ChatMessagesModelFromJson(Map<String, dynamic> json) {
mixin _$ChatMessagesModel {
@JsonKey(name: 'data')
List<ChatMessageModel> get messagesList => throw _privateConstructorUsedError;
ChatMetaModel get meta => throw _privateConstructorUsedError;
/// Serializes this ChatMessagesModel to a JSON map.
@@ -30,30 +31,26 @@ mixin _$ChatMessagesModel {
/// Create a copy of ChatMessagesModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$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
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -89,28 +86,22 @@ 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);
/// Create a copy of ChatMessagesModel
/// with the given fields replaced by the non-null parameter values.
@@ -136,16 +127,12 @@ 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
@JsonKey(name: 'data')
List<ChatMessageModel> get messagesList {
@@ -167,24 +154,20 @@ 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(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_messagesList), meta);
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_messagesList), meta);
/// Create a copy of ChatMessagesModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@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() {
@@ -195,17 +178,15 @@ 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')
List<ChatMessageModel> get messagesList;
@override
ChatMetaModel get meta;
@@ -213,6 +194,5 @@ abstract class _ChatMessagesModel implements ChatMessagesModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,
};

View File

@@ -29,26 +29,24 @@ mixin _$ChatMetaModel {
/// Create a copy of ChatMetaModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$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
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -69,23 +67,17 @@ 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);
/// Create a copy of ChatMetaModel
/// with the given fields replaced by the non-null parameter values.
@@ -106,11 +98,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")
@@ -124,10 +114,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(includeFromJson: false, includeToJson: false)
@@ -139,8 +126,7 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
@JsonKey(includeFromJson: false, includeToJson: false)
@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() {
@@ -151,12 +137,9 @@ 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")
@@ -166,6 +149,5 @@ abstract class _ChatMetaModel implements ChatMetaModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,
};

View File

@@ -21,9 +21,10 @@ ChatRoomModel _$ChatRoomModelFromJson(Map<String, dynamic> json) {
/// @nodoc
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;
/// Serializes this ChatRoomModel to a JSON map.
@@ -32,32 +33,26 @@ mixin _$ChatRoomModel {
/// Create a copy of ChatRoomModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$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
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -91,38 +86,27 @@ 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);
/// Create a copy of ChatRoomModel
/// with the given fields replaced by the non-null parameter values.
@@ -154,13 +138,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;
@@ -168,6 +149,7 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
@JsonKey(name: 'chat_room_setting')
final ChatRoomSettingsModel chatRoomSettings;
final Map<String, ChatUserModel> _users;
@override
Map<String, ChatUserModel> get users {
if (_users is EqualUnmodifiableMapView) return _users;
@@ -186,23 +168,20 @@ 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(includeFromJson: false, includeToJson: false)
@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));
/// Create a copy of ChatRoomModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@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() {
@@ -215,18 +194,18 @@ 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;
@override
@JsonKey(name: 'chat_room_setting')
ChatRoomSettingsModel get chatRoomSettings;
@override
Map<String, ChatUserModel> get users;
@@ -234,6 +213,5 @@ abstract class _ChatRoomModel implements ChatRoomModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,

View File

@@ -29,27 +29,25 @@ mixin _$ChatRoomPreviewModel {
/// Create a copy of ChatRoomPreviewModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ChatRoomPreviewModelCopyWith<ChatRoomPreviewModel> get copyWith =>
throw _privateConstructorUsedError;
$ChatRoomPreviewModelCopyWith<ChatRoomPreviewModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ChatRoomPreviewModelCopyWith<$Res> {
factory $ChatRoomPreviewModelCopyWith(ChatRoomPreviewModel value,
$Res Function(ChatRoomPreviewModel) then) =
factory $ChatRoomPreviewModelCopyWith(ChatRoomPreviewModel value, $Res Function(ChatRoomPreviewModel) then) =
_$ChatRoomPreviewModelCopyWithImpl<$Res, ChatRoomPreviewModel>;
@useResult
$Res call({@JsonKey(name: "chatRooms") List<ChatRoom> chatRooms});
}
/// @nodoc
class _$ChatRoomPreviewModelCopyWithImpl<$Res,
$Val extends ChatRoomPreviewModel>
implements $ChatRoomPreviewModelCopyWith<$Res> {
class _$ChatRoomPreviewModelCopyWithImpl<$Res, $Val extends ChatRoomPreviewModel> implements $ChatRoomPreviewModelCopyWith<$Res> {
_$ChatRoomPreviewModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -70,23 +68,19 @@ class _$ChatRoomPreviewModelCopyWithImpl<$Res,
}
/// @nodoc
abstract class _$$ChatRoomPreviewModelImplCopyWith<$Res>
implements $ChatRoomPreviewModelCopyWith<$Res> {
factory _$$ChatRoomPreviewModelImplCopyWith(_$ChatRoomPreviewModelImpl value,
$Res Function(_$ChatRoomPreviewModelImpl) then) =
abstract class _$$ChatRoomPreviewModelImplCopyWith<$Res> implements $ChatRoomPreviewModelCopyWith<$Res> {
factory _$$ChatRoomPreviewModelImplCopyWith(_$ChatRoomPreviewModelImpl value, $Res Function(_$ChatRoomPreviewModelImpl) then) =
__$$ChatRoomPreviewModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({@JsonKey(name: "chatRooms") List<ChatRoom> chatRooms});
}
/// @nodoc
class __$$ChatRoomPreviewModelImplCopyWithImpl<$Res>
extends _$ChatRoomPreviewModelCopyWithImpl<$Res, _$ChatRoomPreviewModelImpl>
class __$$ChatRoomPreviewModelImplCopyWithImpl<$Res> extends _$ChatRoomPreviewModelCopyWithImpl<$Res, _$ChatRoomPreviewModelImpl>
implements _$$ChatRoomPreviewModelImplCopyWith<$Res> {
__$$ChatRoomPreviewModelImplCopyWithImpl(_$ChatRoomPreviewModelImpl _value,
$Res Function(_$ChatRoomPreviewModelImpl) _then)
: super(_value, _then);
__$$ChatRoomPreviewModelImplCopyWithImpl(_$ChatRoomPreviewModelImpl _value, $Res Function(_$ChatRoomPreviewModelImpl) _then) : super(_value, _then);
/// Create a copy of ChatRoomPreviewModel
/// with the given fields replaced by the non-null parameter values.
@@ -107,14 +101,12 @@ class __$$ChatRoomPreviewModelImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$ChatRoomPreviewModelImpl implements _ChatRoomPreviewModel {
const _$ChatRoomPreviewModelImpl(
{@JsonKey(name: "chatRooms") required final List<ChatRoom> chatRooms})
: _chatRooms = chatRooms;
const _$ChatRoomPreviewModelImpl({@JsonKey(name: "chatRooms") required final List<ChatRoom> chatRooms}) : _chatRooms = chatRooms;
factory _$ChatRoomPreviewModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ChatRoomPreviewModelImplFromJson(json);
factory _$ChatRoomPreviewModelImpl.fromJson(Map<String, dynamic> json) => _$$ChatRoomPreviewModelImplFromJson(json);
final List<ChatRoom> _chatRooms;
@override
@JsonKey(name: "chatRooms")
List<ChatRoom> get chatRooms {
@@ -131,26 +123,20 @@ class _$ChatRoomPreviewModelImpl implements _ChatRoomPreviewModel {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatRoomPreviewModelImpl &&
const DeepCollectionEquality()
.equals(other._chatRooms, _chatRooms));
(other.runtimeType == runtimeType && other is _$ChatRoomPreviewModelImpl && const DeepCollectionEquality().equals(other._chatRooms, _chatRooms));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
/// Create a copy of ChatRoomPreviewModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl>
get copyWith =>
__$$ChatRoomPreviewModelImplCopyWithImpl<_$ChatRoomPreviewModelImpl>(
this, _$identity);
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl> get copyWith =>
__$$ChatRoomPreviewModelImplCopyWithImpl<_$ChatRoomPreviewModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -161,12 +147,9 @@ class _$ChatRoomPreviewModelImpl implements _ChatRoomPreviewModel {
}
abstract class _ChatRoomPreviewModel implements ChatRoomPreviewModel {
const factory _ChatRoomPreviewModel(
{@JsonKey(name: "chatRooms")
required final List<ChatRoom> chatRooms}) = _$ChatRoomPreviewModelImpl;
const factory _ChatRoomPreviewModel({@JsonKey(name: "chatRooms") required final List<ChatRoom> chatRooms}) = _$ChatRoomPreviewModelImpl;
factory _ChatRoomPreviewModel.fromJson(Map<String, dynamic> json) =
_$ChatRoomPreviewModelImpl.fromJson;
factory _ChatRoomPreviewModel.fromJson(Map<String, dynamic> json) = _$ChatRoomPreviewModelImpl.fromJson;
@override
@JsonKey(name: "chatRooms")
@@ -176,8 +159,7 @@ abstract class _ChatRoomPreviewModel implements ChatRoomPreviewModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl>
get copyWith => throw _privateConstructorUsedError;
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl> get copyWith => throw _privateConstructorUsedError;
}
ChatRoom _$ChatRoomFromJson(Map<String, dynamic> json) {
@@ -188,10 +170,13 @@ ChatRoom _$ChatRoomFromJson(Map<String, dynamic> json) {
mixin _$ChatRoom {
@JsonKey(name: "id")
String get id => throw _privateConstructorUsedError;
@JsonKey(name: "room_name")
String get roomName => throw _privateConstructorUsedError;
@JsonKey(name: "last_message")
dynamic get lastMessage => throw _privateConstructorUsedError;
@JsonKey(name: "users")
Users get users => throw _privateConstructorUsedError;
@@ -201,14 +186,13 @@ mixin _$ChatRoom {
/// Create a copy of ChatRoom
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ChatRoomCopyWith<ChatRoom> get copyWith =>
throw _privateConstructorUsedError;
$ChatRoomCopyWith<ChatRoom> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ChatRoomCopyWith<$Res> {
factory $ChatRoomCopyWith(ChatRoom value, $Res Function(ChatRoom) then) =
_$ChatRoomCopyWithImpl<$Res, ChatRoom>;
factory $ChatRoomCopyWith(ChatRoom value, $Res Function(ChatRoom) then) = _$ChatRoomCopyWithImpl<$Res, ChatRoom>;
@useResult
$Res call(
{@JsonKey(name: "id") String id,
@@ -220,12 +204,12 @@ abstract class $ChatRoomCopyWith<$Res> {
}
/// @nodoc
class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom>
implements $ChatRoomCopyWith<$Res> {
class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom> implements $ChatRoomCopyWith<$Res> {
_$ChatRoomCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -271,11 +255,9 @@ class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom>
}
/// @nodoc
abstract class _$$ChatRoomImplCopyWith<$Res>
implements $ChatRoomCopyWith<$Res> {
factory _$$ChatRoomImplCopyWith(
_$ChatRoomImpl value, $Res Function(_$ChatRoomImpl) then) =
__$$ChatRoomImplCopyWithImpl<$Res>;
abstract class _$$ChatRoomImplCopyWith<$Res> implements $ChatRoomCopyWith<$Res> {
factory _$$ChatRoomImplCopyWith(_$ChatRoomImpl value, $Res Function(_$ChatRoomImpl) then) = __$$ChatRoomImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -289,12 +271,8 @@ abstract class _$$ChatRoomImplCopyWith<$Res>
}
/// @nodoc
class __$$ChatRoomImplCopyWithImpl<$Res>
extends _$ChatRoomCopyWithImpl<$Res, _$ChatRoomImpl>
implements _$$ChatRoomImplCopyWith<$Res> {
__$$ChatRoomImplCopyWithImpl(
_$ChatRoomImpl _value, $Res Function(_$ChatRoomImpl) _then)
: super(_value, _then);
class __$$ChatRoomImplCopyWithImpl<$Res> extends _$ChatRoomCopyWithImpl<$Res, _$ChatRoomImpl> implements _$$ChatRoomImplCopyWith<$Res> {
__$$ChatRoomImplCopyWithImpl(_$ChatRoomImpl _value, $Res Function(_$ChatRoomImpl) _then) : super(_value, _then);
/// Create a copy of ChatRoom
/// with the given fields replaced by the non-null parameter values.
@@ -336,8 +314,7 @@ class _$ChatRoomImpl implements _ChatRoom {
@JsonKey(name: "last_message") required this.lastMessage,
@JsonKey(name: "users") required this.users});
factory _$ChatRoomImpl.fromJson(Map<String, dynamic> json) =>
_$$ChatRoomImplFromJson(json);
factory _$ChatRoomImpl.fromJson(Map<String, dynamic> json) => _$$ChatRoomImplFromJson(json);
@override
@JsonKey(name: "id")
@@ -363,25 +340,21 @@ class _$ChatRoomImpl implements _ChatRoom {
(other.runtimeType == runtimeType &&
other is _$ChatRoomImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.roomName, roomName) ||
other.roomName == roomName) &&
const DeepCollectionEquality()
.equals(other.lastMessage, lastMessage) &&
(identical(other.roomName, roomName) || other.roomName == roomName) &&
const DeepCollectionEquality().equals(other.lastMessage, lastMessage) &&
(identical(other.users, users) || other.users == users));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id, roomName,
const DeepCollectionEquality().hash(lastMessage), users);
int get hashCode => Object.hash(runtimeType, id, roomName, const DeepCollectionEquality().hash(lastMessage), users);
/// Create a copy of ChatRoom
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith =>
__$$ChatRoomImplCopyWithImpl<_$ChatRoomImpl>(this, _$identity);
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith => __$$ChatRoomImplCopyWithImpl<_$ChatRoomImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -398,18 +371,20 @@ abstract class _ChatRoom implements ChatRoom {
@JsonKey(name: "last_message") required final dynamic lastMessage,
@JsonKey(name: "users") required final Users users}) = _$ChatRoomImpl;
factory _ChatRoom.fromJson(Map<String, dynamic> json) =
_$ChatRoomImpl.fromJson;
factory _ChatRoom.fromJson(Map<String, dynamic> json) = _$ChatRoomImpl.fromJson;
@override
@JsonKey(name: "id")
String get id;
@override
@JsonKey(name: "room_name")
String get roomName;
@override
@JsonKey(name: "last_message")
dynamic get lastMessage;
@override
@JsonKey(name: "users")
Users get users;
@@ -418,8 +393,7 @@ abstract class _ChatRoom implements ChatRoom {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith => throw _privateConstructorUsedError;
}
LastMessageClass _$LastMessageClassFromJson(Map<String, dynamic> json) {
@@ -430,16 +404,22 @@ LastMessageClass _$LastMessageClassFromJson(Map<String, dynamic> json) {
mixin _$LastMessageClass {
@JsonKey(name: "id")
int get id => throw _privateConstructorUsedError;
@JsonKey(name: "data")
String get data => throw _privateConstructorUsedError;
@JsonKey(name: "media_data")
List<dynamic> get mediaData => throw _privateConstructorUsedError;
@JsonKey(name: "author_id")
int get authorId => throw _privateConstructorUsedError;
@JsonKey(name: "is_author_message_auth_user")
bool get isAuthorMessageAuthUser => throw _privateConstructorUsedError;
@JsonKey(name: "read_by_to_user")
bool get readByToUser => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
DateTime get updatedAt => throw _privateConstructorUsedError;
@@ -449,34 +429,31 @@ mixin _$LastMessageClass {
/// Create a copy of LastMessageClass
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$LastMessageClassCopyWith<LastMessageClass> get copyWith =>
throw _privateConstructorUsedError;
$LastMessageClassCopyWith<LastMessageClass> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $LastMessageClassCopyWith<$Res> {
factory $LastMessageClassCopyWith(
LastMessageClass value, $Res Function(LastMessageClass) then) =
_$LastMessageClassCopyWithImpl<$Res, LastMessageClass>;
factory $LastMessageClassCopyWith(LastMessageClass value, $Res Function(LastMessageClass) then) = _$LastMessageClassCopyWithImpl<$Res, LastMessageClass>;
@useResult
$Res call(
{@JsonKey(name: "id") int id,
@JsonKey(name: "data") String data,
@JsonKey(name: "media_data") List<dynamic> mediaData,
@JsonKey(name: "author_id") int authorId,
@JsonKey(name: "is_author_message_auth_user")
bool isAuthorMessageAuthUser,
@JsonKey(name: "is_author_message_auth_user") bool isAuthorMessageAuthUser,
@JsonKey(name: "read_by_to_user") bool readByToUser,
@JsonKey(name: "updated_at") DateTime updatedAt});
}
/// @nodoc
class _$LastMessageClassCopyWithImpl<$Res, $Val extends LastMessageClass>
implements $LastMessageClassCopyWith<$Res> {
class _$LastMessageClassCopyWithImpl<$Res, $Val extends LastMessageClass> implements $LastMessageClassCopyWith<$Res> {
_$LastMessageClassCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -527,11 +504,10 @@ class _$LastMessageClassCopyWithImpl<$Res, $Val extends LastMessageClass>
}
/// @nodoc
abstract class _$$LastMessageClassImplCopyWith<$Res>
implements $LastMessageClassCopyWith<$Res> {
factory _$$LastMessageClassImplCopyWith(_$LastMessageClassImpl value,
$Res Function(_$LastMessageClassImpl) then) =
abstract class _$$LastMessageClassImplCopyWith<$Res> implements $LastMessageClassCopyWith<$Res> {
factory _$$LastMessageClassImplCopyWith(_$LastMessageClassImpl value, $Res Function(_$LastMessageClassImpl) then) =
__$$LastMessageClassImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -539,19 +515,15 @@ abstract class _$$LastMessageClassImplCopyWith<$Res>
@JsonKey(name: "data") String data,
@JsonKey(name: "media_data") List<dynamic> mediaData,
@JsonKey(name: "author_id") int authorId,
@JsonKey(name: "is_author_message_auth_user")
bool isAuthorMessageAuthUser,
@JsonKey(name: "is_author_message_auth_user") bool isAuthorMessageAuthUser,
@JsonKey(name: "read_by_to_user") bool readByToUser,
@JsonKey(name: "updated_at") DateTime updatedAt});
}
/// @nodoc
class __$$LastMessageClassImplCopyWithImpl<$Res>
extends _$LastMessageClassCopyWithImpl<$Res, _$LastMessageClassImpl>
class __$$LastMessageClassImplCopyWithImpl<$Res> extends _$LastMessageClassCopyWithImpl<$Res, _$LastMessageClassImpl>
implements _$$LastMessageClassImplCopyWith<$Res> {
__$$LastMessageClassImplCopyWithImpl(_$LastMessageClassImpl _value,
$Res Function(_$LastMessageClassImpl) _then)
: super(_value, _then);
__$$LastMessageClassImplCopyWithImpl(_$LastMessageClassImpl _value, $Res Function(_$LastMessageClassImpl) _then) : super(_value, _then);
/// Create a copy of LastMessageClass
/// with the given fields replaced by the non-null parameter values.
@@ -607,14 +579,12 @@ class _$LastMessageClassImpl implements _LastMessageClass {
@JsonKey(name: "data") required this.data,
@JsonKey(name: "media_data") required final List<dynamic> mediaData,
@JsonKey(name: "author_id") required this.authorId,
@JsonKey(name: "is_author_message_auth_user")
required this.isAuthorMessageAuthUser,
@JsonKey(name: "is_author_message_auth_user") required this.isAuthorMessageAuthUser,
@JsonKey(name: "read_by_to_user") required this.readByToUser,
@JsonKey(name: "updated_at") required this.updatedAt})
: _mediaData = mediaData;
factory _$LastMessageClassImpl.fromJson(Map<String, dynamic> json) =>
_$$LastMessageClassImplFromJson(json);
factory _$LastMessageClassImpl.fromJson(Map<String, dynamic> json) => _$$LastMessageClassImplFromJson(json);
@override
@JsonKey(name: "id")
@@ -623,6 +593,7 @@ class _$LastMessageClassImpl implements _LastMessageClass {
@JsonKey(name: "data")
final String data;
final List<dynamic> _mediaData;
@override
@JsonKey(name: "media_data")
List<dynamic> get mediaData {
@@ -656,39 +627,24 @@ class _$LastMessageClassImpl implements _LastMessageClass {
other is _$LastMessageClassImpl &&
(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.isAuthorMessageAuthUser, isAuthorMessageAuthUser) ||
other.isAuthorMessageAuthUser == isAuthorMessageAuthUser) &&
(identical(other.readByToUser, readByToUser) ||
other.readByToUser == readByToUser) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt));
const DeepCollectionEquality().equals(other._mediaData, _mediaData) &&
(identical(other.authorId, authorId) || other.authorId == authorId) &&
(identical(other.isAuthorMessageAuthUser, isAuthorMessageAuthUser) || other.isAuthorMessageAuthUser == isAuthorMessageAuthUser) &&
(identical(other.readByToUser, readByToUser) || other.readByToUser == readByToUser) &&
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
data,
const DeepCollectionEquality().hash(_mediaData),
authorId,
isAuthorMessageAuthUser,
readByToUser,
updatedAt);
int get hashCode =>
Object.hash(runtimeType, id, data, const DeepCollectionEquality().hash(_mediaData), authorId, isAuthorMessageAuthUser, readByToUser, updatedAt);
/// Create a copy of LastMessageClass
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith =>
__$$LastMessageClassImplCopyWithImpl<_$LastMessageClassImpl>(
this, _$identity);
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith => __$$LastMessageClassImplCopyWithImpl<_$LastMessageClassImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -700,37 +656,40 @@ class _$LastMessageClassImpl implements _LastMessageClass {
abstract class _LastMessageClass implements LastMessageClass {
const factory _LastMessageClass(
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "data") required final String data,
@JsonKey(name: "media_data") required final List<dynamic> mediaData,
@JsonKey(name: "author_id") required final int authorId,
@JsonKey(name: "is_author_message_auth_user")
required final bool isAuthorMessageAuthUser,
@JsonKey(name: "read_by_to_user") required final bool readByToUser,
@JsonKey(name: "updated_at") required final DateTime updatedAt}) =
_$LastMessageClassImpl;
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "data") required final String data,
@JsonKey(name: "media_data") required final List<dynamic> mediaData,
@JsonKey(name: "author_id") required final int authorId,
@JsonKey(name: "is_author_message_auth_user") required final bool isAuthorMessageAuthUser,
@JsonKey(name: "read_by_to_user") required final bool readByToUser,
@JsonKey(name: "updated_at") required final DateTime updatedAt}) = _$LastMessageClassImpl;
factory _LastMessageClass.fromJson(Map<String, dynamic> json) =
_$LastMessageClassImpl.fromJson;
factory _LastMessageClass.fromJson(Map<String, dynamic> json) = _$LastMessageClassImpl.fromJson;
@override
@JsonKey(name: "id")
int get id;
@override
@JsonKey(name: "data")
String get data;
@override
@JsonKey(name: "media_data")
List<dynamic> get mediaData;
@override
@JsonKey(name: "author_id")
int get authorId;
@override
@JsonKey(name: "is_author_message_auth_user")
bool get isAuthorMessageAuthUser;
@override
@JsonKey(name: "read_by_to_user")
bool get readByToUser;
@override
@JsonKey(name: "updated_at")
DateTime get updatedAt;
@@ -739,8 +698,7 @@ abstract class _LastMessageClass implements LastMessageClass {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith => throw _privateConstructorUsedError;
}
Users _$UsersFromJson(Map<String, dynamic> json) {
@@ -751,6 +709,7 @@ Users _$UsersFromJson(Map<String, dynamic> json) {
mixin _$Users {
@JsonKey(name: "from_chat_user")
ChatUser get fromChatUser => throw _privateConstructorUsedError;
@JsonKey(name: "to_chat_user")
ChatUser get toChatUser => throw _privateConstructorUsedError;
@@ -765,24 +724,23 @@ mixin _$Users {
/// @nodoc
abstract class $UsersCopyWith<$Res> {
factory $UsersCopyWith(Users value, $Res Function(Users) then) =
_$UsersCopyWithImpl<$Res, Users>;
factory $UsersCopyWith(Users value, $Res Function(Users) then) = _$UsersCopyWithImpl<$Res, Users>;
@useResult
$Res call(
{@JsonKey(name: "from_chat_user") ChatUser fromChatUser,
@JsonKey(name: "to_chat_user") ChatUser toChatUser});
$Res call({@JsonKey(name: "from_chat_user") ChatUser fromChatUser, @JsonKey(name: "to_chat_user") ChatUser toChatUser});
$ChatUserCopyWith<$Res> get fromChatUser;
$ChatUserCopyWith<$Res> get toChatUser;
}
/// @nodoc
class _$UsersCopyWithImpl<$Res, $Val extends Users>
implements $UsersCopyWith<$Res> {
class _$UsersCopyWithImpl<$Res, $Val extends Users> implements $UsersCopyWith<$Res> {
_$UsersCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -829,28 +787,22 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users>
/// @nodoc
abstract class _$$UsersImplCopyWith<$Res> implements $UsersCopyWith<$Res> {
factory _$$UsersImplCopyWith(
_$UsersImpl value, $Res Function(_$UsersImpl) then) =
__$$UsersImplCopyWithImpl<$Res>;
factory _$$UsersImplCopyWith(_$UsersImpl value, $Res Function(_$UsersImpl) then) = __$$UsersImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: "from_chat_user") ChatUser fromChatUser,
@JsonKey(name: "to_chat_user") ChatUser toChatUser});
$Res call({@JsonKey(name: "from_chat_user") ChatUser fromChatUser, @JsonKey(name: "to_chat_user") ChatUser toChatUser});
@override
$ChatUserCopyWith<$Res> get fromChatUser;
@override
$ChatUserCopyWith<$Res> get toChatUser;
}
/// @nodoc
class __$$UsersImplCopyWithImpl<$Res>
extends _$UsersCopyWithImpl<$Res, _$UsersImpl>
implements _$$UsersImplCopyWith<$Res> {
__$$UsersImplCopyWithImpl(
_$UsersImpl _value, $Res Function(_$UsersImpl) _then)
: super(_value, _then);
class __$$UsersImplCopyWithImpl<$Res> extends _$UsersCopyWithImpl<$Res, _$UsersImpl> implements _$$UsersImplCopyWith<$Res> {
__$$UsersImplCopyWithImpl(_$UsersImpl _value, $Res Function(_$UsersImpl) _then) : super(_value, _then);
/// Create a copy of Users
/// with the given fields replaced by the non-null parameter values.
@@ -876,12 +828,9 @@ class __$$UsersImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$UsersImpl implements _Users {
const _$UsersImpl(
{@JsonKey(name: "from_chat_user") required this.fromChatUser,
@JsonKey(name: "to_chat_user") required this.toChatUser});
const _$UsersImpl({@JsonKey(name: "from_chat_user") required this.fromChatUser, @JsonKey(name: "to_chat_user") required this.toChatUser});
factory _$UsersImpl.fromJson(Map<String, dynamic> json) =>
_$$UsersImplFromJson(json);
factory _$UsersImpl.fromJson(Map<String, dynamic> json) => _$$UsersImplFromJson(json);
@override
@JsonKey(name: "from_chat_user")
@@ -900,10 +849,8 @@ class _$UsersImpl implements _Users {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$UsersImpl &&
(identical(other.fromChatUser, fromChatUser) ||
other.fromChatUser == fromChatUser) &&
(identical(other.toChatUser, toChatUser) ||
other.toChatUser == toChatUser));
(identical(other.fromChatUser, fromChatUser) || other.fromChatUser == fromChatUser) &&
(identical(other.toChatUser, toChatUser) || other.toChatUser == toChatUser));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -915,8 +862,7 @@ class _$UsersImpl implements _Users {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$UsersImplCopyWith<_$UsersImpl> get copyWith =>
__$$UsersImplCopyWithImpl<_$UsersImpl>(this, _$identity);
_$$UsersImplCopyWith<_$UsersImpl> get copyWith => __$$UsersImplCopyWithImpl<_$UsersImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -928,15 +874,14 @@ class _$UsersImpl implements _Users {
abstract class _Users implements Users {
const factory _Users(
{@JsonKey(name: "from_chat_user") required final ChatUser fromChatUser,
@JsonKey(name: "to_chat_user")
required final ChatUser toChatUser}) = _$UsersImpl;
{@JsonKey(name: "from_chat_user") required final ChatUser fromChatUser, @JsonKey(name: "to_chat_user") required final ChatUser toChatUser}) = _$UsersImpl;
factory _Users.fromJson(Map<String, dynamic> json) = _$UsersImpl.fromJson;
@override
@JsonKey(name: "from_chat_user")
ChatUser get fromChatUser;
@override
@JsonKey(name: "to_chat_user")
ChatUser get toChatUser;
@@ -945,8 +890,7 @@ abstract class _Users implements Users {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$UsersImplCopyWith<_$UsersImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$UsersImplCopyWith<_$UsersImpl> get copyWith => throw _privateConstructorUsedError;
}
ChatUser _$ChatUserFromJson(Map<String, dynamic> json) {
@@ -957,10 +901,13 @@ ChatUser _$ChatUserFromJson(Map<String, dynamic> json) {
mixin _$ChatUser {
@JsonKey(name: "id")
int get id => throw _privateConstructorUsedError;
@JsonKey(name: "name")
String get name => throw _privateConstructorUsedError;
@JsonKey(name: "profile_photo_path")
String? get profilePhotoPath => throw _privateConstructorUsedError;
@JsonKey(name: "profile_photo_url")
String get profilePhotoUrl => throw _privateConstructorUsedError;
@@ -970,14 +917,13 @@ mixin _$ChatUser {
/// Create a copy of ChatUser
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ChatUserCopyWith<ChatUser> get copyWith =>
throw _privateConstructorUsedError;
$ChatUserCopyWith<ChatUser> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ChatUserCopyWith<$Res> {
factory $ChatUserCopyWith(ChatUser value, $Res Function(ChatUser) then) =
_$ChatUserCopyWithImpl<$Res, ChatUser>;
factory $ChatUserCopyWith(ChatUser value, $Res Function(ChatUser) then) = _$ChatUserCopyWithImpl<$Res, ChatUser>;
@useResult
$Res call(
{@JsonKey(name: "id") int id,
@@ -987,12 +933,12 @@ abstract class $ChatUserCopyWith<$Res> {
}
/// @nodoc
class _$ChatUserCopyWithImpl<$Res, $Val extends ChatUser>
implements $ChatUserCopyWith<$Res> {
class _$ChatUserCopyWithImpl<$Res, $Val extends ChatUser> implements $ChatUserCopyWith<$Res> {
_$ChatUserCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -1028,11 +974,9 @@ class _$ChatUserCopyWithImpl<$Res, $Val extends ChatUser>
}
/// @nodoc
abstract class _$$ChatUserImplCopyWith<$Res>
implements $ChatUserCopyWith<$Res> {
factory _$$ChatUserImplCopyWith(
_$ChatUserImpl value, $Res Function(_$ChatUserImpl) then) =
__$$ChatUserImplCopyWithImpl<$Res>;
abstract class _$$ChatUserImplCopyWith<$Res> implements $ChatUserCopyWith<$Res> {
factory _$$ChatUserImplCopyWith(_$ChatUserImpl value, $Res Function(_$ChatUserImpl) then) = __$$ChatUserImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -1043,12 +987,8 @@ abstract class _$$ChatUserImplCopyWith<$Res>
}
/// @nodoc
class __$$ChatUserImplCopyWithImpl<$Res>
extends _$ChatUserCopyWithImpl<$Res, _$ChatUserImpl>
implements _$$ChatUserImplCopyWith<$Res> {
__$$ChatUserImplCopyWithImpl(
_$ChatUserImpl _value, $Res Function(_$ChatUserImpl) _then)
: super(_value, _then);
class __$$ChatUserImplCopyWithImpl<$Res> extends _$ChatUserCopyWithImpl<$Res, _$ChatUserImpl> implements _$$ChatUserImplCopyWith<$Res> {
__$$ChatUserImplCopyWithImpl(_$ChatUserImpl _value, $Res Function(_$ChatUserImpl) _then) : super(_value, _then);
/// Create a copy of ChatUser
/// with the given fields replaced by the non-null parameter values.
@@ -1090,8 +1030,7 @@ class _$ChatUserImpl implements _ChatUser {
@JsonKey(name: "profile_photo_path") required this.profilePhotoPath,
@JsonKey(name: "profile_photo_url") required this.profilePhotoUrl});
factory _$ChatUserImpl.fromJson(Map<String, dynamic> json) =>
_$$ChatUserImplFromJson(json);
factory _$ChatUserImpl.fromJson(Map<String, dynamic> json) => _$$ChatUserImplFromJson(json);
@override
@JsonKey(name: "id")
@@ -1118,24 +1057,20 @@ class _$ChatUserImpl implements _ChatUser {
other is _$ChatUserImpl &&
(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(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
int get hashCode => Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
/// Create a copy of ChatUser
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith =>
__$$ChatUserImplCopyWithImpl<_$ChatUserImpl>(this, _$identity);
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith => __$$ChatUserImplCopyWithImpl<_$ChatUserImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -1149,23 +1084,23 @@ abstract class _ChatUser implements ChatUser {
const factory _ChatUser(
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "name") required final String name,
@JsonKey(name: "profile_photo_path")
required final String? profilePhotoPath,
@JsonKey(name: "profile_photo_url")
required final String profilePhotoUrl}) = _$ChatUserImpl;
@JsonKey(name: "profile_photo_path") required final String? profilePhotoPath,
@JsonKey(name: "profile_photo_url") required final String profilePhotoUrl}) = _$ChatUserImpl;
factory _ChatUser.fromJson(Map<String, dynamic> json) =
_$ChatUserImpl.fromJson;
factory _ChatUser.fromJson(Map<String, dynamic> json) = _$ChatUserImpl.fromJson;
@override
@JsonKey(name: "id")
int get id;
@override
@JsonKey(name: "name")
String get name;
@override
@JsonKey(name: "profile_photo_path")
String? get profilePhotoPath;
@override
@JsonKey(name: "profile_photo_url")
String get profilePhotoUrl;
@@ -1174,6 +1109,5 @@ abstract class _ChatUser implements ChatUser {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,39 +6,29 @@ part of 'chat_room_preview_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$ChatRoomPreviewModelImpl _$$ChatRoomPreviewModelImplFromJson(
Map<String, dynamic> json) =>
_$ChatRoomPreviewModelImpl(
chatRooms: (json['chatRooms'] as List<dynamic>)
.map((e) => ChatRoom.fromJson(e as Map<String, dynamic>))
.toList(),
_$ChatRoomPreviewModelImpl _$$ChatRoomPreviewModelImplFromJson(Map<String, dynamic> json) => _$ChatRoomPreviewModelImpl(
chatRooms: (json['chatRooms'] as List<dynamic>).map((e) => ChatRoom.fromJson(e as Map<String, dynamic>)).toList(),
);
Map<String, dynamic> _$$ChatRoomPreviewModelImplToJson(
_$ChatRoomPreviewModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$ChatRoomPreviewModelImplToJson(_$ChatRoomPreviewModelImpl instance) => <String, dynamic>{
'chatRooms': instance.chatRooms,
};
_$ChatRoomImpl _$$ChatRoomImplFromJson(Map<String, dynamic> json) =>
_$ChatRoomImpl(
_$ChatRoomImpl _$$ChatRoomImplFromJson(Map<String, dynamic> json) => _$ChatRoomImpl(
id: json['id'] as String,
roomName: json['room_name'] as String,
lastMessage: json['last_message'],
users: Users.fromJson(json['users'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$ChatRoomImplToJson(_$ChatRoomImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$ChatRoomImplToJson(_$ChatRoomImpl instance) => <String, dynamic>{
'id': instance.id,
'room_name': instance.roomName,
'last_message': instance.lastMessage,
'users': instance.users,
};
_$LastMessageClassImpl _$$LastMessageClassImplFromJson(
Map<String, dynamic> json) =>
_$LastMessageClassImpl(
_$LastMessageClassImpl _$$LastMessageClassImplFromJson(Map<String, dynamic> json) => _$LastMessageClassImpl(
id: (json['id'] as num).toInt(),
data: json['data'] as String,
mediaData: json['media_data'] as List<dynamic>,
@@ -48,9 +38,7 @@ _$LastMessageClassImpl _$$LastMessageClassImplFromJson(
updatedAt: DateTime.parse(json['updated_at'] as String),
);
Map<String, dynamic> _$$LastMessageClassImplToJson(
_$LastMessageClassImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$LastMessageClassImplToJson(_$LastMessageClassImpl instance) => <String, dynamic>{
'id': instance.id,
'data': instance.data,
'media_data': instance.mediaData,
@@ -61,28 +49,23 @@ Map<String, dynamic> _$$LastMessageClassImplToJson(
};
_$UsersImpl _$$UsersImplFromJson(Map<String, dynamic> json) => _$UsersImpl(
fromChatUser:
ChatUser.fromJson(json['from_chat_user'] as Map<String, dynamic>),
toChatUser:
ChatUser.fromJson(json['to_chat_user'] as Map<String, dynamic>),
fromChatUser: ChatUser.fromJson(json['from_chat_user'] as Map<String, dynamic>),
toChatUser: ChatUser.fromJson(json['to_chat_user'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$UsersImplToJson(_$UsersImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$UsersImplToJson(_$UsersImpl instance) => <String, dynamic>{
'from_chat_user': instance.fromChatUser,
'to_chat_user': instance.toChatUser,
};
_$ChatUserImpl _$$ChatUserImplFromJson(Map<String, dynamic> json) =>
_$ChatUserImpl(
_$ChatUserImpl _$$ChatUserImplFromJson(Map<String, dynamic> json) => _$ChatUserImpl(
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> _$$ChatUserImplToJson(_$ChatUserImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$ChatUserImplToJson(_$ChatUserImpl instance) => <String, dynamic>{
'id': instance.id,
'name': instance.name,
'profile_photo_path': instance.profilePhotoPath,

View File

@@ -14,19 +14,22 @@ 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);
}
/// @nodoc
mixin _$ChatRoomSettingsModel {
int get id => throw _privateConstructorUsedError;
@JsonKey(name: 'room_name')
String get roomName => throw _privateConstructorUsedError;
String get state => throw _privateConstructorUsedError;
@JsonKey(name: 'access_level')
String get accessLevel => throw _privateConstructorUsedError;
@JsonKey(name: 'updated_at')
String get updatedAt => throw _privateConstructorUsedError;
@@ -36,15 +39,14 @@ mixin _$ChatRoomSettingsModel {
/// Create a copy of ChatRoomSettingsModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$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(
{int id,
@@ -55,13 +57,12 @@ 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
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -102,12 +103,10 @@ 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
$Res call(
@@ -119,13 +118,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);
/// Create a copy of ChatRoomSettingsModel
/// with the given fields replaced by the non-null parameter values.
@@ -173,8 +168,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;
@@ -201,28 +195,23 @@ 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(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, id, roomName, state, accessLevel, updatedAt);
int get hashCode => Object.hash(runtimeType, id, roomName, state, accessLevel, updatedAt);
/// Create a copy of ChatRoomSettingsModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@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() {
@@ -234,26 +223,28 @@ 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;
@override
@JsonKey(name: 'room_name')
String get roomName;
@override
String get state;
@override
@JsonKey(name: 'access_level')
String get accessLevel;
@override
@JsonKey(name: 'updated_at')
String get updatedAt;
@@ -262,6 +253,5 @@ abstract class _ChatRoomSettingsModel implements ChatRoomSettingsModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
get copyWith => throw _privateConstructorUsedError;
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,

View File

@@ -21,9 +21,12 @@ ChatUserModel _$ChatUserModelFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$ChatUserModel {
int get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
@JsonKey(name: 'profile_photo_path')
String? get profilePhotoPath => throw _privateConstructorUsedError;
@JsonKey(name: 'profile_photo_url')
String? get profilePhotoUrl => throw _privateConstructorUsedError;
@@ -33,30 +36,24 @@ mixin _$ChatUserModel {
/// Create a copy of ChatUserModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$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
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -92,27 +89,17 @@ 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);
/// Create a copy of ChatUserModel
/// with the given fields replaced by the non-null parameter values.
@@ -154,8 +141,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;
@@ -180,24 +166,20 @@ 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(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
int get hashCode => Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
/// Create a copy of ChatUserModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@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() {
@@ -209,22 +191,23 @@ 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;
@override
String get name;
@override
@JsonKey(name: 'profile_photo_path')
String? get profilePhotoPath;
@override
@JsonKey(name: 'profile_photo_url')
String? get profilePhotoUrl;
@@ -233,6 +216,5 @@ abstract class _ChatUserModel implements ChatUserModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,

View File

@@ -21,9 +21,13 @@ WebsocketInfoModel _$WebsocketInfoModelFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$WebsocketInfoModel {
String get key => throw _privateConstructorUsedError;
String get host => throw _privateConstructorUsedError;
String get port => throw _privateConstructorUsedError;
String get cluster => throw _privateConstructorUsedError;
@JsonKey(name: 'user_id')
int get userId => throw _privateConstructorUsedError;
@@ -33,31 +37,25 @@ mixin _$WebsocketInfoModel {
/// Create a copy of WebsocketInfoModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$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
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -98,28 +96,19 @@ 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);
/// Create a copy of WebsocketInfoModel
/// with the given fields replaced by the non-null parameter values.
@@ -161,14 +150,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;
@@ -201,8 +185,7 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, key, host, port, cluster, userId);
int get hashCode => Object.hash(runtimeType, key, host, port, cluster, userId);
/// Create a copy of WebsocketInfoModel
/// with the given fields replaced by the non-null parameter values.
@@ -210,8 +193,7 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
@override
@pragma('vm:prefer-inline')
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
__$$WebsocketInfoModelImplCopyWithImpl<_$WebsocketInfoModelImpl>(
this, _$identity);
__$$WebsocketInfoModelImplCopyWithImpl<_$WebsocketInfoModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -223,24 +205,26 @@ 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;
@override
String get host;
@override
String get port;
@override
String get cluster;
@override
@JsonKey(name: 'user_id')
int get userId;
@@ -249,6 +233,5 @@ abstract class _WebsocketInfoModel implements WebsocketInfoModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -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,

View File

@@ -20,19 +20,16 @@ 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;
@optionalTypeArgs
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 +37,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,18 +71,16 @@ 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
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -97,18 +90,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);
/// Create a copy of ChatRoomState
/// with the given fields replaced by the non-null parameter values.
@@ -126,8 +113,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
@@ -138,9 +124,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();
@@ -151,9 +135,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();
@@ -164,9 +146,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(),
}) {
@@ -220,18 +200,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);
/// Create a copy of ChatRoomState
/// with the given fields replaced by the non-null parameter values.
@@ -249,9 +225,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
@@ -262,9 +236,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();
@@ -275,9 +247,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();
@@ -288,9 +258,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(),
}) {
@@ -344,26 +312,19 @@ 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);
/// Create a copy of ChatRoomState
/// with the given fields replaced by the non-null parameter values.
@@ -409,16 +370,13 @@ 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
final ChatRoomModel chatRoom;
final List<ChatMessageModel> _chatMessages;
@override
List<ChatMessageModel> get chatMessages {
if (_chatMessages is EqualUnmodifiableListView) return _chatMessages;
@@ -441,19 +399,14 @@ 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);
/// Create a copy of ChatRoomState
/// with the given fields replaced by the non-null parameter values.
@@ -461,17 +414,14 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
@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);
@@ -482,9 +432,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);
@@ -495,9 +443,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(),
}) {
@@ -553,33 +499,32 @@ abstract class ChatRoomStateLoaded implements ChatRoomState {
required final bool isLoading}) = _$ChatRoomStateLoadedImpl;
ChatRoomModel get chatRoom;
List<ChatMessageModel> get chatMessages;
bool get isTyping;
bool get isLoading;
/// Create a copy of ChatRoomState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$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);
/// Create a copy of ChatRoomState
/// with the given fields replaced by the non-null parameter values.
@@ -615,8 +560,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
@@ -628,17 +572,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);
@@ -649,9 +590,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);
@@ -662,9 +601,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(),
}) {
@@ -713,14 +650,12 @@ 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;
/// Create a copy of ChatRoomState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -24,6 +24,7 @@ mixin _$ChatSelectState {
required TResult Function(List<ChatRoom> chatRooms) loaded,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -70,18 +71,16 @@ mixin _$ChatSelectState {
/// @nodoc
abstract class $ChatSelectStateCopyWith<$Res> {
factory $ChatSelectStateCopyWith(
ChatSelectState value, $Res Function(ChatSelectState) then) =
_$ChatSelectStateCopyWithImpl<$Res, ChatSelectState>;
factory $ChatSelectStateCopyWith(ChatSelectState value, $Res Function(ChatSelectState) then) = _$ChatSelectStateCopyWithImpl<$Res, ChatSelectState>;
}
/// @nodoc
class _$ChatSelectStateCopyWithImpl<$Res, $Val extends ChatSelectState>
implements $ChatSelectStateCopyWith<$Res> {
class _$ChatSelectStateCopyWithImpl<$Res, $Val extends ChatSelectState> implements $ChatSelectStateCopyWith<$Res> {
_$ChatSelectStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -91,18 +90,13 @@ class _$ChatSelectStateCopyWithImpl<$Res, $Val extends ChatSelectState>
/// @nodoc
abstract class _$$ChatSelectStateImplCopyWith<$Res> {
factory _$$ChatSelectStateImplCopyWith(_$ChatSelectStateImpl value,
$Res Function(_$ChatSelectStateImpl) then) =
__$$ChatSelectStateImplCopyWithImpl<$Res>;
factory _$$ChatSelectStateImplCopyWith(_$ChatSelectStateImpl value, $Res Function(_$ChatSelectStateImpl) then) = __$$ChatSelectStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$ChatSelectStateImplCopyWithImpl<$Res>
extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateImpl>
class __$$ChatSelectStateImplCopyWithImpl<$Res> extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateImpl>
implements _$$ChatSelectStateImplCopyWith<$Res> {
__$$ChatSelectStateImplCopyWithImpl(
_$ChatSelectStateImpl _value, $Res Function(_$ChatSelectStateImpl) _then)
: super(_value, _then);
__$$ChatSelectStateImplCopyWithImpl(_$ChatSelectStateImpl _value, $Res Function(_$ChatSelectStateImpl) _then) : super(_value, _then);
/// Create a copy of ChatSelectState
/// with the given fields replaced by the non-null parameter values.
@@ -120,8 +114,7 @@ class _$ChatSelectStateImpl implements _ChatSelectState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$ChatSelectStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChatSelectStateImpl);
}
@override
@@ -208,20 +201,14 @@ abstract class _ChatSelectState implements ChatSelectState {
/// @nodoc
abstract class _$$ChatSelectStateLoadingImplCopyWith<$Res> {
factory _$$ChatSelectStateLoadingImplCopyWith(
_$ChatSelectStateLoadingImpl value,
$Res Function(_$ChatSelectStateLoadingImpl) then) =
factory _$$ChatSelectStateLoadingImplCopyWith(_$ChatSelectStateLoadingImpl value, $Res Function(_$ChatSelectStateLoadingImpl) then) =
__$$ChatSelectStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$ChatSelectStateLoadingImplCopyWithImpl<$Res>
extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateLoadingImpl>
class __$$ChatSelectStateLoadingImplCopyWithImpl<$Res> extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateLoadingImpl>
implements _$$ChatSelectStateLoadingImplCopyWith<$Res> {
__$$ChatSelectStateLoadingImplCopyWithImpl(
_$ChatSelectStateLoadingImpl _value,
$Res Function(_$ChatSelectStateLoadingImpl) _then)
: super(_value, _then);
__$$ChatSelectStateLoadingImplCopyWithImpl(_$ChatSelectStateLoadingImpl _value, $Res Function(_$ChatSelectStateLoadingImpl) _then) : super(_value, _then);
/// Create a copy of ChatSelectState
/// with the given fields replaced by the non-null parameter values.
@@ -239,9 +226,7 @@ class _$ChatSelectStateLoadingImpl implements ChatSelectStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatSelectStateLoadingImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChatSelectStateLoadingImpl);
}
@override
@@ -328,20 +313,17 @@ abstract class ChatSelectStateLoading implements ChatSelectState {
/// @nodoc
abstract class _$$ChatSelectStateErrorImplCopyWith<$Res> {
factory _$$ChatSelectStateErrorImplCopyWith(_$ChatSelectStateErrorImpl value,
$Res Function(_$ChatSelectStateErrorImpl) then) =
factory _$$ChatSelectStateErrorImplCopyWith(_$ChatSelectStateErrorImpl value, $Res Function(_$ChatSelectStateErrorImpl) then) =
__$$ChatSelectStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$ChatSelectStateErrorImplCopyWithImpl<$Res>
extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateErrorImpl>
class __$$ChatSelectStateErrorImplCopyWithImpl<$Res> extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateErrorImpl>
implements _$$ChatSelectStateErrorImplCopyWith<$Res> {
__$$ChatSelectStateErrorImplCopyWithImpl(_$ChatSelectStateErrorImpl _value,
$Res Function(_$ChatSelectStateErrorImpl) _then)
: super(_value, _then);
__$$ChatSelectStateErrorImplCopyWithImpl(_$ChatSelectStateErrorImpl _value, $Res Function(_$ChatSelectStateErrorImpl) _then) : super(_value, _then);
/// Create a copy of ChatSelectState
/// with the given fields replaced by the non-null parameter values.
@@ -377,8 +359,7 @@ class _$ChatSelectStateErrorImpl implements ChatSelectStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatSelectStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -389,10 +370,8 @@ class _$ChatSelectStateErrorImpl implements ChatSelectStateError {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl>
get copyWith =>
__$$ChatSelectStateErrorImplCopyWithImpl<_$ChatSelectStateErrorImpl>(
this, _$identity);
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl> get copyWith =>
__$$ChatSelectStateErrorImplCopyWithImpl<_$ChatSelectStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -470,35 +449,29 @@ class _$ChatSelectStateErrorImpl implements ChatSelectStateError {
}
abstract class ChatSelectStateError implements ChatSelectState {
const factory ChatSelectStateError({required final String errorMessage}) =
_$ChatSelectStateErrorImpl;
const factory ChatSelectStateError({required final String errorMessage}) = _$ChatSelectStateErrorImpl;
String get errorMessage;
/// Create a copy of ChatSelectState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl>
get copyWith => throw _privateConstructorUsedError;
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$ChatSelectStateLoadedImplCopyWith<$Res> {
factory _$$ChatSelectStateLoadedImplCopyWith(
_$ChatSelectStateLoadedImpl value,
$Res Function(_$ChatSelectStateLoadedImpl) then) =
factory _$$ChatSelectStateLoadedImplCopyWith(_$ChatSelectStateLoadedImpl value, $Res Function(_$ChatSelectStateLoadedImpl) then) =
__$$ChatSelectStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call({List<ChatRoom> chatRooms});
}
/// @nodoc
class __$$ChatSelectStateLoadedImplCopyWithImpl<$Res>
extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateLoadedImpl>
class __$$ChatSelectStateLoadedImplCopyWithImpl<$Res> extends _$ChatSelectStateCopyWithImpl<$Res, _$ChatSelectStateLoadedImpl>
implements _$$ChatSelectStateLoadedImplCopyWith<$Res> {
__$$ChatSelectStateLoadedImplCopyWithImpl(_$ChatSelectStateLoadedImpl _value,
$Res Function(_$ChatSelectStateLoadedImpl) _then)
: super(_value, _then);
__$$ChatSelectStateLoadedImplCopyWithImpl(_$ChatSelectStateLoadedImpl _value, $Res Function(_$ChatSelectStateLoadedImpl) _then) : super(_value, _then);
/// Create a copy of ChatSelectState
/// with the given fields replaced by the non-null parameter values.
@@ -519,10 +492,10 @@ class __$$ChatSelectStateLoadedImplCopyWithImpl<$Res>
/// @nodoc
class _$ChatSelectStateLoadedImpl implements ChatSelectStateLoaded {
const _$ChatSelectStateLoadedImpl({required final List<ChatRoom> chatRooms})
: _chatRooms = chatRooms;
const _$ChatSelectStateLoadedImpl({required final List<ChatRoom> chatRooms}) : _chatRooms = chatRooms;
final List<ChatRoom> _chatRooms;
@override
List<ChatRoom> get chatRooms {
if (_chatRooms is EqualUnmodifiableListView) return _chatRooms;
@@ -538,24 +511,19 @@ class _$ChatSelectStateLoadedImpl implements ChatSelectStateLoaded {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ChatSelectStateLoadedImpl &&
const DeepCollectionEquality()
.equals(other._chatRooms, _chatRooms));
(other.runtimeType == runtimeType && other is _$ChatSelectStateLoadedImpl && const DeepCollectionEquality().equals(other._chatRooms, _chatRooms));
}
@override
int get hashCode =>
Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
/// Create a copy of ChatSelectState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl>
get copyWith => __$$ChatSelectStateLoadedImplCopyWithImpl<
_$ChatSelectStateLoadedImpl>(this, _$identity);
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl> get copyWith =>
__$$ChatSelectStateLoadedImplCopyWithImpl<_$ChatSelectStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -633,14 +601,12 @@ class _$ChatSelectStateLoadedImpl implements ChatSelectStateLoaded {
}
abstract class ChatSelectStateLoaded implements ChatSelectState {
const factory ChatSelectStateLoaded(
{required final List<ChatRoom> chatRooms}) = _$ChatSelectStateLoadedImpl;
const factory ChatSelectStateLoaded({required final List<ChatRoom> chatRooms}) = _$ChatSelectStateLoadedImpl;
List<ChatRoom> get chatRooms;
/// Create a copy of ChatSelectState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl>
get copyWith => throw _privateConstructorUsedError;
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -1,15 +1,15 @@
import 'dart:io';
import 'package:eatvio_app/theme/custom_text_style.dart';
import 'package:eatvio_app/theme/theme_helper.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:intl/intl.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:eatvio_app/theme/custom_text_style.dart';
import 'package:eatvio_app/theme/theme_helper.dart';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:intl/intl.dart';
class ChatScreen extends StatefulWidget {
final String chatId;

View File

@@ -1,5 +1,4 @@
import 'package:easy_debounce/easy_debounce.dart';
import 'package:eatvio_app/features/chat/presentation/bloc/chat_select_cubit/chat_select_cubit.dart';
import 'package:eatvio_app/features/chat/presentation/bloc/chat_select_cubit/chat_select_state.dart';
import 'package:eatvio_app/features/chat/presentation/widgets/chat_entry_widget.dart';

View File

@@ -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/const.dart';
import 'package:eatvio_app/theme/app_decoration.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:photo_view/photo_view.dart';

View File

@@ -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/const.dart';
import 'package:eatvio_app/core/utils/date_time_utils.dart';
import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';

View File

@@ -1,11 +1,12 @@
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:eatvio_app/features/chat/models/chat_room_preview_model.dart';
import 'package:http_parser/http_parser.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:eatvio_app/features/chat/models/chat_room_preview_model.dart';
import 'package:eatvio_app/features/chat/models/websocket_info_model.dart';
import 'package:eatvio_app/features/chat/services/chat_service.dart';
import 'package:http_parser/http_parser.dart';
class ChatRepository {
final ChatService chatService;

View File

@@ -80,8 +80,7 @@ class _ChatService implements ChatService {
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
late Map<String, ChatRoomModel> _value;
try {
_value = _result.data!.map((k, dynamic v) =>
MapEntry(k, ChatRoomModel.fromJson(v as Map<String, dynamic>)));
_value = _result.data!.map((k, dynamic v) => MapEntry(k, ChatRoomModel.fromJson(v as Map<String, dynamic>)));
} on Object catch (e, s) {
errorLogger?.logError(e, s, _options);
rethrow;
@@ -199,9 +198,7 @@ class _ChatService implements ChatService {
}
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 {

View File

@@ -21,12 +21,19 @@ DiaryModel _$DiaryModelFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$DiaryModel {
int get id => throw _privateConstructorUsedError;
DateTime get date => throw _privateConstructorUsedError;
int get closed => throw _privateConstructorUsedError;
List<Meal> get meals => throw _privateConstructorUsedError;
State get state => throw _privateConstructorUsedError;
String? get comment => throw _privateConstructorUsedError;
DateTime? get wakeup => throw _privateConstructorUsedError;
DateTime? get retire => throw _privateConstructorUsedError;
/// Serializes this DiaryModel to a JSON map.
@@ -35,36 +42,26 @@ mixin _$DiaryModel {
/// Create a copy of DiaryModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DiaryModelCopyWith<DiaryModel> get copyWith =>
throw _privateConstructorUsedError;
$DiaryModelCopyWith<DiaryModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DiaryModelCopyWith<$Res> {
factory $DiaryModelCopyWith(
DiaryModel value, $Res Function(DiaryModel) then) =
_$DiaryModelCopyWithImpl<$Res, DiaryModel>;
factory $DiaryModelCopyWith(DiaryModel value, $Res Function(DiaryModel) then) = _$DiaryModelCopyWithImpl<$Res, DiaryModel>;
@useResult
$Res call(
{int id,
DateTime date,
int closed,
List<Meal> meals,
State state,
String? comment,
DateTime? wakeup,
DateTime? retire});
$Res call({int id, DateTime date, int closed, List<Meal> meals, State state, String? comment, DateTime? wakeup, DateTime? retire});
$StateCopyWith<$Res> get state;
}
/// @nodoc
class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel>
implements $DiaryModelCopyWith<$Res> {
class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel> implements $DiaryModelCopyWith<$Res> {
_$DiaryModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -130,34 +127,20 @@ class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel>
}
/// @nodoc
abstract class _$$DiaryModelImplCopyWith<$Res>
implements $DiaryModelCopyWith<$Res> {
factory _$$DiaryModelImplCopyWith(
_$DiaryModelImpl value, $Res Function(_$DiaryModelImpl) then) =
__$$DiaryModelImplCopyWithImpl<$Res>;
abstract class _$$DiaryModelImplCopyWith<$Res> implements $DiaryModelCopyWith<$Res> {
factory _$$DiaryModelImplCopyWith(_$DiaryModelImpl value, $Res Function(_$DiaryModelImpl) then) = __$$DiaryModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
DateTime date,
int closed,
List<Meal> meals,
State state,
String? comment,
DateTime? wakeup,
DateTime? retire});
$Res call({int id, DateTime date, int closed, List<Meal> meals, State state, String? comment, DateTime? wakeup, DateTime? retire});
@override
$StateCopyWith<$Res> get state;
}
/// @nodoc
class __$$DiaryModelImplCopyWithImpl<$Res>
extends _$DiaryModelCopyWithImpl<$Res, _$DiaryModelImpl>
implements _$$DiaryModelImplCopyWith<$Res> {
__$$DiaryModelImplCopyWithImpl(
_$DiaryModelImpl _value, $Res Function(_$DiaryModelImpl) _then)
: super(_value, _then);
class __$$DiaryModelImplCopyWithImpl<$Res> extends _$DiaryModelCopyWithImpl<$Res, _$DiaryModelImpl> implements _$$DiaryModelImplCopyWith<$Res> {
__$$DiaryModelImplCopyWithImpl(_$DiaryModelImpl _value, $Res Function(_$DiaryModelImpl) _then) : super(_value, _then);
/// Create a copy of DiaryModel
/// with the given fields replaced by the non-null parameter values.
@@ -224,8 +207,7 @@ class _$DiaryModelImpl implements _DiaryModel {
this.retire})
: _meals = meals;
factory _$DiaryModelImpl.fromJson(Map<String, dynamic> json) =>
_$$DiaryModelImplFromJson(json);
factory _$DiaryModelImpl.fromJson(Map<String, dynamic> json) => _$$DiaryModelImplFromJson(json);
@override
final int id;
@@ -234,6 +216,7 @@ class _$DiaryModelImpl implements _DiaryModel {
@override
final int closed;
final List<Meal> _meals;
@override
List<Meal> get meals {
if (_meals is EqualUnmodifiableListView) return _meals;
@@ -272,24 +255,14 @@ class _$DiaryModelImpl implements _DiaryModel {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
date,
closed,
const DeepCollectionEquality().hash(_meals),
state,
comment,
wakeup,
retire);
int get hashCode => Object.hash(runtimeType, id, date, closed, const DeepCollectionEquality().hash(_meals), state, comment, wakeup, retire);
/// Create a copy of DiaryModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
__$$DiaryModelImplCopyWithImpl<_$DiaryModelImpl>(this, _$identity);
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith => __$$DiaryModelImplCopyWithImpl<_$DiaryModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -310,23 +283,29 @@ abstract class _DiaryModel implements DiaryModel {
final DateTime? wakeup,
final DateTime? retire}) = _$DiaryModelImpl;
factory _DiaryModel.fromJson(Map<String, dynamic> json) =
_$DiaryModelImpl.fromJson;
factory _DiaryModel.fromJson(Map<String, dynamic> json) = _$DiaryModelImpl.fromJson;
@override
int get id;
@override
DateTime get date;
@override
int get closed;
@override
List<Meal> get meals;
@override
State get state;
@override
String? get comment;
@override
DateTime? get wakeup;
@override
DateTime? get retire;
@@ -334,6 +313,5 @@ abstract class _DiaryModel implements DiaryModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,26 +6,18 @@ part of 'diary_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$DiaryModelImpl _$$DiaryModelImplFromJson(Map<String, dynamic> json) =>
_$DiaryModelImpl(
_$DiaryModelImpl _$$DiaryModelImplFromJson(Map<String, dynamic> json) => _$DiaryModelImpl(
id: (json['id'] as num).toInt(),
date: DateTime.parse(json['date'] as String),
closed: (json['closed'] as num).toInt(),
meals: (json['meals'] as List<dynamic>)
.map((e) => Meal.fromJson(e as Map<String, dynamic>))
.toList(),
meals: (json['meals'] as List<dynamic>).map((e) => Meal.fromJson(e as Map<String, dynamic>)).toList(),
state: State.fromJson(json['state'] as Map<String, dynamic>),
comment: json['comment'] as String?,
wakeup: json['wakeup'] == null
? null
: DateTime.parse(json['wakeup'] as String),
retire: json['retire'] == null
? null
: DateTime.parse(json['retire'] as String),
wakeup: json['wakeup'] == null ? null : DateTime.parse(json['wakeup'] as String),
retire: json['retire'] == null ? null : DateTime.parse(json['retire'] as String),
);
Map<String, dynamic> _$$DiaryModelImplToJson(_$DiaryModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$DiaryModelImplToJson(_$DiaryModelImpl instance) => <String, dynamic>{
'id': instance.id,
'date': instance.date.toIso8601String(),
'closed': instance.closed,

View File

@@ -21,11 +21,17 @@ Meal _$MealFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$Meal {
int get id => throw _privateConstructorUsedError;
String get time => throw _privateConstructorUsedError;
int get type => throw _privateConstructorUsedError;
int get satiety => throw _privateConstructorUsedError;
int get mood => throw _privateConstructorUsedError;
List<Portion> get portions => throw _privateConstructorUsedError;
List<Photo> get photos => throw _privateConstructorUsedError;
/// Serializes this Meal to a JSON map.
@@ -39,26 +45,19 @@ mixin _$Meal {
/// @nodoc
abstract class $MealCopyWith<$Res> {
factory $MealCopyWith(Meal value, $Res Function(Meal) then) =
_$MealCopyWithImpl<$Res, Meal>;
factory $MealCopyWith(Meal value, $Res Function(Meal) then) = _$MealCopyWithImpl<$Res, Meal>;
@useResult
$Res call(
{int id,
String time,
int type,
int satiety,
int mood,
List<Portion> portions,
List<Photo> photos});
$Res call({int id, String time, int type, int satiety, int mood, List<Portion> portions, List<Photo> photos});
}
/// @nodoc
class _$MealCopyWithImpl<$Res, $Val extends Meal>
implements $MealCopyWith<$Res> {
class _$MealCopyWithImpl<$Res, $Val extends Meal> implements $MealCopyWith<$Res> {
_$MealCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -110,27 +109,16 @@ class _$MealCopyWithImpl<$Res, $Val extends Meal>
/// @nodoc
abstract class _$$MealImplCopyWith<$Res> implements $MealCopyWith<$Res> {
factory _$$MealImplCopyWith(
_$MealImpl value, $Res Function(_$MealImpl) then) =
__$$MealImplCopyWithImpl<$Res>;
factory _$$MealImplCopyWith(_$MealImpl value, $Res Function(_$MealImpl) then) = __$$MealImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
String time,
int type,
int satiety,
int mood,
List<Portion> portions,
List<Photo> photos});
$Res call({int id, String time, int type, int satiety, int mood, List<Portion> portions, List<Photo> photos});
}
/// @nodoc
class __$$MealImplCopyWithImpl<$Res>
extends _$MealCopyWithImpl<$Res, _$MealImpl>
implements _$$MealImplCopyWith<$Res> {
__$$MealImplCopyWithImpl(_$MealImpl _value, $Res Function(_$MealImpl) _then)
: super(_value, _then);
class __$$MealImplCopyWithImpl<$Res> extends _$MealCopyWithImpl<$Res, _$MealImpl> implements _$$MealImplCopyWith<$Res> {
__$$MealImplCopyWithImpl(_$MealImpl _value, $Res Function(_$MealImpl) _then) : super(_value, _then);
/// Create a copy of Meal
/// with the given fields replaced by the non-null parameter values.
@@ -192,8 +180,7 @@ class _$MealImpl implements _Meal {
: _portions = portions,
_photos = photos;
factory _$MealImpl.fromJson(Map<String, dynamic> json) =>
_$$MealImplFromJson(json);
factory _$MealImpl.fromJson(Map<String, dynamic> json) => _$$MealImplFromJson(json);
@override
final int id;
@@ -206,6 +193,7 @@ class _$MealImpl implements _Meal {
@override
final int mood;
final List<Portion> _portions;
@override
List<Portion> get portions {
if (_portions is EqualUnmodifiableListView) return _portions;
@@ -214,6 +202,7 @@ class _$MealImpl implements _Meal {
}
final List<Photo> _photos;
@override
List<Photo> get photos {
if (_photos is EqualUnmodifiableListView) return _photos;
@@ -242,23 +231,15 @@ class _$MealImpl implements _Meal {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
time,
type,
satiety,
mood,
const DeepCollectionEquality().hash(_portions),
const DeepCollectionEquality().hash(_photos));
int get hashCode =>
Object.hash(runtimeType, id, time, type, satiety, mood, const DeepCollectionEquality().hash(_portions), const DeepCollectionEquality().hash(_photos));
/// Create a copy of Meal
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
__$$MealImplCopyWithImpl<_$MealImpl>(this, _$identity);
_$$MealImplCopyWith<_$MealImpl> get copyWith => __$$MealImplCopyWithImpl<_$MealImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -282,16 +263,22 @@ abstract class _Meal implements Meal {
@override
int get id;
@override
String get time;
@override
int get type;
@override
int get satiety;
@override
int get mood;
@override
List<Portion> get portions;
@override
List<Photo> get photos;
@@ -299,6 +286,5 @@ abstract class _Meal implements Meal {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$MealImplCopyWith<_$MealImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -12,16 +12,11 @@ _$MealImpl _$$MealImplFromJson(Map<String, dynamic> json) => _$MealImpl(
type: (json['type'] as num).toInt(),
satiety: (json['satiety'] as num).toInt(),
mood: (json['mood'] as num).toInt(),
portions: (json['portions'] as List<dynamic>)
.map((e) => Portion.fromJson(e as Map<String, dynamic>))
.toList(),
photos: (json['photos'] as List<dynamic>)
.map((e) => Photo.fromJson(e as Map<String, dynamic>))
.toList(),
portions: (json['portions'] as List<dynamic>).map((e) => Portion.fromJson(e as Map<String, dynamic>)).toList(),
photos: (json['photos'] as List<dynamic>).map((e) => Photo.fromJson(e as Map<String, dynamic>)).toList(),
);
Map<String, dynamic> _$$MealImplToJson(_$MealImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$MealImplToJson(_$MealImpl instance) => <String, dynamic>{
'id': instance.id,
'time': instance.time,
'type': instance.type,

View File

@@ -1,7 +1,6 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'photo.freezed.dart';
part 'photo.g.dart';
@freezed

View File

@@ -21,8 +21,10 @@ Photo _$PhotoFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$Photo {
int get id => throw _privateConstructorUsedError;
@JsonKey(name: 'original_name')
String get originalName => throw _privateConstructorUsedError;
String get path => throw _privateConstructorUsedError;
/// Serializes this Photo to a JSON map.
@@ -36,22 +38,19 @@ mixin _$Photo {
/// @nodoc
abstract class $PhotoCopyWith<$Res> {
factory $PhotoCopyWith(Photo value, $Res Function(Photo) then) =
_$PhotoCopyWithImpl<$Res, Photo>;
factory $PhotoCopyWith(Photo value, $Res Function(Photo) then) = _$PhotoCopyWithImpl<$Res, Photo>;
@useResult
$Res call(
{int id,
@JsonKey(name: 'original_name') String originalName,
String path});
$Res call({int id, @JsonKey(name: 'original_name') String originalName, String path});
}
/// @nodoc
class _$PhotoCopyWithImpl<$Res, $Val extends Photo>
implements $PhotoCopyWith<$Res> {
class _$PhotoCopyWithImpl<$Res, $Val extends Photo> implements $PhotoCopyWith<$Res> {
_$PhotoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -83,24 +82,16 @@ class _$PhotoCopyWithImpl<$Res, $Val extends Photo>
/// @nodoc
abstract class _$$PhotoImplCopyWith<$Res> implements $PhotoCopyWith<$Res> {
factory _$$PhotoImplCopyWith(
_$PhotoImpl value, $Res Function(_$PhotoImpl) then) =
__$$PhotoImplCopyWithImpl<$Res>;
factory _$$PhotoImplCopyWith(_$PhotoImpl value, $Res Function(_$PhotoImpl) then) = __$$PhotoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
@JsonKey(name: 'original_name') String originalName,
String path});
$Res call({int id, @JsonKey(name: 'original_name') String originalName, String path});
}
/// @nodoc
class __$$PhotoImplCopyWithImpl<$Res>
extends _$PhotoCopyWithImpl<$Res, _$PhotoImpl>
implements _$$PhotoImplCopyWith<$Res> {
__$$PhotoImplCopyWithImpl(
_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then)
: super(_value, _then);
class __$$PhotoImplCopyWithImpl<$Res> extends _$PhotoCopyWithImpl<$Res, _$PhotoImpl> implements _$$PhotoImplCopyWith<$Res> {
__$$PhotoImplCopyWithImpl(_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then) : super(_value, _then);
/// Create a copy of Photo
/// with the given fields replaced by the non-null parameter values.
@@ -131,13 +122,9 @@ class __$$PhotoImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$PhotoImpl implements _Photo {
const _$PhotoImpl(
{required this.id,
@JsonKey(name: 'original_name') required this.originalName,
required this.path});
const _$PhotoImpl({required this.id, @JsonKey(name: 'original_name') required this.originalName, required this.path});
factory _$PhotoImpl.fromJson(Map<String, dynamic> json) =>
_$$PhotoImplFromJson(json);
factory _$PhotoImpl.fromJson(Map<String, dynamic> json) => _$$PhotoImplFromJson(json);
@override
final int id;
@@ -158,8 +145,7 @@ class _$PhotoImpl implements _Photo {
(other.runtimeType == runtimeType &&
other is _$PhotoImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.originalName, originalName) ||
other.originalName == originalName) &&
(identical(other.originalName, originalName) || other.originalName == originalName) &&
(identical(other.path, path) || other.path == path));
}
@@ -172,8 +158,7 @@ class _$PhotoImpl implements _Photo {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
__$$PhotoImplCopyWithImpl<_$PhotoImpl>(this, _$identity);
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith => __$$PhotoImplCopyWithImpl<_$PhotoImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -184,18 +169,17 @@ class _$PhotoImpl implements _Photo {
}
abstract class _Photo implements Photo {
const factory _Photo(
{required final int id,
@JsonKey(name: 'original_name') required final String originalName,
required final String path}) = _$PhotoImpl;
const factory _Photo({required final int id, @JsonKey(name: 'original_name') required final String originalName, required final String path}) = _$PhotoImpl;
factory _Photo.fromJson(Map<String, dynamic> json) = _$PhotoImpl.fromJson;
@override
int get id;
@override
@JsonKey(name: 'original_name')
String get originalName;
@override
String get path;
@@ -203,6 +187,5 @@ abstract class _Photo implements Photo {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -12,8 +12,7 @@ _$PhotoImpl _$$PhotoImplFromJson(Map<String, dynamic> json) => _$PhotoImpl(
path: json['path'] as String,
);
Map<String, dynamic> _$$PhotoImplToJson(_$PhotoImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$PhotoImplToJson(_$PhotoImpl instance) => <String, dynamic>{
'id': instance.id,
'original_name': instance.originalName,
'path': instance.path,

View File

@@ -21,9 +21,13 @@ Portion _$PortionFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$Portion {
int get id => throw _privateConstructorUsedError;
String get product_name => throw _privateConstructorUsedError;
int get quantity => throw _privateConstructorUsedError;
String get portion => throw _privateConstructorUsedError;
bool get from_diet => throw _privateConstructorUsedError;
/// Serializes this Portion to a JSON map.
@@ -37,24 +41,19 @@ mixin _$Portion {
/// @nodoc
abstract class $PortionCopyWith<$Res> {
factory $PortionCopyWith(Portion value, $Res Function(Portion) then) =
_$PortionCopyWithImpl<$Res, Portion>;
factory $PortionCopyWith(Portion value, $Res Function(Portion) then) = _$PortionCopyWithImpl<$Res, Portion>;
@useResult
$Res call(
{int id,
String product_name,
int quantity,
String portion,
bool from_diet});
$Res call({int id, String product_name, int quantity, String portion, bool from_diet});
}
/// @nodoc
class _$PortionCopyWithImpl<$Res, $Val extends Portion>
implements $PortionCopyWith<$Res> {
class _$PortionCopyWithImpl<$Res, $Val extends Portion> implements $PortionCopyWith<$Res> {
_$PortionCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -96,26 +95,16 @@ class _$PortionCopyWithImpl<$Res, $Val extends Portion>
/// @nodoc
abstract class _$$PortionImplCopyWith<$Res> implements $PortionCopyWith<$Res> {
factory _$$PortionImplCopyWith(
_$PortionImpl value, $Res Function(_$PortionImpl) then) =
__$$PortionImplCopyWithImpl<$Res>;
factory _$$PortionImplCopyWith(_$PortionImpl value, $Res Function(_$PortionImpl) then) = __$$PortionImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
String product_name,
int quantity,
String portion,
bool from_diet});
$Res call({int id, String product_name, int quantity, String portion, bool from_diet});
}
/// @nodoc
class __$$PortionImplCopyWithImpl<$Res>
extends _$PortionCopyWithImpl<$Res, _$PortionImpl>
implements _$$PortionImplCopyWith<$Res> {
__$$PortionImplCopyWithImpl(
_$PortionImpl _value, $Res Function(_$PortionImpl) _then)
: super(_value, _then);
class __$$PortionImplCopyWithImpl<$Res> extends _$PortionCopyWithImpl<$Res, _$PortionImpl> implements _$$PortionImplCopyWith<$Res> {
__$$PortionImplCopyWithImpl(_$PortionImpl _value, $Res Function(_$PortionImpl) _then) : super(_value, _then);
/// Create a copy of Portion
/// with the given fields replaced by the non-null parameter values.
@@ -156,15 +145,9 @@ class __$$PortionImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$PortionImpl implements _Portion {
const _$PortionImpl(
{required this.id,
required this.product_name,
required this.quantity,
required this.portion,
required this.from_diet});
const _$PortionImpl({required this.id, required this.product_name, required this.quantity, required this.portion, required this.from_diet});
factory _$PortionImpl.fromJson(Map<String, dynamic> json) =>
_$$PortionImplFromJson(json);
factory _$PortionImpl.fromJson(Map<String, dynamic> json) => _$$PortionImplFromJson(json);
@override
final int id;
@@ -188,27 +171,22 @@ class _$PortionImpl implements _Portion {
(other.runtimeType == runtimeType &&
other is _$PortionImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.product_name, product_name) ||
other.product_name == product_name) &&
(identical(other.quantity, quantity) ||
other.quantity == quantity) &&
(identical(other.product_name, product_name) || other.product_name == product_name) &&
(identical(other.quantity, quantity) || other.quantity == quantity) &&
(identical(other.portion, portion) || other.portion == portion) &&
(identical(other.from_diet, from_diet) ||
other.from_diet == from_diet));
(identical(other.from_diet, from_diet) || other.from_diet == from_diet));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, id, product_name, quantity, portion, from_diet);
int get hashCode => Object.hash(runtimeType, id, product_name, quantity, portion, from_diet);
/// Create a copy of Portion
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
__$$PortionImplCopyWithImpl<_$PortionImpl>(this, _$identity);
_$$PortionImplCopyWith<_$PortionImpl> get copyWith => __$$PortionImplCopyWithImpl<_$PortionImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -230,12 +208,16 @@ abstract class _Portion implements Portion {
@override
int get id;
@override
String get product_name;
@override
int get quantity;
@override
String get portion;
@override
bool get from_diet;
@@ -243,6 +225,5 @@ abstract class _Portion implements Portion {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$PortionImplCopyWith<_$PortionImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,8 +6,7 @@ part of 'portion.dart';
// JsonSerializableGenerator
// **************************************************************************
_$PortionImpl _$$PortionImplFromJson(Map<String, dynamic> json) =>
_$PortionImpl(
_$PortionImpl _$$PortionImplFromJson(Map<String, dynamic> json) => _$PortionImpl(
id: (json['id'] as num).toInt(),
product_name: json['product_name'] as String,
quantity: (json['quantity'] as num).toInt(),
@@ -15,8 +14,7 @@ _$PortionImpl _$$PortionImplFromJson(Map<String, dynamic> json) =>
from_diet: json['from_diet'] as bool,
);
Map<String, dynamic> _$$PortionImplToJson(_$PortionImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$PortionImplToJson(_$PortionImpl instance) => <String, dynamic>{
'id': instance.id,
'product_name': instance.product_name,
'quantity': instance.quantity,

View File

@@ -21,6 +21,7 @@ Product _$ProductFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$Product {
int get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
/// Serializes this Product to a JSON map.
@@ -34,19 +35,19 @@ mixin _$Product {
/// @nodoc
abstract class $ProductCopyWith<$Res> {
factory $ProductCopyWith(Product value, $Res Function(Product) then) =
_$ProductCopyWithImpl<$Res, Product>;
factory $ProductCopyWith(Product value, $Res Function(Product) then) = _$ProductCopyWithImpl<$Res, Product>;
@useResult
$Res call({int id, String name});
}
/// @nodoc
class _$ProductCopyWithImpl<$Res, $Val extends Product>
implements $ProductCopyWith<$Res> {
class _$ProductCopyWithImpl<$Res, $Val extends Product> implements $ProductCopyWith<$Res> {
_$ProductCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -73,21 +74,16 @@ class _$ProductCopyWithImpl<$Res, $Val extends Product>
/// @nodoc
abstract class _$$ProductImplCopyWith<$Res> implements $ProductCopyWith<$Res> {
factory _$$ProductImplCopyWith(
_$ProductImpl value, $Res Function(_$ProductImpl) then) =
__$$ProductImplCopyWithImpl<$Res>;
factory _$$ProductImplCopyWith(_$ProductImpl value, $Res Function(_$ProductImpl) then) = __$$ProductImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({int id, String name});
}
/// @nodoc
class __$$ProductImplCopyWithImpl<$Res>
extends _$ProductCopyWithImpl<$Res, _$ProductImpl>
implements _$$ProductImplCopyWith<$Res> {
__$$ProductImplCopyWithImpl(
_$ProductImpl _value, $Res Function(_$ProductImpl) _then)
: super(_value, _then);
class __$$ProductImplCopyWithImpl<$Res> extends _$ProductCopyWithImpl<$Res, _$ProductImpl> implements _$$ProductImplCopyWith<$Res> {
__$$ProductImplCopyWithImpl(_$ProductImpl _value, $Res Function(_$ProductImpl) _then) : super(_value, _then);
/// Create a copy of Product
/// with the given fields replaced by the non-null parameter values.
@@ -115,8 +111,7 @@ class __$$ProductImplCopyWithImpl<$Res>
class _$ProductImpl implements _Product {
const _$ProductImpl({required this.id, required this.name});
factory _$ProductImpl.fromJson(Map<String, dynamic> json) =>
_$$ProductImplFromJson(json);
factory _$ProductImpl.fromJson(Map<String, dynamic> json) => _$$ProductImplFromJson(json);
@override
final int id;
@@ -146,8 +141,7 @@ class _$ProductImpl implements _Product {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
__$$ProductImplCopyWithImpl<_$ProductImpl>(this, _$identity);
_$$ProductImplCopyWith<_$ProductImpl> get copyWith => __$$ProductImplCopyWithImpl<_$ProductImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -158,13 +152,13 @@ class _$ProductImpl implements _Product {
}
abstract class _Product implements Product {
const factory _Product({required final int id, required final String name}) =
_$ProductImpl;
const factory _Product({required final int id, required final String name}) = _$ProductImpl;
factory _Product.fromJson(Map<String, dynamic> json) = _$ProductImpl.fromJson;
@override
int get id;
@override
String get name;
@@ -172,6 +166,5 @@ abstract class _Product implements Product {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ProductImplCopyWith<_$ProductImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,14 +6,12 @@ part of 'product.dart';
// JsonSerializableGenerator
// **************************************************************************
_$ProductImpl _$$ProductImplFromJson(Map<String, dynamic> json) =>
_$ProductImpl(
_$ProductImpl _$$ProductImplFromJson(Map<String, dynamic> json) => _$ProductImpl(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
);
Map<String, dynamic> _$$ProductImplToJson(_$ProductImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$ProductImplToJson(_$ProductImpl instance) => <String, dynamic>{
'id': instance.id,
'name': instance.name,
};

View File

@@ -21,6 +21,7 @@ State _$StateFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$State {
bool get has_chosen_diet => throw _privateConstructorUsedError;
bool get has_chosen_plan => throw _privateConstructorUsedError;
/// Serializes this State to a JSON map.
@@ -34,19 +35,19 @@ mixin _$State {
/// @nodoc
abstract class $StateCopyWith<$Res> {
factory $StateCopyWith(State value, $Res Function(State) then) =
_$StateCopyWithImpl<$Res, State>;
factory $StateCopyWith(State value, $Res Function(State) then) = _$StateCopyWithImpl<$Res, State>;
@useResult
$Res call({bool has_chosen_diet, bool has_chosen_plan});
}
/// @nodoc
class _$StateCopyWithImpl<$Res, $Val extends State>
implements $StateCopyWith<$Res> {
class _$StateCopyWithImpl<$Res, $Val extends State> implements $StateCopyWith<$Res> {
_$StateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -73,21 +74,16 @@ class _$StateCopyWithImpl<$Res, $Val extends State>
/// @nodoc
abstract class _$$StateImplCopyWith<$Res> implements $StateCopyWith<$Res> {
factory _$$StateImplCopyWith(
_$StateImpl value, $Res Function(_$StateImpl) then) =
__$$StateImplCopyWithImpl<$Res>;
factory _$$StateImplCopyWith(_$StateImpl value, $Res Function(_$StateImpl) then) = __$$StateImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({bool has_chosen_diet, bool has_chosen_plan});
}
/// @nodoc
class __$$StateImplCopyWithImpl<$Res>
extends _$StateCopyWithImpl<$Res, _$StateImpl>
implements _$$StateImplCopyWith<$Res> {
__$$StateImplCopyWithImpl(
_$StateImpl _value, $Res Function(_$StateImpl) _then)
: super(_value, _then);
class __$$StateImplCopyWithImpl<$Res> extends _$StateCopyWithImpl<$Res, _$StateImpl> implements _$$StateImplCopyWith<$Res> {
__$$StateImplCopyWithImpl(_$StateImpl _value, $Res Function(_$StateImpl) _then) : super(_value, _then);
/// Create a copy of State
/// with the given fields replaced by the non-null parameter values.
@@ -113,11 +109,9 @@ class __$$StateImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$StateImpl implements _State {
const _$StateImpl(
{required this.has_chosen_diet, required this.has_chosen_plan});
const _$StateImpl({required this.has_chosen_diet, required this.has_chosen_plan});
factory _$StateImpl.fromJson(Map<String, dynamic> json) =>
_$$StateImplFromJson(json);
factory _$StateImpl.fromJson(Map<String, dynamic> json) => _$$StateImplFromJson(json);
@override
final bool has_chosen_diet;
@@ -134,24 +128,20 @@ class _$StateImpl implements _State {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$StateImpl &&
(identical(other.has_chosen_diet, has_chosen_diet) ||
other.has_chosen_diet == has_chosen_diet) &&
(identical(other.has_chosen_plan, has_chosen_plan) ||
other.has_chosen_plan == has_chosen_plan));
(identical(other.has_chosen_diet, has_chosen_diet) || other.has_chosen_diet == has_chosen_diet) &&
(identical(other.has_chosen_plan, has_chosen_plan) || other.has_chosen_plan == has_chosen_plan));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, has_chosen_diet, has_chosen_plan);
int get hashCode => Object.hash(runtimeType, has_chosen_diet, has_chosen_plan);
/// Create a copy of State
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$StateImplCopyWith<_$StateImpl> get copyWith =>
__$$StateImplCopyWithImpl<_$StateImpl>(this, _$identity);
_$$StateImplCopyWith<_$StateImpl> get copyWith => __$$StateImplCopyWithImpl<_$StateImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -162,14 +152,13 @@ class _$StateImpl implements _State {
}
abstract class _State implements State {
const factory _State(
{required final bool has_chosen_diet,
required final bool has_chosen_plan}) = _$StateImpl;
const factory _State({required final bool has_chosen_diet, required final bool has_chosen_plan}) = _$StateImpl;
factory _State.fromJson(Map<String, dynamic> json) = _$StateImpl.fromJson;
@override
bool get has_chosen_diet;
@override
bool get has_chosen_plan;
@@ -177,6 +166,5 @@ abstract class _State implements State {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$StateImplCopyWith<_$StateImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$StateImplCopyWith<_$StateImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -11,8 +11,7 @@ _$StateImpl _$$StateImplFromJson(Map<String, dynamic> json) => _$StateImpl(
has_chosen_plan: json['has_chosen_plan'] as bool,
);
Map<String, dynamic> _$$StateImplToJson(_$StateImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$StateImplToJson(_$StateImpl instance) => <String, dynamic>{
'has_chosen_diet': instance.has_chosen_diet,
'has_chosen_plan': instance.has_chosen_plan,
};

View File

@@ -1,4 +1,5 @@
import 'dart:async';
import 'package:eatvio_app/data/models/selectionPopupModel/selection_popup_model.dart';
import 'package:eatvio_app/features/diary/models/diary_model.dart';
import 'package:eatvio_app/features/diary/models/meal.dart';
@@ -10,6 +11,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:image_picker/image_picker.dart';
import 'package:intl/intl.dart';
part 'diary_event.dart';
/// A bloc that manages the state of a Diary according to the event that is dispatched to it.

View File

@@ -182,6 +182,7 @@ class RefreshEvent extends DiaryEvent {
class ConfirmPortion extends DiaryEvent {
ConfirmPortion(this.id);
int id;
@override

View File

@@ -54,6 +54,7 @@ mixin _$DiaryState {
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -160,18 +161,16 @@ mixin _$DiaryState {
/// @nodoc
abstract class $DiaryStateCopyWith<$Res> {
factory $DiaryStateCopyWith(
DiaryState value, $Res Function(DiaryState) then) =
_$DiaryStateCopyWithImpl<$Res, DiaryState>;
factory $DiaryStateCopyWith(DiaryState value, $Res Function(DiaryState) then) = _$DiaryStateCopyWithImpl<$Res, DiaryState>;
}
/// @nodoc
class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState>
implements $DiaryStateCopyWith<$Res> {
class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState> implements $DiaryStateCopyWith<$Res> {
_$DiaryStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -181,18 +180,12 @@ class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState>
/// @nodoc
abstract class _$$DiaryStateImplCopyWith<$Res> {
factory _$$DiaryStateImplCopyWith(
_$DiaryStateImpl value, $Res Function(_$DiaryStateImpl) then) =
__$$DiaryStateImplCopyWithImpl<$Res>;
factory _$$DiaryStateImplCopyWith(_$DiaryStateImpl value, $Res Function(_$DiaryStateImpl) then) = __$$DiaryStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$DiaryStateImplCopyWithImpl<$Res>
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateImpl>
implements _$$DiaryStateImplCopyWith<$Res> {
__$$DiaryStateImplCopyWithImpl(
_$DiaryStateImpl _value, $Res Function(_$DiaryStateImpl) _then)
: super(_value, _then);
class __$$DiaryStateImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateImpl> implements _$$DiaryStateImplCopyWith<$Res> {
__$$DiaryStateImplCopyWithImpl(_$DiaryStateImpl _value, $Res Function(_$DiaryStateImpl) _then) : super(_value, _then);
/// Create a copy of DiaryState
/// with the given fields replaced by the non-null parameter values.
@@ -210,8 +203,7 @@ class _$DiaryStateImpl implements _DiaryState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$DiaryStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$DiaryStateImpl);
}
@override
@@ -388,20 +380,17 @@ abstract class _DiaryState implements DiaryState {
/// @nodoc
abstract class _$$DiaryStateLoadingImplCopyWith<$Res> {
factory _$$DiaryStateLoadingImplCopyWith(_$DiaryStateLoadingImpl value,
$Res Function(_$DiaryStateLoadingImpl) then) =
factory _$$DiaryStateLoadingImplCopyWith(_$DiaryStateLoadingImpl value, $Res Function(_$DiaryStateLoadingImpl) then) =
__$$DiaryStateLoadingImplCopyWithImpl<$Res>;
@useResult
$Res call({int? id});
}
/// @nodoc
class __$$DiaryStateLoadingImplCopyWithImpl<$Res>
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadingImpl>
class __$$DiaryStateLoadingImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadingImpl>
implements _$$DiaryStateLoadingImplCopyWith<$Res> {
__$$DiaryStateLoadingImplCopyWithImpl(_$DiaryStateLoadingImpl _value,
$Res Function(_$DiaryStateLoadingImpl) _then)
: super(_value, _then);
__$$DiaryStateLoadingImplCopyWithImpl(_$DiaryStateLoadingImpl _value, $Res Function(_$DiaryStateLoadingImpl) _then) : super(_value, _then);
/// Create a copy of DiaryState
/// with the given fields replaced by the non-null parameter values.
@@ -434,10 +423,7 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DiaryStateLoadingImpl &&
(identical(other.id, id) || other.id == id));
return identical(this, other) || (other.runtimeType == runtimeType && other is _$DiaryStateLoadingImpl && (identical(other.id, id) || other.id == id));
}
@override
@@ -448,9 +434,7 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
__$$DiaryStateLoadingImplCopyWithImpl<_$DiaryStateLoadingImpl>(
this, _$identity);
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith => __$$DiaryStateLoadingImplCopyWithImpl<_$DiaryStateLoadingImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -625,15 +609,14 @@ abstract class DiaryStateLoading implements DiaryState {
/// Create a copy of DiaryState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$DiaryStateLoadedImplCopyWith<$Res> {
factory _$$DiaryStateLoadedImplCopyWith(_$DiaryStateLoadedImpl value,
$Res Function(_$DiaryStateLoadedImpl) then) =
factory _$$DiaryStateLoadedImplCopyWith(_$DiaryStateLoadedImpl value, $Res Function(_$DiaryStateLoadedImpl) then) =
__$$DiaryStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call(
{DiaryModel diary,
@@ -667,17 +650,16 @@ abstract class _$$DiaryStateLoadedImplCopyWith<$Res> {
List<NutritionData>? chartDataCounted});
$DiaryModelCopyWith<$Res> get diary;
$MealCopyWith<$Res> get currentMeal;
$SelectionPopupModelCopyWith<$Res> get portionController;
}
/// @nodoc
class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadedImpl>
class __$$DiaryStateLoadedImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadedImpl>
implements _$$DiaryStateLoadedImplCopyWith<$Res> {
__$$DiaryStateLoadedImplCopyWithImpl(_$DiaryStateLoadedImpl _value,
$Res Function(_$DiaryStateLoadedImpl) _then)
: super(_value, _then);
__$$DiaryStateLoadedImplCopyWithImpl(_$DiaryStateLoadedImpl _value, $Res Function(_$DiaryStateLoadedImpl) _then) : super(_value, _then);
/// Create a copy of DiaryState
/// with the given fields replaced by the non-null parameter values.
@@ -859,8 +841,7 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
@override
@pragma('vm:prefer-inline')
$SelectionPopupModelCopyWith<$Res> get portionController {
return $SelectionPopupModelCopyWith<$Res>(_value.portionController,
(value) {
return $SelectionPopupModelCopyWith<$Res>(_value.portionController, (value) {
return _then(_value.copyWith(portionController: value));
});
}
@@ -913,24 +894,25 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
@override
final String? diaryDate;
final List<int> _recommendedChartValues;
@override
List<int> get recommendedChartValues {
if (_recommendedChartValues is EqualUnmodifiableListView)
return _recommendedChartValues;
if (_recommendedChartValues is EqualUnmodifiableListView) return _recommendedChartValues;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_recommendedChartValues);
}
final List<int> _consumedChartValues;
@override
List<int> get consumedChartValues {
if (_consumedChartValues is EqualUnmodifiableListView)
return _consumedChartValues;
if (_consumedChartValues is EqualUnmodifiableListView) return _consumedChartValues;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_consumedChartValues);
}
final List<Portion> _portions;
@override
List<Portion> get portions {
if (_portions is EqualUnmodifiableListView) return _portions;
@@ -939,6 +921,7 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
}
final List<SelectionPopupModel> _mealList;
@override
List<SelectionPopupModel> get mealList {
if (_mealList is EqualUnmodifiableListView) return _mealList;
@@ -947,6 +930,7 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
}
final List<SelectionPopupModel> _portionList;
@override
List<SelectionPopupModel> get portionList {
if (_portionList is EqualUnmodifiableListView) return _portionList;
@@ -955,15 +939,16 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
}
final List<Product> _autocompleteList;
@override
List<Product> get autocompleteList {
if (_autocompleteList is EqualUnmodifiableListView)
return _autocompleteList;
if (_autocompleteList is EqualUnmodifiableListView) return _autocompleteList;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_autocompleteList);
}
final Map<String, dynamic> _chartData;
@override
Map<String, dynamic> get chartData {
if (_chartData is EqualUnmodifiableMapView) return _chartData;
@@ -1010,12 +995,12 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
@override
final bool isAdded;
final List<NutritionData>? _chartDataCounted;
@override
List<NutritionData>? get chartDataCounted {
final value = _chartDataCounted;
if (value == null) return null;
if (_chartDataCounted is EqualUnmodifiableListView)
return _chartDataCounted;
if (_chartDataCounted is EqualUnmodifiableListView) return _chartDataCounted;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@@ -1031,60 +1016,34 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
(other.runtimeType == runtimeType &&
other is _$DiaryStateLoadedImpl &&
(identical(other.diary, diary) || other.diary == diary) &&
(identical(other.diaryDate, diaryDate) ||
other.diaryDate == diaryDate) &&
const DeepCollectionEquality().equals(
other._recommendedChartValues, _recommendedChartValues) &&
const DeepCollectionEquality()
.equals(other._consumedChartValues, _consumedChartValues) &&
(identical(other.diaryDate, diaryDate) || other.diaryDate == diaryDate) &&
const DeepCollectionEquality().equals(other._recommendedChartValues, _recommendedChartValues) &&
const DeepCollectionEquality().equals(other._consumedChartValues, _consumedChartValues) &&
const DeepCollectionEquality().equals(other._portions, _portions) &&
const DeepCollectionEquality().equals(other._mealList, _mealList) &&
const DeepCollectionEquality()
.equals(other._portionList, _portionList) &&
const DeepCollectionEquality()
.equals(other._autocompleteList, _autocompleteList) &&
const DeepCollectionEquality()
.equals(other._chartData, _chartData) &&
(identical(other.currentMeal, currentMeal) ||
other.currentMeal == currentMeal) &&
(identical(other.portionController, portionController) ||
other.portionController == portionController) &&
(identical(other.wakeupController, wakeupController) ||
other.wakeupController == wakeupController) &&
(identical(other.retireController, retireController) ||
other.retireController == retireController) &&
(identical(other.mealTimeController, mealTimeController) ||
other.mealTimeController == mealTimeController) &&
(identical(other.commentController, commentController) ||
other.commentController == commentController) &&
(identical(other.product_nameController, product_nameController) ||
other.product_nameController == product_nameController) &&
(identical(other.productQuantityController,
productQuantityController) ||
other.productQuantityController == productQuantityController) &&
(identical(other.caloriesController, caloriesController) ||
other.caloriesController == caloriesController) &&
(identical(other.fatsController, fatsController) ||
other.fatsController == fatsController) &&
(identical(other.proteinsController, proteinsController) ||
other.proteinsController == proteinsController) &&
(identical(other.carbsController, carbsController) ||
other.carbsController == carbsController) &&
(identical(other.selectedMood, selectedMood) ||
other.selectedMood == selectedMood) &&
(identical(other.selectedSatiety, selectedSatiety) ||
other.selectedSatiety == selectedSatiety) &&
(identical(other.wakeupExpanded, wakeupExpanded) ||
other.wakeupExpanded == wakeupExpanded) &&
(identical(other.moderationExpanded, moderationExpanded) ||
other.moderationExpanded == moderationExpanded) &&
(identical(other.moodExpanded, moodExpanded) ||
other.moodExpanded == moodExpanded) &&
(identical(other.isLoading, isLoading) ||
other.isLoading == isLoading) &&
const DeepCollectionEquality().equals(other._portionList, _portionList) &&
const DeepCollectionEquality().equals(other._autocompleteList, _autocompleteList) &&
const DeepCollectionEquality().equals(other._chartData, _chartData) &&
(identical(other.currentMeal, currentMeal) || other.currentMeal == currentMeal) &&
(identical(other.portionController, portionController) || other.portionController == portionController) &&
(identical(other.wakeupController, wakeupController) || other.wakeupController == wakeupController) &&
(identical(other.retireController, retireController) || other.retireController == retireController) &&
(identical(other.mealTimeController, mealTimeController) || other.mealTimeController == mealTimeController) &&
(identical(other.commentController, commentController) || other.commentController == commentController) &&
(identical(other.product_nameController, product_nameController) || other.product_nameController == product_nameController) &&
(identical(other.productQuantityController, productQuantityController) || other.productQuantityController == productQuantityController) &&
(identical(other.caloriesController, caloriesController) || other.caloriesController == caloriesController) &&
(identical(other.fatsController, fatsController) || other.fatsController == fatsController) &&
(identical(other.proteinsController, proteinsController) || other.proteinsController == proteinsController) &&
(identical(other.carbsController, carbsController) || other.carbsController == carbsController) &&
(identical(other.selectedMood, selectedMood) || other.selectedMood == selectedMood) &&
(identical(other.selectedSatiety, selectedSatiety) || other.selectedSatiety == selectedSatiety) &&
(identical(other.wakeupExpanded, wakeupExpanded) || other.wakeupExpanded == wakeupExpanded) &&
(identical(other.moderationExpanded, moderationExpanded) || other.moderationExpanded == moderationExpanded) &&
(identical(other.moodExpanded, moodExpanded) || other.moodExpanded == moodExpanded) &&
(identical(other.isLoading, isLoading) || other.isLoading == isLoading) &&
(identical(other.isAdded, isAdded) || other.isAdded == isAdded) &&
const DeepCollectionEquality()
.equals(other._chartDataCounted, _chartDataCounted));
const DeepCollectionEquality().equals(other._chartDataCounted, _chartDataCounted));
}
@override
@@ -1126,9 +1085,7 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
__$$DiaryStateLoadedImplCopyWithImpl<_$DiaryStateLoadedImpl>(
this, _$identity);
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith => __$$DiaryStateLoadedImplCopyWithImpl<_$DiaryStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -1415,58 +1372,80 @@ abstract class DiaryStateLoaded implements DiaryState {
final List<NutritionData>? chartDataCounted}) = _$DiaryStateLoadedImpl;
DiaryModel get diary;
String? get diaryDate;
List<int> get recommendedChartValues;
List<int> get consumedChartValues;
List<Portion> get portions;
List<SelectionPopupModel> get mealList;
List<SelectionPopupModel> get portionList;
List<Product> get autocompleteList;
Map<String, dynamic> get chartData;
Meal get currentMeal;
SelectionPopupModel get portionController;
TimeOfDay get wakeupController;
TimeOfDay get retireController;
TimeOfDay? get mealTimeController;
TextEditingController get commentController;
TextEditingController get product_nameController;
TextEditingController get productQuantityController;
TextEditingController get caloriesController;
TextEditingController get fatsController;
TextEditingController get proteinsController;
TextEditingController get carbsController;
int get selectedMood;
int get selectedSatiety;
bool get wakeupExpanded;
bool get moderationExpanded;
bool get moodExpanded;
bool get isLoading;
bool get isAdded;
List<NutritionData>? get chartDataCounted;
/// Create a copy of DiaryState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$DiaryStateErrorImplCopyWith<$Res> {
factory _$$DiaryStateErrorImplCopyWith(_$DiaryStateErrorImpl value,
$Res Function(_$DiaryStateErrorImpl) then) =
__$$DiaryStateErrorImplCopyWithImpl<$Res>;
factory _$$DiaryStateErrorImplCopyWith(_$DiaryStateErrorImpl value, $Res Function(_$DiaryStateErrorImpl) then) = __$$DiaryStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$DiaryStateErrorImplCopyWithImpl<$Res>
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateErrorImpl>
implements _$$DiaryStateErrorImplCopyWith<$Res> {
__$$DiaryStateErrorImplCopyWithImpl(
_$DiaryStateErrorImpl _value, $Res Function(_$DiaryStateErrorImpl) _then)
: super(_value, _then);
class __$$DiaryStateErrorImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateErrorImpl> implements _$$DiaryStateErrorImplCopyWith<$Res> {
__$$DiaryStateErrorImplCopyWithImpl(_$DiaryStateErrorImpl _value, $Res Function(_$DiaryStateErrorImpl) _then) : super(_value, _then);
/// Create a copy of DiaryState
/// with the given fields replaced by the non-null parameter values.
@@ -1502,8 +1481,7 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DiaryStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -1514,9 +1492,7 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
__$$DiaryStateErrorImplCopyWithImpl<_$DiaryStateErrorImpl>(
this, _$identity);
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith => __$$DiaryStateErrorImplCopyWithImpl<_$DiaryStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -1684,14 +1660,12 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
}
abstract class DiaryStateError implements DiaryState {
const factory DiaryStateError({required final String errorMessage}) =
_$DiaryStateErrorImpl;
const factory DiaryStateError({required final String errorMessage}) = _$DiaryStateErrorImpl;
String get errorMessage;
/// Create a copy of DiaryState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -3,7 +3,6 @@
import 'package:eatvio_app/features/diary/models/portion.dart';
import 'package:eatvio_app/features/diary/presentation/bloc/diary_bloc.dart';
import 'package:eatvio_app/features/diary/presentation/bloc/diary_state.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';

View File

@@ -11,15 +11,13 @@ import 'package:eatvio_app/features/diary/models/product.dart';
import 'package:eatvio_app/features/diary/presentation/bloc/diary_bloc.dart';
import 'package:eatvio_app/features/diary/presentation/bloc/diary_state.dart';
import 'package:eatvio_app/localization/app_localization.dart';
import 'package:eatvio_app/locator_service.dart';
import 'package:eatvio_app/theme/app_decoration.dart';
import 'package:eatvio_app/theme/custom_text_style.dart';
import 'package:eatvio_app/theme/theme_helper.dart';
import 'package:eatvio_app/widgets/custom_edit_text_form_field.dart';
import 'package:eatvio_app/widgets/custom_edit_drop_down.dart';
import 'package:eatvio_app/widgets/custom_edit_text_form_field.dart';
import 'package:eatvio_app/widgets/custom_scale_element.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

View File

@@ -79,8 +79,7 @@ class _DiaryService implements DiaryService {
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
late Map<String, DiaryModel> _value;
try {
_value = _result.data!.map((k, dynamic v) =>
MapEntry(k, DiaryModel.fromJson(v as Map<String, dynamic>)));
_value = _result.data!.map((k, dynamic v) => MapEntry(k, DiaryModel.fromJson(v as Map<String, dynamic>)));
} on Object catch (e, s) {
errorLogger?.logError(e, s, _options);
rethrow;
@@ -140,11 +139,7 @@ class _DiaryService implements DiaryService {
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
late Map<String, List<Product>> _value;
try {
_value = _result.data!.map((k, dynamic v) => MapEntry(
k,
(v as List)
.map((i) => Product.fromJson(i as Map<String, dynamic>))
.toList()));
_value = _result.data!.map((k, dynamic v) => MapEntry(k, (v as List).map((i) => Product.fromJson(i as Map<String, dynamic>)).toList()));
} on Object catch (e, s) {
errorLogger?.logError(e, s, _options);
rethrow;
@@ -333,8 +328,7 @@ class _DiaryService implements DiaryService {
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
late Map<String, Portion> _value;
try {
_value = _result.data!.map((k, dynamic v) =>
MapEntry(k, Portion.fromJson(v as Map<String, dynamic>)));
_value = _result.data!.map((k, dynamic v) => MapEntry(k, Portion.fromJson(v as Map<String, dynamic>)));
} on Object catch (e, s) {
errorLogger?.logError(e, s, _options);
rethrow;
@@ -511,9 +505,7 @@ class _DiaryService implements DiaryService {
}
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 {

View File

@@ -1,7 +1,7 @@
import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:eatvio_app/core/const.dart';
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart';
import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_cubit.dart';
import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_state.dart';

View File

@@ -1,4 +1,4 @@
import 'package:eatvio_app/core/models/base_models.dart';
import 'package:eatvio_app/core/models/pagination_model.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'comment_model.freezed.dart';

View File

@@ -22,8 +22,10 @@ CommentModel _$CommentModelFromJson(Map<String, dynamic> json) {
mixin _$CommentModel {
@JsonKey(name: "data")
List<Comment> get data => throw _privateConstructorUsedError;
@JsonKey(name: "links")
Links get links => throw _privateConstructorUsedError;
@JsonKey(name: "meta")
Meta get meta => throw _privateConstructorUsedError;
@@ -33,32 +35,28 @@ mixin _$CommentModel {
/// Create a copy of CommentModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$CommentModelCopyWith<CommentModel> get copyWith =>
throw _privateConstructorUsedError;
$CommentModelCopyWith<CommentModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $CommentModelCopyWith<$Res> {
factory $CommentModelCopyWith(
CommentModel value, $Res Function(CommentModel) then) =
_$CommentModelCopyWithImpl<$Res, CommentModel>;
factory $CommentModelCopyWith(CommentModel value, $Res Function(CommentModel) then) = _$CommentModelCopyWithImpl<$Res, CommentModel>;
@useResult
$Res call(
{@JsonKey(name: "data") List<Comment> data,
@JsonKey(name: "links") Links links,
@JsonKey(name: "meta") Meta meta});
$Res call({@JsonKey(name: "data") List<Comment> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
$LinksCopyWith<$Res> get links;
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel>
implements $CommentModelCopyWith<$Res> {
class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel> implements $CommentModelCopyWith<$Res> {
_$CommentModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -109,31 +107,23 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel>
}
/// @nodoc
abstract class _$$CommentModelImplCopyWith<$Res>
implements $CommentModelCopyWith<$Res> {
factory _$$CommentModelImplCopyWith(
_$CommentModelImpl value, $Res Function(_$CommentModelImpl) then) =
__$$CommentModelImplCopyWithImpl<$Res>;
abstract class _$$CommentModelImplCopyWith<$Res> implements $CommentModelCopyWith<$Res> {
factory _$$CommentModelImplCopyWith(_$CommentModelImpl value, $Res Function(_$CommentModelImpl) then) = __$$CommentModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: "data") List<Comment> data,
@JsonKey(name: "links") Links links,
@JsonKey(name: "meta") Meta meta});
$Res call({@JsonKey(name: "data") List<Comment> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
@override
$LinksCopyWith<$Res> get links;
@override
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class __$$CommentModelImplCopyWithImpl<$Res>
extends _$CommentModelCopyWithImpl<$Res, _$CommentModelImpl>
implements _$$CommentModelImplCopyWith<$Res> {
__$$CommentModelImplCopyWithImpl(
_$CommentModelImpl _value, $Res Function(_$CommentModelImpl) _then)
: super(_value, _then);
class __$$CommentModelImplCopyWithImpl<$Res> extends _$CommentModelCopyWithImpl<$Res, _$CommentModelImpl> implements _$$CommentModelImplCopyWith<$Res> {
__$$CommentModelImplCopyWithImpl(_$CommentModelImpl _value, $Res Function(_$CommentModelImpl) _then) : super(_value, _then);
/// Create a copy of CommentModel
/// with the given fields replaced by the non-null parameter values.
@@ -165,15 +155,13 @@ class __$$CommentModelImplCopyWithImpl<$Res>
@JsonSerializable()
class _$CommentModelImpl implements _CommentModel {
const _$CommentModelImpl(
{@JsonKey(name: "data") required final List<Comment> data,
@JsonKey(name: "links") required this.links,
@JsonKey(name: "meta") required this.meta})
{@JsonKey(name: "data") required final List<Comment> data, @JsonKey(name: "links") required this.links, @JsonKey(name: "meta") required this.meta})
: _data = data;
factory _$CommentModelImpl.fromJson(Map<String, dynamic> json) =>
_$$CommentModelImplFromJson(json);
factory _$CommentModelImpl.fromJson(Map<String, dynamic> json) => _$$CommentModelImplFromJson(json);
final List<Comment> _data;
@override
@JsonKey(name: "data")
List<Comment> get data {
@@ -206,16 +194,14 @@ class _$CommentModelImpl implements _CommentModel {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
/// Create a copy of CommentModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
__$$CommentModelImplCopyWithImpl<_$CommentModelImpl>(this, _$identity);
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith => __$$CommentModelImplCopyWithImpl<_$CommentModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -231,15 +217,16 @@ abstract class _CommentModel implements CommentModel {
@JsonKey(name: "links") required final Links links,
@JsonKey(name: "meta") required final Meta meta}) = _$CommentModelImpl;
factory _CommentModel.fromJson(Map<String, dynamic> json) =
_$CommentModelImpl.fromJson;
factory _CommentModel.fromJson(Map<String, dynamic> json) = _$CommentModelImpl.fromJson;
@override
@JsonKey(name: "data")
List<Comment> get data;
@override
@JsonKey(name: "links")
Links get links;
@override
@JsonKey(name: "meta")
Meta get meta;
@@ -248,8 +235,7 @@ abstract class _CommentModel implements CommentModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith => throw _privateConstructorUsedError;
}
Comment _$CommentFromJson(Map<String, dynamic> json) {
@@ -260,14 +246,19 @@ Comment _$CommentFromJson(Map<String, dynamic> json) {
mixin _$Comment {
@JsonKey(name: "id")
int get id => throw _privateConstructorUsedError;
@JsonKey(name: "author_name")
String get authorName => throw _privateConstructorUsedError;
@JsonKey(name: "author_profile_icon")
String get authorProfileIcon => throw _privateConstructorUsedError;
@JsonKey(name: "body")
String get body => throw _privateConstructorUsedError;
@JsonKey(name: "children_comments")
List<Comment> get childrenComments => throw _privateConstructorUsedError;
@JsonKey(name: "created_at")
DateTime get createdAt => throw _privateConstructorUsedError;
@@ -282,8 +273,8 @@ mixin _$Comment {
/// @nodoc
abstract class $CommentCopyWith<$Res> {
factory $CommentCopyWith(Comment value, $Res Function(Comment) then) =
_$CommentCopyWithImpl<$Res, Comment>;
factory $CommentCopyWith(Comment value, $Res Function(Comment) then) = _$CommentCopyWithImpl<$Res, Comment>;
@useResult
$Res call(
{@JsonKey(name: "id") int id,
@@ -295,12 +286,12 @@ abstract class $CommentCopyWith<$Res> {
}
/// @nodoc
class _$CommentCopyWithImpl<$Res, $Val extends Comment>
implements $CommentCopyWith<$Res> {
class _$CommentCopyWithImpl<$Res, $Val extends Comment> implements $CommentCopyWith<$Res> {
_$CommentCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -347,9 +338,8 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment>
/// @nodoc
abstract class _$$CommentImplCopyWith<$Res> implements $CommentCopyWith<$Res> {
factory _$$CommentImplCopyWith(
_$CommentImpl value, $Res Function(_$CommentImpl) then) =
__$$CommentImplCopyWithImpl<$Res>;
factory _$$CommentImplCopyWith(_$CommentImpl value, $Res Function(_$CommentImpl) then) = __$$CommentImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -362,12 +352,8 @@ abstract class _$$CommentImplCopyWith<$Res> implements $CommentCopyWith<$Res> {
}
/// @nodoc
class __$$CommentImplCopyWithImpl<$Res>
extends _$CommentCopyWithImpl<$Res, _$CommentImpl>
implements _$$CommentImplCopyWith<$Res> {
__$$CommentImplCopyWithImpl(
_$CommentImpl _value, $Res Function(_$CommentImpl) _then)
: super(_value, _then);
class __$$CommentImplCopyWithImpl<$Res> extends _$CommentCopyWithImpl<$Res, _$CommentImpl> implements _$$CommentImplCopyWith<$Res> {
__$$CommentImplCopyWithImpl(_$CommentImpl _value, $Res Function(_$CommentImpl) _then) : super(_value, _then);
/// Create a copy of Comment
/// with the given fields replaced by the non-null parameter values.
@@ -418,13 +404,11 @@ class _$CommentImpl implements _Comment {
@JsonKey(name: "author_name") required this.authorName,
@JsonKey(name: "author_profile_icon") required this.authorProfileIcon,
@JsonKey(name: "body") required this.body,
@JsonKey(name: "children_comments")
required final List<Comment> childrenComments,
@JsonKey(name: "children_comments") required final List<Comment> childrenComments,
@JsonKey(name: "created_at") required this.createdAt})
: _childrenComments = childrenComments;
factory _$CommentImpl.fromJson(Map<String, dynamic> json) =>
_$$CommentImplFromJson(json);
factory _$CommentImpl.fromJson(Map<String, dynamic> json) => _$$CommentImplFromJson(json);
@override
@JsonKey(name: "id")
@@ -439,11 +423,11 @@ class _$CommentImpl implements _Comment {
@JsonKey(name: "body")
final String body;
final List<Comment> _childrenComments;
@override
@JsonKey(name: "children_comments")
List<Comment> get childrenComments {
if (_childrenComments is EqualUnmodifiableListView)
return _childrenComments;
if (_childrenComments is EqualUnmodifiableListView) return _childrenComments;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_childrenComments);
}
@@ -463,35 +447,23 @@ class _$CommentImpl implements _Comment {
(other.runtimeType == runtimeType &&
other is _$CommentImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.authorName, authorName) ||
other.authorName == authorName) &&
(identical(other.authorProfileIcon, authorProfileIcon) ||
other.authorProfileIcon == authorProfileIcon) &&
(identical(other.authorName, authorName) || other.authorName == authorName) &&
(identical(other.authorProfileIcon, authorProfileIcon) || other.authorProfileIcon == authorProfileIcon) &&
(identical(other.body, body) || other.body == body) &&
const DeepCollectionEquality()
.equals(other._childrenComments, _childrenComments) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt));
const DeepCollectionEquality().equals(other._childrenComments, _childrenComments) &&
(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
authorName,
authorProfileIcon,
body,
const DeepCollectionEquality().hash(_childrenComments),
createdAt);
int get hashCode => Object.hash(runtimeType, id, authorName, authorProfileIcon, body, const DeepCollectionEquality().hash(_childrenComments), createdAt);
/// Create a copy of Comment
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
__$$CommentImplCopyWithImpl<_$CommentImpl>(this, _$identity);
_$$CommentImplCopyWith<_$CommentImpl> get copyWith => __$$CommentImplCopyWithImpl<_$CommentImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -503,33 +475,35 @@ class _$CommentImpl implements _Comment {
abstract class _Comment implements Comment {
const factory _Comment(
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "author_name") required final String authorName,
@JsonKey(name: "author_profile_icon")
required final String authorProfileIcon,
@JsonKey(name: "body") required final String body,
@JsonKey(name: "children_comments")
required final List<Comment> childrenComments,
@JsonKey(name: "created_at") required final DateTime createdAt}) =
_$CommentImpl;
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "author_name") required final String authorName,
@JsonKey(name: "author_profile_icon") required final String authorProfileIcon,
@JsonKey(name: "body") required final String body,
@JsonKey(name: "children_comments") required final List<Comment> childrenComments,
@JsonKey(name: "created_at") required final DateTime createdAt}) = _$CommentImpl;
factory _Comment.fromJson(Map<String, dynamic> json) = _$CommentImpl.fromJson;
@override
@JsonKey(name: "id")
int get id;
@override
@JsonKey(name: "author_name")
String get authorName;
@override
@JsonKey(name: "author_profile_icon")
String get authorProfileIcon;
@override
@JsonKey(name: "body")
String get body;
@override
@JsonKey(name: "children_comments")
List<Comment> get childrenComments;
@override
@JsonKey(name: "created_at")
DateTime get createdAt;
@@ -538,6 +512,5 @@ abstract class _Comment implements Comment {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$CommentImplCopyWith<_$CommentImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,36 +6,28 @@ part of 'comment_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$CommentModelImpl _$$CommentModelImplFromJson(Map<String, dynamic> json) =>
_$CommentModelImpl(
data: (json['data'] as List<dynamic>)
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
.toList(),
_$CommentModelImpl _$$CommentModelImplFromJson(Map<String, dynamic> json) => _$CommentModelImpl(
data: (json['data'] as List<dynamic>).map((e) => Comment.fromJson(e as Map<String, dynamic>)).toList(),
links: Links.fromJson(json['links'] as Map<String, dynamic>),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$CommentModelImplToJson(_$CommentModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$CommentModelImplToJson(_$CommentModelImpl instance) => <String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
};
_$CommentImpl _$$CommentImplFromJson(Map<String, dynamic> json) =>
_$CommentImpl(
_$CommentImpl _$$CommentImplFromJson(Map<String, dynamic> json) => _$CommentImpl(
id: (json['id'] as num).toInt(),
authorName: json['author_name'] as String,
authorProfileIcon: json['author_profile_icon'] as String,
body: json['body'] as String,
childrenComments: (json['children_comments'] as List<dynamic>)
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
.toList(),
childrenComments: (json['children_comments'] as List<dynamic>).map((e) => Comment.fromJson(e as Map<String, dynamic>)).toList(),
createdAt: DateTime.parse(json['created_at'] as String),
);
Map<String, dynamic> _$$CommentImplToJson(_$CommentImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$CommentImplToJson(_$CommentImpl instance) => <String, dynamic>{
'id': instance.id,
'author_name': instance.authorName,
'author_profile_icon': instance.authorProfileIcon,

View File

@@ -1,4 +1,4 @@
import 'package:eatvio_app/core/models/base_models.dart';
import 'package:eatvio_app/core/models/pagination_model.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'diets_pagination_model.freezed.dart';

View File

@@ -22,8 +22,10 @@ DietsPagination _$DietsPaginationFromJson(Map<String, dynamic> json) {
mixin _$DietsPagination {
@JsonKey(name: "data")
List<Diet> get data => throw _privateConstructorUsedError;
@JsonKey(name: "links")
Links get links => throw _privateConstructorUsedError;
@JsonKey(name: "meta")
Meta get meta => throw _privateConstructorUsedError;
@@ -33,32 +35,28 @@ mixin _$DietsPagination {
/// Create a copy of DietsPagination
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DietsPaginationCopyWith<DietsPagination> get copyWith =>
throw _privateConstructorUsedError;
$DietsPaginationCopyWith<DietsPagination> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DietsPaginationCopyWith<$Res> {
factory $DietsPaginationCopyWith(
DietsPagination value, $Res Function(DietsPagination) then) =
_$DietsPaginationCopyWithImpl<$Res, DietsPagination>;
factory $DietsPaginationCopyWith(DietsPagination value, $Res Function(DietsPagination) then) = _$DietsPaginationCopyWithImpl<$Res, DietsPagination>;
@useResult
$Res call(
{@JsonKey(name: "data") List<Diet> data,
@JsonKey(name: "links") Links links,
@JsonKey(name: "meta") Meta meta});
$Res call({@JsonKey(name: "data") List<Diet> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
$LinksCopyWith<$Res> get links;
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination>
implements $DietsPaginationCopyWith<$Res> {
class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination> implements $DietsPaginationCopyWith<$Res> {
_$DietsPaginationCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -109,31 +107,24 @@ class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination>
}
/// @nodoc
abstract class _$$DietsPaginationImplCopyWith<$Res>
implements $DietsPaginationCopyWith<$Res> {
factory _$$DietsPaginationImplCopyWith(_$DietsPaginationImpl value,
$Res Function(_$DietsPaginationImpl) then) =
__$$DietsPaginationImplCopyWithImpl<$Res>;
abstract class _$$DietsPaginationImplCopyWith<$Res> implements $DietsPaginationCopyWith<$Res> {
factory _$$DietsPaginationImplCopyWith(_$DietsPaginationImpl value, $Res Function(_$DietsPaginationImpl) then) = __$$DietsPaginationImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: "data") List<Diet> data,
@JsonKey(name: "links") Links links,
@JsonKey(name: "meta") Meta meta});
$Res call({@JsonKey(name: "data") List<Diet> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
@override
$LinksCopyWith<$Res> get links;
@override
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class __$$DietsPaginationImplCopyWithImpl<$Res>
extends _$DietsPaginationCopyWithImpl<$Res, _$DietsPaginationImpl>
class __$$DietsPaginationImplCopyWithImpl<$Res> extends _$DietsPaginationCopyWithImpl<$Res, _$DietsPaginationImpl>
implements _$$DietsPaginationImplCopyWith<$Res> {
__$$DietsPaginationImplCopyWithImpl(
_$DietsPaginationImpl _value, $Res Function(_$DietsPaginationImpl) _then)
: super(_value, _then);
__$$DietsPaginationImplCopyWithImpl(_$DietsPaginationImpl _value, $Res Function(_$DietsPaginationImpl) _then) : super(_value, _then);
/// Create a copy of DietsPagination
/// with the given fields replaced by the non-null parameter values.
@@ -165,15 +156,13 @@ class __$$DietsPaginationImplCopyWithImpl<$Res>
@JsonSerializable()
class _$DietsPaginationImpl implements _DietsPagination {
const _$DietsPaginationImpl(
{@JsonKey(name: "data") required final List<Diet> data,
@JsonKey(name: "links") required this.links,
@JsonKey(name: "meta") required this.meta})
{@JsonKey(name: "data") required final List<Diet> data, @JsonKey(name: "links") required this.links, @JsonKey(name: "meta") required this.meta})
: _data = data;
factory _$DietsPaginationImpl.fromJson(Map<String, dynamic> json) =>
_$$DietsPaginationImplFromJson(json);
factory _$DietsPaginationImpl.fromJson(Map<String, dynamic> json) => _$$DietsPaginationImplFromJson(json);
final List<Diet> _data;
@override
@JsonKey(name: "data")
List<Diet> get data {
@@ -206,17 +195,14 @@ class _$DietsPaginationImpl implements _DietsPagination {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
/// Create a copy of DietsPagination
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith =>
__$$DietsPaginationImplCopyWithImpl<_$DietsPaginationImpl>(
this, _$identity);
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith => __$$DietsPaginationImplCopyWithImpl<_$DietsPaginationImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -232,15 +218,16 @@ abstract class _DietsPagination implements DietsPagination {
@JsonKey(name: "links") required final Links links,
@JsonKey(name: "meta") required final Meta meta}) = _$DietsPaginationImpl;
factory _DietsPagination.fromJson(Map<String, dynamic> json) =
_$DietsPaginationImpl.fromJson;
factory _DietsPagination.fromJson(Map<String, dynamic> json) = _$DietsPaginationImpl.fromJson;
@override
@JsonKey(name: "data")
List<Diet> get data;
@override
@JsonKey(name: "links")
Links get links;
@override
@JsonKey(name: "meta")
Meta get meta;
@@ -249,8 +236,7 @@ abstract class _DietsPagination implements DietsPagination {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith => throw _privateConstructorUsedError;
}
Diet _$DietFromJson(Map<String, dynamic> json) {
@@ -261,27 +247,37 @@ Diet _$DietFromJson(Map<String, dynamic> json) {
mixin _$Diet {
@JsonKey(name: "id")
int get id => throw _privateConstructorUsedError;
@JsonKey(name: "name")
String get name => throw _privateConstructorUsedError;
@JsonKey(name: "image")
String get image => throw _privateConstructorUsedError;
@JsonKey(name: "duration")
int get duration => throw _privateConstructorUsedError;
@JsonKey(name: "state")
String get state => throw _privateConstructorUsedError;
@JsonKey(name: "type")
DietType get type => throw _privateConstructorUsedError;
@JsonKey(name: "details")
String get details => throw _privateConstructorUsedError;
@JsonKey(name: "daily_schedule")
List<List<List<DailySchedule>>> get dailySchedule =>
throw _privateConstructorUsedError;
List<List<List<DailySchedule>>> get dailySchedule => throw _privateConstructorUsedError;
@JsonKey(name: "author")
Author get author => throw _privateConstructorUsedError;
@JsonKey(name: "total_likes")
int get totalLikes => throw _privateConstructorUsedError;
@JsonKey(name: "total_views")
int get totalViews => throw _privateConstructorUsedError;
@JsonKey(name: "total_comments")
int get totalComments => throw _privateConstructorUsedError;
@@ -296,8 +292,8 @@ mixin _$Diet {
/// @nodoc
abstract class $DietCopyWith<$Res> {
factory $DietCopyWith(Diet value, $Res Function(Diet) then) =
_$DietCopyWithImpl<$Res, Diet>;
factory $DietCopyWith(Diet value, $Res Function(Diet) then) = _$DietCopyWithImpl<$Res, Diet>;
@useResult
$Res call(
{@JsonKey(name: "id") int id,
@@ -307,24 +303,24 @@ abstract class $DietCopyWith<$Res> {
@JsonKey(name: "state") String state,
@JsonKey(name: "type") DietType type,
@JsonKey(name: "details") String details,
@JsonKey(name: "daily_schedule")
List<List<List<DailySchedule>>> dailySchedule,
@JsonKey(name: "daily_schedule") List<List<List<DailySchedule>>> dailySchedule,
@JsonKey(name: "author") Author author,
@JsonKey(name: "total_likes") int totalLikes,
@JsonKey(name: "total_views") int totalViews,
@JsonKey(name: "total_comments") int totalComments});
$DietTypeCopyWith<$Res> get type;
$AuthorCopyWith<$Res> get author;
}
/// @nodoc
class _$DietCopyWithImpl<$Res, $Val extends Diet>
implements $DietCopyWith<$Res> {
class _$DietCopyWithImpl<$Res, $Val extends Diet> implements $DietCopyWith<$Res> {
_$DietCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -421,9 +417,8 @@ class _$DietCopyWithImpl<$Res, $Val extends Diet>
/// @nodoc
abstract class _$$DietImplCopyWith<$Res> implements $DietCopyWith<$Res> {
factory _$$DietImplCopyWith(
_$DietImpl value, $Res Function(_$DietImpl) then) =
__$$DietImplCopyWithImpl<$Res>;
factory _$$DietImplCopyWith(_$DietImpl value, $Res Function(_$DietImpl) then) = __$$DietImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -434,8 +429,7 @@ abstract class _$$DietImplCopyWith<$Res> implements $DietCopyWith<$Res> {
@JsonKey(name: "state") String state,
@JsonKey(name: "type") DietType type,
@JsonKey(name: "details") String details,
@JsonKey(name: "daily_schedule")
List<List<List<DailySchedule>>> dailySchedule,
@JsonKey(name: "daily_schedule") List<List<List<DailySchedule>>> dailySchedule,
@JsonKey(name: "author") Author author,
@JsonKey(name: "total_likes") int totalLikes,
@JsonKey(name: "total_views") int totalViews,
@@ -443,16 +437,14 @@ abstract class _$$DietImplCopyWith<$Res> implements $DietCopyWith<$Res> {
@override
$DietTypeCopyWith<$Res> get type;
@override
$AuthorCopyWith<$Res> get author;
}
/// @nodoc
class __$$DietImplCopyWithImpl<$Res>
extends _$DietCopyWithImpl<$Res, _$DietImpl>
implements _$$DietImplCopyWith<$Res> {
__$$DietImplCopyWithImpl(_$DietImpl _value, $Res Function(_$DietImpl) _then)
: super(_value, _then);
class __$$DietImplCopyWithImpl<$Res> extends _$DietCopyWithImpl<$Res, _$DietImpl> implements _$$DietImplCopyWith<$Res> {
__$$DietImplCopyWithImpl(_$DietImpl _value, $Res Function(_$DietImpl) _then) : super(_value, _then);
/// Create a copy of Diet
/// with the given fields replaced by the non-null parameter values.
@@ -536,16 +528,14 @@ class _$DietImpl implements _Diet {
@JsonKey(name: "state") required this.state,
@JsonKey(name: "type") required this.type,
@JsonKey(name: "details") required this.details,
@JsonKey(name: "daily_schedule")
required final List<List<List<DailySchedule>>> dailySchedule,
@JsonKey(name: "daily_schedule") required final List<List<List<DailySchedule>>> dailySchedule,
@JsonKey(name: "author") required this.author,
@JsonKey(name: "total_likes") required this.totalLikes,
@JsonKey(name: "total_views") required this.totalViews,
@JsonKey(name: "total_comments") required this.totalComments})
: _dailySchedule = dailySchedule;
factory _$DietImpl.fromJson(Map<String, dynamic> json) =>
_$$DietImplFromJson(json);
factory _$DietImpl.fromJson(Map<String, dynamic> json) => _$$DietImplFromJson(json);
@override
@JsonKey(name: "id")
@@ -569,6 +559,7 @@ class _$DietImpl implements _Diet {
@JsonKey(name: "details")
final String details;
final List<List<List<DailySchedule>>> _dailySchedule;
@override
@JsonKey(name: "daily_schedule")
List<List<List<DailySchedule>>> get dailySchedule {
@@ -603,46 +594,28 @@ class _$DietImpl implements _Diet {
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.image, image) || other.image == image) &&
(identical(other.duration, duration) ||
other.duration == duration) &&
(identical(other.duration, duration) || other.duration == duration) &&
(identical(other.state, state) || other.state == state) &&
(identical(other.type, type) || other.type == type) &&
(identical(other.details, details) || other.details == details) &&
const DeepCollectionEquality()
.equals(other._dailySchedule, _dailySchedule) &&
const DeepCollectionEquality().equals(other._dailySchedule, _dailySchedule) &&
(identical(other.author, author) || other.author == author) &&
(identical(other.totalLikes, totalLikes) ||
other.totalLikes == totalLikes) &&
(identical(other.totalViews, totalViews) ||
other.totalViews == totalViews) &&
(identical(other.totalComments, totalComments) ||
other.totalComments == totalComments));
(identical(other.totalLikes, totalLikes) || other.totalLikes == totalLikes) &&
(identical(other.totalViews, totalViews) || other.totalViews == totalViews) &&
(identical(other.totalComments, totalComments) || other.totalComments == totalComments));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
name,
image,
duration,
state,
type,
details,
const DeepCollectionEquality().hash(_dailySchedule),
author,
totalLikes,
totalViews,
totalComments);
int get hashCode => Object.hash(runtimeType, id, name, image, duration, state, type, details, const DeepCollectionEquality().hash(_dailySchedule), author,
totalLikes, totalViews, totalComments);
/// Create a copy of Diet
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DietImplCopyWith<_$DietImpl> get copyWith =>
__$$DietImplCopyWithImpl<_$DietImpl>(this, _$identity);
_$$DietImplCopyWith<_$DietImpl> get copyWith => __$$DietImplCopyWithImpl<_$DietImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -654,56 +627,65 @@ class _$DietImpl implements _Diet {
abstract class _Diet implements Diet {
const factory _Diet(
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "name") required final String name,
@JsonKey(name: "image") required final String image,
@JsonKey(name: "duration") required final int duration,
@JsonKey(name: "state") required final String state,
@JsonKey(name: "type") required final DietType type,
@JsonKey(name: "details") required final String details,
@JsonKey(name: "daily_schedule")
required final List<List<List<DailySchedule>>> dailySchedule,
@JsonKey(name: "author") required final Author author,
@JsonKey(name: "total_likes") required final int totalLikes,
@JsonKey(name: "total_views") required final int totalViews,
@JsonKey(name: "total_comments") required final int totalComments}) =
_$DietImpl;
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "name") required final String name,
@JsonKey(name: "image") required final String image,
@JsonKey(name: "duration") required final int duration,
@JsonKey(name: "state") required final String state,
@JsonKey(name: "type") required final DietType type,
@JsonKey(name: "details") required final String details,
@JsonKey(name: "daily_schedule") required final List<List<List<DailySchedule>>> dailySchedule,
@JsonKey(name: "author") required final Author author,
@JsonKey(name: "total_likes") required final int totalLikes,
@JsonKey(name: "total_views") required final int totalViews,
@JsonKey(name: "total_comments") required final int totalComments}) = _$DietImpl;
factory _Diet.fromJson(Map<String, dynamic> json) = _$DietImpl.fromJson;
@override
@JsonKey(name: "id")
int get id;
@override
@JsonKey(name: "name")
String get name;
@override
@JsonKey(name: "image")
String get image;
@override
@JsonKey(name: "duration")
int get duration;
@override
@JsonKey(name: "state")
String get state;
@override
@JsonKey(name: "type")
DietType get type;
@override
@JsonKey(name: "details")
String get details;
@override
@JsonKey(name: "daily_schedule")
List<List<List<DailySchedule>>> get dailySchedule;
@override
@JsonKey(name: "author")
Author get author;
@override
@JsonKey(name: "total_likes")
int get totalLikes;
@override
@JsonKey(name: "total_views")
int get totalViews;
@override
@JsonKey(name: "total_comments")
int get totalComments;
@@ -712,8 +694,7 @@ abstract class _Diet implements Diet {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DietImplCopyWith<_$DietImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$DietImplCopyWith<_$DietImpl> get copyWith => throw _privateConstructorUsedError;
}
Author _$AuthorFromJson(Map<String, dynamic> json) {
@@ -724,10 +705,13 @@ Author _$AuthorFromJson(Map<String, dynamic> json) {
mixin _$Author {
@JsonKey(name: "author_slug")
String get authorSlug => throw _privateConstructorUsedError;
@JsonKey(name: "author_name")
String get authorName => throw _privateConstructorUsedError;
@JsonKey(name: "author_profile_icon")
String get authorProfileIcon => throw _privateConstructorUsedError;
@JsonKey(name: "author_is_me")
bool get authorIsMe => throw _privateConstructorUsedError;
@@ -742,8 +726,8 @@ mixin _$Author {
/// @nodoc
abstract class $AuthorCopyWith<$Res> {
factory $AuthorCopyWith(Author value, $Res Function(Author) then) =
_$AuthorCopyWithImpl<$Res, Author>;
factory $AuthorCopyWith(Author value, $Res Function(Author) then) = _$AuthorCopyWithImpl<$Res, Author>;
@useResult
$Res call(
{@JsonKey(name: "author_slug") String authorSlug,
@@ -753,12 +737,12 @@ abstract class $AuthorCopyWith<$Res> {
}
/// @nodoc
class _$AuthorCopyWithImpl<$Res, $Val extends Author>
implements $AuthorCopyWith<$Res> {
class _$AuthorCopyWithImpl<$Res, $Val extends Author> implements $AuthorCopyWith<$Res> {
_$AuthorCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -795,9 +779,8 @@ class _$AuthorCopyWithImpl<$Res, $Val extends Author>
/// @nodoc
abstract class _$$AuthorImplCopyWith<$Res> implements $AuthorCopyWith<$Res> {
factory _$$AuthorImplCopyWith(
_$AuthorImpl value, $Res Function(_$AuthorImpl) then) =
__$$AuthorImplCopyWithImpl<$Res>;
factory _$$AuthorImplCopyWith(_$AuthorImpl value, $Res Function(_$AuthorImpl) then) = __$$AuthorImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -808,12 +791,8 @@ abstract class _$$AuthorImplCopyWith<$Res> implements $AuthorCopyWith<$Res> {
}
/// @nodoc
class __$$AuthorImplCopyWithImpl<$Res>
extends _$AuthorCopyWithImpl<$Res, _$AuthorImpl>
implements _$$AuthorImplCopyWith<$Res> {
__$$AuthorImplCopyWithImpl(
_$AuthorImpl _value, $Res Function(_$AuthorImpl) _then)
: super(_value, _then);
class __$$AuthorImplCopyWithImpl<$Res> extends _$AuthorCopyWithImpl<$Res, _$AuthorImpl> implements _$$AuthorImplCopyWith<$Res> {
__$$AuthorImplCopyWithImpl(_$AuthorImpl _value, $Res Function(_$AuthorImpl) _then) : super(_value, _then);
/// Create a copy of Author
/// with the given fields replaced by the non-null parameter values.
@@ -855,8 +834,7 @@ class _$AuthorImpl implements _Author {
@JsonKey(name: "author_profile_icon") required this.authorProfileIcon,
@JsonKey(name: "author_is_me") required this.authorIsMe});
factory _$AuthorImpl.fromJson(Map<String, dynamic> json) =>
_$$AuthorImplFromJson(json);
factory _$AuthorImpl.fromJson(Map<String, dynamic> json) => _$$AuthorImplFromJson(json);
@override
@JsonKey(name: "author_slug")
@@ -881,28 +859,22 @@ class _$AuthorImpl implements _Author {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$AuthorImpl &&
(identical(other.authorSlug, authorSlug) ||
other.authorSlug == authorSlug) &&
(identical(other.authorName, authorName) ||
other.authorName == authorName) &&
(identical(other.authorProfileIcon, authorProfileIcon) ||
other.authorProfileIcon == authorProfileIcon) &&
(identical(other.authorIsMe, authorIsMe) ||
other.authorIsMe == authorIsMe));
(identical(other.authorSlug, authorSlug) || other.authorSlug == authorSlug) &&
(identical(other.authorName, authorName) || other.authorName == authorName) &&
(identical(other.authorProfileIcon, authorProfileIcon) || other.authorProfileIcon == authorProfileIcon) &&
(identical(other.authorIsMe, authorIsMe) || other.authorIsMe == authorIsMe));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, authorSlug, authorName, authorProfileIcon, authorIsMe);
int get hashCode => Object.hash(runtimeType, authorSlug, authorName, authorProfileIcon, authorIsMe);
/// Create a copy of Author
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith =>
__$$AuthorImplCopyWithImpl<_$AuthorImpl>(this, _$identity);
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith => __$$AuthorImplCopyWithImpl<_$AuthorImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -914,24 +886,25 @@ class _$AuthorImpl implements _Author {
abstract class _Author implements Author {
const factory _Author(
{@JsonKey(name: "author_slug") required final String authorSlug,
@JsonKey(name: "author_name") required final String authorName,
@JsonKey(name: "author_profile_icon")
required final String authorProfileIcon,
@JsonKey(name: "author_is_me") required final bool authorIsMe}) =
_$AuthorImpl;
{@JsonKey(name: "author_slug") required final String authorSlug,
@JsonKey(name: "author_name") required final String authorName,
@JsonKey(name: "author_profile_icon") required final String authorProfileIcon,
@JsonKey(name: "author_is_me") required final bool authorIsMe}) = _$AuthorImpl;
factory _Author.fromJson(Map<String, dynamic> json) = _$AuthorImpl.fromJson;
@override
@JsonKey(name: "author_slug")
String get authorSlug;
@override
@JsonKey(name: "author_name")
String get authorName;
@override
@JsonKey(name: "author_profile_icon")
String get authorProfileIcon;
@override
@JsonKey(name: "author_is_me")
bool get authorIsMe;
@@ -940,8 +913,7 @@ abstract class _Author implements Author {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith => throw _privateConstructorUsedError;
}
DailySchedule _$DailyScheduleFromJson(Map<String, dynamic> json) {
@@ -952,10 +924,13 @@ DailySchedule _$DailyScheduleFromJson(Map<String, dynamic> json) {
mixin _$DailySchedule {
@JsonKey(name: "name")
String get name => throw _privateConstructorUsedError;
@JsonKey(name: "uniq")
String get uniq => throw _privateConstructorUsedError;
@JsonKey(name: "portion")
Portion get portion => throw _privateConstructorUsedError;
@JsonKey(name: "quantity")
int get quantity => throw _privateConstructorUsedError;
@@ -965,15 +940,13 @@ mixin _$DailySchedule {
/// Create a copy of DailySchedule
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DailyScheduleCopyWith<DailySchedule> get copyWith =>
throw _privateConstructorUsedError;
$DailyScheduleCopyWith<DailySchedule> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DailyScheduleCopyWith<$Res> {
factory $DailyScheduleCopyWith(
DailySchedule value, $Res Function(DailySchedule) then) =
_$DailyScheduleCopyWithImpl<$Res, DailySchedule>;
factory $DailyScheduleCopyWith(DailySchedule value, $Res Function(DailySchedule) then) = _$DailyScheduleCopyWithImpl<$Res, DailySchedule>;
@useResult
$Res call(
{@JsonKey(name: "name") String name,
@@ -983,12 +956,12 @@ abstract class $DailyScheduleCopyWith<$Res> {
}
/// @nodoc
class _$DailyScheduleCopyWithImpl<$Res, $Val extends DailySchedule>
implements $DailyScheduleCopyWith<$Res> {
class _$DailyScheduleCopyWithImpl<$Res, $Val extends DailySchedule> implements $DailyScheduleCopyWith<$Res> {
_$DailyScheduleCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -1024,11 +997,9 @@ class _$DailyScheduleCopyWithImpl<$Res, $Val extends DailySchedule>
}
/// @nodoc
abstract class _$$DailyScheduleImplCopyWith<$Res>
implements $DailyScheduleCopyWith<$Res> {
factory _$$DailyScheduleImplCopyWith(
_$DailyScheduleImpl value, $Res Function(_$DailyScheduleImpl) then) =
__$$DailyScheduleImplCopyWithImpl<$Res>;
abstract class _$$DailyScheduleImplCopyWith<$Res> implements $DailyScheduleCopyWith<$Res> {
factory _$$DailyScheduleImplCopyWith(_$DailyScheduleImpl value, $Res Function(_$DailyScheduleImpl) then) = __$$DailyScheduleImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -1039,12 +1010,8 @@ abstract class _$$DailyScheduleImplCopyWith<$Res>
}
/// @nodoc
class __$$DailyScheduleImplCopyWithImpl<$Res>
extends _$DailyScheduleCopyWithImpl<$Res, _$DailyScheduleImpl>
implements _$$DailyScheduleImplCopyWith<$Res> {
__$$DailyScheduleImplCopyWithImpl(
_$DailyScheduleImpl _value, $Res Function(_$DailyScheduleImpl) _then)
: super(_value, _then);
class __$$DailyScheduleImplCopyWithImpl<$Res> extends _$DailyScheduleCopyWithImpl<$Res, _$DailyScheduleImpl> implements _$$DailyScheduleImplCopyWith<$Res> {
__$$DailyScheduleImplCopyWithImpl(_$DailyScheduleImpl _value, $Res Function(_$DailyScheduleImpl) _then) : super(_value, _then);
/// Create a copy of DailySchedule
/// with the given fields replaced by the non-null parameter values.
@@ -1086,8 +1053,7 @@ class _$DailyScheduleImpl implements _DailySchedule {
@JsonKey(name: "portion") required this.portion,
@JsonKey(name: "quantity") required this.quantity});
factory _$DailyScheduleImpl.fromJson(Map<String, dynamic> json) =>
_$$DailyScheduleImplFromJson(json);
factory _$DailyScheduleImpl.fromJson(Map<String, dynamic> json) => _$$DailyScheduleImplFromJson(json);
@override
@JsonKey(name: "name")
@@ -1115,8 +1081,7 @@ class _$DailyScheduleImpl implements _DailySchedule {
(identical(other.name, name) || other.name == name) &&
(identical(other.uniq, uniq) || other.uniq == uniq) &&
(identical(other.portion, portion) || other.portion == portion) &&
(identical(other.quantity, quantity) ||
other.quantity == quantity));
(identical(other.quantity, quantity) || other.quantity == quantity));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -1128,8 +1093,7 @@ class _$DailyScheduleImpl implements _DailySchedule {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith =>
__$$DailyScheduleImplCopyWithImpl<_$DailyScheduleImpl>(this, _$identity);
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith => __$$DailyScheduleImplCopyWithImpl<_$DailyScheduleImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -1141,24 +1105,25 @@ class _$DailyScheduleImpl implements _DailySchedule {
abstract class _DailySchedule implements DailySchedule {
const factory _DailySchedule(
{@JsonKey(name: "name") required final String name,
@JsonKey(name: "uniq") required final String uniq,
@JsonKey(name: "portion") required final Portion portion,
@JsonKey(name: "quantity") required final int quantity}) =
_$DailyScheduleImpl;
{@JsonKey(name: "name") required final String name,
@JsonKey(name: "uniq") required final String uniq,
@JsonKey(name: "portion") required final Portion portion,
@JsonKey(name: "quantity") required final int quantity}) = _$DailyScheduleImpl;
factory _DailySchedule.fromJson(Map<String, dynamic> json) =
_$DailyScheduleImpl.fromJson;
factory _DailySchedule.fromJson(Map<String, dynamic> json) = _$DailyScheduleImpl.fromJson;
@override
@JsonKey(name: "name")
String get name;
@override
@JsonKey(name: "uniq")
String get uniq;
@override
@JsonKey(name: "portion")
Portion get portion;
@override
@JsonKey(name: "quantity")
int get quantity;
@@ -1167,8 +1132,7 @@ abstract class _DailySchedule implements DailySchedule {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith => throw _privateConstructorUsedError;
}
DietType _$DietTypeFromJson(Map<String, dynamic> json) {
@@ -1179,10 +1143,13 @@ DietType _$DietTypeFromJson(Map<String, dynamic> json) {
mixin _$DietType {
@JsonKey(name: "alko")
bool? get alko => throw _privateConstructorUsedError;
@JsonKey(name: "veg")
bool? get veg => throw _privateConstructorUsedError;
@JsonKey(name: "corb")
bool? get corb => throw _privateConstructorUsedError;
@JsonKey(name: "meat")
bool? get meat => throw _privateConstructorUsedError;
@@ -1192,29 +1159,24 @@ mixin _$DietType {
/// Create a copy of DietType
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DietTypeCopyWith<DietType> get copyWith =>
throw _privateConstructorUsedError;
$DietTypeCopyWith<DietType> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DietTypeCopyWith<$Res> {
factory $DietTypeCopyWith(DietType value, $Res Function(DietType) then) =
_$DietTypeCopyWithImpl<$Res, DietType>;
factory $DietTypeCopyWith(DietType value, $Res Function(DietType) then) = _$DietTypeCopyWithImpl<$Res, DietType>;
@useResult
$Res call(
{@JsonKey(name: "alko") bool? alko,
@JsonKey(name: "veg") bool? veg,
@JsonKey(name: "corb") bool? corb,
@JsonKey(name: "meat") bool? meat});
$Res call({@JsonKey(name: "alko") bool? alko, @JsonKey(name: "veg") bool? veg, @JsonKey(name: "corb") bool? corb, @JsonKey(name: "meat") bool? meat});
}
/// @nodoc
class _$DietTypeCopyWithImpl<$Res, $Val extends DietType>
implements $DietTypeCopyWith<$Res> {
class _$DietTypeCopyWithImpl<$Res, $Val extends DietType> implements $DietTypeCopyWith<$Res> {
_$DietTypeCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -1250,27 +1212,17 @@ class _$DietTypeCopyWithImpl<$Res, $Val extends DietType>
}
/// @nodoc
abstract class _$$DietTypeImplCopyWith<$Res>
implements $DietTypeCopyWith<$Res> {
factory _$$DietTypeImplCopyWith(
_$DietTypeImpl value, $Res Function(_$DietTypeImpl) then) =
__$$DietTypeImplCopyWithImpl<$Res>;
abstract class _$$DietTypeImplCopyWith<$Res> implements $DietTypeCopyWith<$Res> {
factory _$$DietTypeImplCopyWith(_$DietTypeImpl value, $Res Function(_$DietTypeImpl) then) = __$$DietTypeImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: "alko") bool? alko,
@JsonKey(name: "veg") bool? veg,
@JsonKey(name: "corb") bool? corb,
@JsonKey(name: "meat") bool? meat});
$Res call({@JsonKey(name: "alko") bool? alko, @JsonKey(name: "veg") bool? veg, @JsonKey(name: "corb") bool? corb, @JsonKey(name: "meat") bool? meat});
}
/// @nodoc
class __$$DietTypeImplCopyWithImpl<$Res>
extends _$DietTypeCopyWithImpl<$Res, _$DietTypeImpl>
implements _$$DietTypeImplCopyWith<$Res> {
__$$DietTypeImplCopyWithImpl(
_$DietTypeImpl _value, $Res Function(_$DietTypeImpl) _then)
: super(_value, _then);
class __$$DietTypeImplCopyWithImpl<$Res> extends _$DietTypeCopyWithImpl<$Res, _$DietTypeImpl> implements _$$DietTypeImplCopyWith<$Res> {
__$$DietTypeImplCopyWithImpl(_$DietTypeImpl _value, $Res Function(_$DietTypeImpl) _then) : super(_value, _then);
/// Create a copy of DietType
/// with the given fields replaced by the non-null parameter values.
@@ -1306,14 +1258,9 @@ class __$$DietTypeImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$DietTypeImpl implements _DietType {
const _$DietTypeImpl(
{@JsonKey(name: "alko") this.alko,
@JsonKey(name: "veg") this.veg,
@JsonKey(name: "corb") this.corb,
@JsonKey(name: "meat") this.meat});
const _$DietTypeImpl({@JsonKey(name: "alko") this.alko, @JsonKey(name: "veg") this.veg, @JsonKey(name: "corb") this.corb, @JsonKey(name: "meat") this.meat});
factory _$DietTypeImpl.fromJson(Map<String, dynamic> json) =>
_$$DietTypeImplFromJson(json);
factory _$DietTypeImpl.fromJson(Map<String, dynamic> json) => _$$DietTypeImplFromJson(json);
@override
@JsonKey(name: "alko")
@@ -1353,8 +1300,7 @@ class _$DietTypeImpl implements _DietType {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith =>
__$$DietTypeImplCopyWithImpl<_$DietTypeImpl>(this, _$identity);
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith => __$$DietTypeImplCopyWithImpl<_$DietTypeImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -1371,18 +1317,20 @@ abstract class _DietType implements DietType {
@JsonKey(name: "corb") final bool? corb,
@JsonKey(name: "meat") final bool? meat}) = _$DietTypeImpl;
factory _DietType.fromJson(Map<String, dynamic> json) =
_$DietTypeImpl.fromJson;
factory _DietType.fromJson(Map<String, dynamic> json) = _$DietTypeImpl.fromJson;
@override
@JsonKey(name: "alko")
bool? get alko;
@override
@JsonKey(name: "veg")
bool? get veg;
@override
@JsonKey(name: "corb")
bool? get corb;
@override
@JsonKey(name: "meat")
bool? get meat;
@@ -1391,6 +1339,5 @@ abstract class _DietType implements DietType {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,19 +6,13 @@ part of 'diets_pagination_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$DietsPaginationImpl _$$DietsPaginationImplFromJson(
Map<String, dynamic> json) =>
_$DietsPaginationImpl(
data: (json['data'] as List<dynamic>)
.map((e) => Diet.fromJson(e as Map<String, dynamic>))
.toList(),
_$DietsPaginationImpl _$$DietsPaginationImplFromJson(Map<String, dynamic> json) => _$DietsPaginationImpl(
data: (json['data'] as List<dynamic>).map((e) => Diet.fromJson(e as Map<String, dynamic>)).toList(),
links: Links.fromJson(json['links'] as Map<String, dynamic>),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$DietsPaginationImplToJson(
_$DietsPaginationImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$DietsPaginationImplToJson(_$DietsPaginationImpl instance) => <String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
@@ -33,11 +27,7 @@ _$DietImpl _$$DietImplFromJson(Map<String, dynamic> json) => _$DietImpl(
type: DietType.fromJson(json['type'] as Map<String, dynamic>),
details: json['details'] as String,
dailySchedule: (json['daily_schedule'] as List<dynamic>)
.map((e) => (e as List<dynamic>)
.map((e) => (e as List<dynamic>)
.map((e) => DailySchedule.fromJson(e as Map<String, dynamic>))
.toList())
.toList())
.map((e) => (e as List<dynamic>).map((e) => (e as List<dynamic>).map((e) => DailySchedule.fromJson(e as Map<String, dynamic>)).toList()).toList())
.toList(),
author: Author.fromJson(json['author'] as Map<String, dynamic>),
totalLikes: (json['total_likes'] as num).toInt(),
@@ -45,8 +35,7 @@ _$DietImpl _$$DietImplFromJson(Map<String, dynamic> json) => _$DietImpl(
totalComments: (json['total_comments'] as num).toInt(),
);
Map<String, dynamic> _$$DietImplToJson(_$DietImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$DietImplToJson(_$DietImpl instance) => <String, dynamic>{
'id': instance.id,
'name': instance.name,
'image': instance.image,
@@ -68,24 +57,21 @@ _$AuthorImpl _$$AuthorImplFromJson(Map<String, dynamic> json) => _$AuthorImpl(
authorIsMe: json['author_is_me'] as bool,
);
Map<String, dynamic> _$$AuthorImplToJson(_$AuthorImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$AuthorImplToJson(_$AuthorImpl instance) => <String, dynamic>{
'author_slug': instance.authorSlug,
'author_name': instance.authorName,
'author_profile_icon': instance.authorProfileIcon,
'author_is_me': instance.authorIsMe,
};
_$DailyScheduleImpl _$$DailyScheduleImplFromJson(Map<String, dynamic> json) =>
_$DailyScheduleImpl(
_$DailyScheduleImpl _$$DailyScheduleImplFromJson(Map<String, dynamic> json) => _$DailyScheduleImpl(
name: json['name'] as String,
uniq: json['uniq'] as String,
portion: $enumDecode(_$PortionEnumMap, json['portion']),
quantity: (json['quantity'] as num).toInt(),
);
Map<String, dynamic> _$$DailyScheduleImplToJson(_$DailyScheduleImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$DailyScheduleImplToJson(_$DailyScheduleImpl instance) => <String, dynamic>{
'name': instance.name,
'uniq': instance.uniq,
'portion': _$PortionEnumMap[instance.portion]!,
@@ -98,16 +84,14 @@ const _$PortionEnumMap = {
Portion.PCS: 'pcs',
};
_$DietTypeImpl _$$DietTypeImplFromJson(Map<String, dynamic> json) =>
_$DietTypeImpl(
_$DietTypeImpl _$$DietTypeImplFromJson(Map<String, dynamic> json) => _$DietTypeImpl(
alko: json['alko'] as bool?,
veg: json['veg'] as bool?,
corb: json['corb'] as bool?,
meat: json['meat'] as bool?,
);
Map<String, dynamic> _$$DietTypeImplToJson(_$DietTypeImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$DietTypeImplToJson(_$DietTypeImpl instance) => <String, dynamic>{
'alko': instance.alko,
'veg': instance.veg,
'corb': instance.corb,

View File

@@ -21,23 +21,35 @@ FeedBlogPostModel _$FeedBlogPostModelFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$FeedBlogPostModel {
int get id => throw _privateConstructorUsedError;
String get state => throw _privateConstructorUsedError;
String get image => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError;
Author get author => throw _privateConstructorUsedError;
@JsonKey(name: "youtube_url")
String get youtubeUrl => throw _privateConstructorUsedError;
@JsonKey(name: "created_at")
DateTime get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
DateTime get updatedAt => throw _privateConstructorUsedError;
String get title => throw _privateConstructorUsedError;
@JsonKey(name: "total_likes")
int get totalLikes => throw _privateConstructorUsedError;
@JsonKey(name: "total_views")
int get totalViews => throw _privateConstructorUsedError;
@JsonKey(name: "total_comments")
int get totalComments => throw _privateConstructorUsedError;
@JsonKey(name: "was_liked_by_me")
bool get wasLikedByMe => throw _privateConstructorUsedError;
@@ -47,15 +59,13 @@ mixin _$FeedBlogPostModel {
/// Create a copy of FeedBlogPostModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith =>
throw _privateConstructorUsedError;
$FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $FeedBlogPostModelCopyWith<$Res> {
factory $FeedBlogPostModelCopyWith(
FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) =
_$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
factory $FeedBlogPostModelCopyWith(FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) = _$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
@useResult
$Res call(
{int id,
@@ -76,12 +86,12 @@ abstract class $FeedBlogPostModelCopyWith<$Res> {
}
/// @nodoc
class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
implements $FeedBlogPostModelCopyWith<$Res> {
class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel> implements $FeedBlogPostModelCopyWith<$Res> {
_$FeedBlogPostModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -172,11 +182,10 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
}
/// @nodoc
abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
implements $FeedBlogPostModelCopyWith<$Res> {
factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value,
$Res Function(_$FeedBlogPostModelImpl) then) =
abstract class _$$FeedBlogPostModelImplCopyWith<$Res> implements $FeedBlogPostModelCopyWith<$Res> {
factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value, $Res Function(_$FeedBlogPostModelImpl) then) =
__$$FeedBlogPostModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -199,12 +208,9 @@ abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
}
/// @nodoc
class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl>
class __$$FeedBlogPostModelImplCopyWithImpl<$Res> extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl>
implements _$$FeedBlogPostModelImplCopyWith<$Res> {
__$$FeedBlogPostModelImplCopyWithImpl(_$FeedBlogPostModelImpl _value,
$Res Function(_$FeedBlogPostModelImpl) _then)
: super(_value, _then);
__$$FeedBlogPostModelImplCopyWithImpl(_$FeedBlogPostModelImpl _value, $Res Function(_$FeedBlogPostModelImpl) _then) : super(_value, _then);
/// Create a copy of FeedBlogPostModel
/// with the given fields replaced by the non-null parameter values.
@@ -300,8 +306,7 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
@JsonKey(name: "total_comments") required this.totalComments,
@JsonKey(name: "was_liked_by_me") required this.wasLikedByMe});
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) =>
_$$FeedBlogPostModelImplFromJson(json);
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) => _$$FeedBlogPostModelImplFromJson(json);
@override
final int id;
@@ -350,52 +355,29 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
(identical(other.id, id) || other.id == id) &&
(identical(other.state, state) || other.state == state) &&
(identical(other.image, image) || other.image == image) &&
(identical(other.description, description) ||
other.description == description) &&
(identical(other.description, description) || other.description == description) &&
(identical(other.author, author) || other.author == author) &&
(identical(other.youtubeUrl, youtubeUrl) ||
other.youtubeUrl == youtubeUrl) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.youtubeUrl, youtubeUrl) || other.youtubeUrl == youtubeUrl) &&
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.totalLikes, totalLikes) ||
other.totalLikes == totalLikes) &&
(identical(other.totalViews, totalViews) ||
other.totalViews == totalViews) &&
(identical(other.totalComments, totalComments) ||
other.totalComments == totalComments) &&
(identical(other.wasLikedByMe, wasLikedByMe) ||
other.wasLikedByMe == wasLikedByMe));
(identical(other.totalLikes, totalLikes) || other.totalLikes == totalLikes) &&
(identical(other.totalViews, totalViews) || other.totalViews == totalViews) &&
(identical(other.totalComments, totalComments) || other.totalComments == totalComments) &&
(identical(other.wasLikedByMe, wasLikedByMe) || other.wasLikedByMe == wasLikedByMe));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
state,
image,
description,
author,
youtubeUrl,
createdAt,
updatedAt,
title,
totalLikes,
totalViews,
totalComments,
wasLikedByMe);
runtimeType, id, state, image, description, author, youtubeUrl, createdAt, updatedAt, title, totalLikes, totalViews, totalComments, wasLikedByMe);
/// Create a copy of FeedBlogPostModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
__$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(
this, _$identity);
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith => __$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -407,54 +389,64 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
abstract class _FeedBlogPostModel implements FeedBlogPostModel {
const factory _FeedBlogPostModel(
{required final int id,
required final String state,
required final String image,
required final String description,
required final Author author,
@JsonKey(name: "youtube_url") required final String youtubeUrl,
@JsonKey(name: "created_at") required final DateTime createdAt,
@JsonKey(name: "updated_at") required final DateTime updatedAt,
required final String title,
@JsonKey(name: "total_likes") required final int totalLikes,
@JsonKey(name: "total_views") required final int totalViews,
@JsonKey(name: "total_comments") required final int totalComments,
@JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe}) =
_$FeedBlogPostModelImpl;
{required final int id,
required final String state,
required final String image,
required final String description,
required final Author author,
@JsonKey(name: "youtube_url") required final String youtubeUrl,
@JsonKey(name: "created_at") required final DateTime createdAt,
@JsonKey(name: "updated_at") required final DateTime updatedAt,
required final String title,
@JsonKey(name: "total_likes") required final int totalLikes,
@JsonKey(name: "total_views") required final int totalViews,
@JsonKey(name: "total_comments") required final int totalComments,
@JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe}) = _$FeedBlogPostModelImpl;
factory _FeedBlogPostModel.fromJson(Map<String, dynamic> json) =
_$FeedBlogPostModelImpl.fromJson;
factory _FeedBlogPostModel.fromJson(Map<String, dynamic> json) = _$FeedBlogPostModelImpl.fromJson;
@override
int get id;
@override
String get state;
@override
String get image;
@override
String get description;
@override
Author get author;
@override
@JsonKey(name: "youtube_url")
String get youtubeUrl;
@override
@JsonKey(name: "created_at")
DateTime get createdAt;
@override
@JsonKey(name: "updated_at")
DateTime get updatedAt;
@override
String get title;
@override
@JsonKey(name: "total_likes")
int get totalLikes;
@override
@JsonKey(name: "total_views")
int get totalViews;
@override
@JsonKey(name: "total_comments")
int get totalComments;
@override
@JsonKey(name: "was_liked_by_me")
bool get wasLikedByMe;
@@ -463,6 +455,5 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,9 +6,7 @@ part of 'feed_blog_post_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
Map<String, dynamic> json) =>
_$FeedBlogPostModelImpl(
_$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(Map<String, dynamic> json) => _$FeedBlogPostModelImpl(
id: (json['id'] as num).toInt(),
state: json['state'] as String,
image: json['image'] as String,
@@ -24,9 +22,7 @@ _$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
wasLikedByMe: json['was_liked_by_me'] as bool,
);
Map<String, dynamic> _$$FeedBlogPostModelImplToJson(
_$FeedBlogPostModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$FeedBlogPostModelImplToJson(_$FeedBlogPostModelImpl instance) => <String, dynamic>{
'id': instance.id,
'state': instance.state,
'image': instance.image,

View File

@@ -1,4 +1,4 @@
import 'package:eatvio_app/core/models/base_models.dart';
import 'package:eatvio_app/core/models/pagination_model.dart';
import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

View File

@@ -14,16 +14,15 @@ 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');
FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson(
Map<String, dynamic> json) {
FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson(Map<String, dynamic> json) {
return _FeedBlogPostSettingsModel.fromJson(json);
}
/// @nodoc
mixin _$FeedBlogPostSettingsModel {
@JsonKey(name: 'data')
List<FeedBlogPostModel> get feedBlogPostList =>
throw _privateConstructorUsedError;
List<FeedBlogPostModel> get feedBlogPostList => throw _privateConstructorUsedError;
Meta get meta => throw _privateConstructorUsedError;
/// Serializes this FeedBlogPostSettingsModel to a JSON map.
@@ -32,31 +31,27 @@ mixin _$FeedBlogPostSettingsModel {
/// Create a copy of FeedBlogPostSettingsModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$FeedBlogPostSettingsModelCopyWith<FeedBlogPostSettingsModel> get copyWith =>
throw _privateConstructorUsedError;
$FeedBlogPostSettingsModelCopyWith<FeedBlogPostSettingsModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $FeedBlogPostSettingsModelCopyWith<$Res> {
factory $FeedBlogPostSettingsModelCopyWith(FeedBlogPostSettingsModel value,
$Res Function(FeedBlogPostSettingsModel) then) =
factory $FeedBlogPostSettingsModelCopyWith(FeedBlogPostSettingsModel value, $Res Function(FeedBlogPostSettingsModel) then) =
_$FeedBlogPostSettingsModelCopyWithImpl<$Res, FeedBlogPostSettingsModel>;
@useResult
$Res call(
{@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList,
Meta meta});
$Res call({@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList, Meta meta});
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
$Val extends FeedBlogPostSettingsModel>
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
class _$FeedBlogPostSettingsModelCopyWithImpl<$Res, $Val extends FeedBlogPostSettingsModel> implements $FeedBlogPostSettingsModelCopyWith<$Res> {
_$FeedBlogPostSettingsModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -92,30 +87,22 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
}
/// @nodoc
abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res>
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
factory _$$FeedBlogPostSettingsModelImplCopyWith(
_$FeedBlogPostSettingsModelImpl value,
$Res Function(_$FeedBlogPostSettingsModelImpl) then) =
abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res> implements $FeedBlogPostSettingsModelCopyWith<$Res> {
factory _$$FeedBlogPostSettingsModelImplCopyWith(_$FeedBlogPostSettingsModelImpl value, $Res Function(_$FeedBlogPostSettingsModelImpl) then) =
__$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList,
Meta meta});
$Res call({@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList, Meta meta});
@override
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>
extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
_$FeedBlogPostSettingsModelImpl>
class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res> extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res, _$FeedBlogPostSettingsModelImpl>
implements _$$FeedBlogPostSettingsModelImplCopyWith<$Res> {
__$$FeedBlogPostSettingsModelImplCopyWithImpl(
_$FeedBlogPostSettingsModelImpl _value,
$Res Function(_$FeedBlogPostSettingsModelImpl) _then)
__$$FeedBlogPostSettingsModelImplCopyWithImpl(_$FeedBlogPostSettingsModelImpl _value, $Res Function(_$FeedBlogPostSettingsModelImpl) _then)
: super(_value, _then);
/// Create a copy of FeedBlogPostSettingsModel
@@ -142,21 +129,17 @@ class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
const _$FeedBlogPostSettingsModelImpl(
{@JsonKey(name: 'data')
required final List<FeedBlogPostModel> feedBlogPostList,
required this.meta})
const _$FeedBlogPostSettingsModelImpl({@JsonKey(name: 'data') required final List<FeedBlogPostModel> feedBlogPostList, required this.meta})
: _feedBlogPostList = feedBlogPostList;
factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
_$$FeedBlogPostSettingsModelImplFromJson(json);
factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> json) => _$$FeedBlogPostSettingsModelImplFromJson(json);
final List<FeedBlogPostModel> _feedBlogPostList;
@override
@JsonKey(name: 'data')
List<FeedBlogPostModel> get feedBlogPostList {
if (_feedBlogPostList is EqualUnmodifiableListView)
return _feedBlogPostList;
if (_feedBlogPostList is EqualUnmodifiableListView) return _feedBlogPostList;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_feedBlogPostList);
}
@@ -174,24 +157,21 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FeedBlogPostSettingsModelImpl &&
const DeepCollectionEquality()
.equals(other._feedBlogPostList, _feedBlogPostList) &&
const DeepCollectionEquality().equals(other._feedBlogPostList, _feedBlogPostList) &&
(identical(other.meta, meta) || other.meta == meta));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,
const DeepCollectionEquality().hash(_feedBlogPostList), meta);
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList), meta);
/// Create a copy of FeedBlogPostSettingsModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
get copyWith => __$$FeedBlogPostSettingsModelImplCopyWithImpl<
_$FeedBlogPostSettingsModelImpl>(this, _$identity);
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl> get copyWith =>
__$$FeedBlogPostSettingsModelImplCopyWithImpl<_$FeedBlogPostSettingsModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -202,17 +182,15 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
}
abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
const factory _FeedBlogPostSettingsModel(
{@JsonKey(name: 'data')
required final List<FeedBlogPostModel> feedBlogPostList,
required final Meta meta}) = _$FeedBlogPostSettingsModelImpl;
const factory _FeedBlogPostSettingsModel({@JsonKey(name: 'data') required final List<FeedBlogPostModel> feedBlogPostList, required final Meta meta}) =
_$FeedBlogPostSettingsModelImpl;
factory _FeedBlogPostSettingsModel.fromJson(Map<String, dynamic> json) =
_$FeedBlogPostSettingsModelImpl.fromJson;
factory _FeedBlogPostSettingsModel.fromJson(Map<String, dynamic> json) = _$FeedBlogPostSettingsModelImpl.fromJson;
@override
@JsonKey(name: 'data')
List<FeedBlogPostModel> get feedBlogPostList;
@override
Meta get meta;
@@ -220,6 +198,5 @@ abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
get copyWith => throw _privateConstructorUsedError;
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,18 +6,12 @@ part of 'feed_blog_post_settings_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(
Map<String, dynamic> json) =>
_$FeedBlogPostSettingsModelImpl(
feedBlogPostList: (json['data'] as List<dynamic>)
.map((e) => FeedBlogPostModel.fromJson(e as Map<String, dynamic>))
.toList(),
_$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(Map<String, dynamic> json) => _$FeedBlogPostSettingsModelImpl(
feedBlogPostList: (json['data'] as List<dynamic>).map((e) => FeedBlogPostModel.fromJson(e as Map<String, dynamic>)).toList(),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(
_$FeedBlogPostSettingsModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(_$FeedBlogPostSettingsModelImpl instance) => <String, dynamic>{
'data': instance.feedBlogPostList,
'meta': instance.meta,
};

View File

@@ -21,28 +21,44 @@ Recipes _$RecipesFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$Recipes {
int get id => throw _privateConstructorUsedError;
String get image => throw _privateConstructorUsedError;
String get state => throw _privateConstructorUsedError;
@JsonKey(name: 'cooking_time')
int get cookingTime => throw _privateConstructorUsedError;
List<Ingredient> get ingredients => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError;
List<Step> get steps => throw _privateConstructorUsedError;
@JsonKey(name: 'video_url')
String get videoUrl => throw _privateConstructorUsedError;
@JsonKey(name: 'created_at')
DateTime get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: 'updated_at')
DateTime get updatedAt => throw _privateConstructorUsedError;
String get title => throw _privateConstructorUsedError;
String get type => throw _privateConstructorUsedError;
String get slug => throw _privateConstructorUsedError;
@JsonKey(name: 'total_comments')
int get commentsCount => throw _privateConstructorUsedError;
@JsonKey(name: 'total_likes')
int get likesCount => throw _privateConstructorUsedError;
@JsonKey(name: 'total_views')
int get viewsCount => throw _privateConstructorUsedError;
Author get author => throw _privateConstructorUsedError;
/// Serializes this Recipes to a JSON map.
@@ -56,8 +72,8 @@ mixin _$Recipes {
/// @nodoc
abstract class $RecipesCopyWith<$Res> {
factory $RecipesCopyWith(Recipes value, $Res Function(Recipes) then) =
_$RecipesCopyWithImpl<$Res, Recipes>;
factory $RecipesCopyWith(Recipes value, $Res Function(Recipes) then) = _$RecipesCopyWithImpl<$Res, Recipes>;
@useResult
$Res call(
{int id,
@@ -82,12 +98,12 @@ abstract class $RecipesCopyWith<$Res> {
}
/// @nodoc
class _$RecipesCopyWithImpl<$Res, $Val extends Recipes>
implements $RecipesCopyWith<$Res> {
class _$RecipesCopyWithImpl<$Res, $Val extends Recipes> implements $RecipesCopyWith<$Res> {
_$RecipesCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -199,9 +215,8 @@ class _$RecipesCopyWithImpl<$Res, $Val extends Recipes>
/// @nodoc
abstract class _$$RecipesImplCopyWith<$Res> implements $RecipesCopyWith<$Res> {
factory _$$RecipesImplCopyWith(
_$RecipesImpl value, $Res Function(_$RecipesImpl) then) =
__$$RecipesImplCopyWithImpl<$Res>;
factory _$$RecipesImplCopyWith(_$RecipesImpl value, $Res Function(_$RecipesImpl) then) = __$$RecipesImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -228,12 +243,8 @@ abstract class _$$RecipesImplCopyWith<$Res> implements $RecipesCopyWith<$Res> {
}
/// @nodoc
class __$$RecipesImplCopyWithImpl<$Res>
extends _$RecipesCopyWithImpl<$Res, _$RecipesImpl>
implements _$$RecipesImplCopyWith<$Res> {
__$$RecipesImplCopyWithImpl(
_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then)
: super(_value, _then);
class __$$RecipesImplCopyWithImpl<$Res> extends _$RecipesCopyWithImpl<$Res, _$RecipesImpl> implements _$$RecipesImplCopyWith<$Res> {
__$$RecipesImplCopyWithImpl(_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then) : super(_value, _then);
/// Create a copy of Recipes
/// with the given fields replaced by the non-null parameter values.
@@ -355,8 +366,7 @@ class _$RecipesImpl implements _Recipes {
: _ingredients = ingredients,
_steps = steps;
factory _$RecipesImpl.fromJson(Map<String, dynamic> json) =>
_$$RecipesImplFromJson(json);
factory _$RecipesImpl.fromJson(Map<String, dynamic> json) => _$$RecipesImplFromJson(json);
@override
final int id;
@@ -368,6 +378,7 @@ class _$RecipesImpl implements _Recipes {
@JsonKey(name: 'cooking_time')
final int cookingTime;
final List<Ingredient> _ingredients;
@override
List<Ingredient> get ingredients {
if (_ingredients is EqualUnmodifiableListView) return _ingredients;
@@ -378,6 +389,7 @@ class _$RecipesImpl implements _Recipes {
@override
final String description;
final List<Step> _steps;
@override
List<Step> get steps {
if (_steps is EqualUnmodifiableListView) return _steps;
@@ -425,60 +437,33 @@ class _$RecipesImpl implements _Recipes {
(identical(other.id, id) || other.id == id) &&
(identical(other.image, image) || other.image == image) &&
(identical(other.state, state) || other.state == state) &&
(identical(other.cookingTime, cookingTime) ||
other.cookingTime == cookingTime) &&
const DeepCollectionEquality()
.equals(other._ingredients, _ingredients) &&
(identical(other.description, description) ||
other.description == description) &&
(identical(other.cookingTime, cookingTime) || other.cookingTime == cookingTime) &&
const DeepCollectionEquality().equals(other._ingredients, _ingredients) &&
(identical(other.description, description) || other.description == description) &&
const DeepCollectionEquality().equals(other._steps, _steps) &&
(identical(other.videoUrl, videoUrl) ||
other.videoUrl == videoUrl) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.videoUrl, videoUrl) || other.videoUrl == videoUrl) &&
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.type, type) || other.type == type) &&
(identical(other.slug, slug) || other.slug == slug) &&
(identical(other.commentsCount, commentsCount) ||
other.commentsCount == commentsCount) &&
(identical(other.likesCount, likesCount) ||
other.likesCount == likesCount) &&
(identical(other.viewsCount, viewsCount) ||
other.viewsCount == viewsCount) &&
(identical(other.commentsCount, commentsCount) || other.commentsCount == commentsCount) &&
(identical(other.likesCount, likesCount) || other.likesCount == likesCount) &&
(identical(other.viewsCount, viewsCount) || other.viewsCount == viewsCount) &&
(identical(other.author, author) || other.author == author));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
image,
state,
cookingTime,
const DeepCollectionEquality().hash(_ingredients),
description,
const DeepCollectionEquality().hash(_steps),
videoUrl,
createdAt,
updatedAt,
title,
type,
slug,
commentsCount,
likesCount,
viewsCount,
author);
int get hashCode => Object.hash(runtimeType, id, image, state, cookingTime, const DeepCollectionEquality().hash(_ingredients), description,
const DeepCollectionEquality().hash(_steps), videoUrl, createdAt, updatedAt, title, type, slug, commentsCount, likesCount, viewsCount, author);
/// Create a copy of Recipes
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
__$$RecipesImplCopyWithImpl<_$RecipesImpl>(this, _$identity);
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith => __$$RecipesImplCopyWithImpl<_$RecipesImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -512,43 +497,59 @@ abstract class _Recipes implements Recipes {
@override
int get id;
@override
String get image;
@override
String get state;
@override
@JsonKey(name: 'cooking_time')
int get cookingTime;
@override
List<Ingredient> get ingredients;
@override
String get description;
@override
List<Step> get steps;
@override
@JsonKey(name: 'video_url')
String get videoUrl;
@override
@JsonKey(name: 'created_at')
DateTime get createdAt;
@override
@JsonKey(name: 'updated_at')
DateTime get updatedAt;
@override
String get title;
@override
String get type;
@override
String get slug;
@override
@JsonKey(name: 'total_comments')
int get commentsCount;
@override
@JsonKey(name: 'total_likes')
int get likesCount;
@override
@JsonKey(name: 'total_views')
int get viewsCount;
@override
Author get author;
@@ -556,8 +557,7 @@ abstract class _Recipes implements Recipes {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith => throw _privateConstructorUsedError;
}
Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
@@ -567,7 +567,9 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$Ingredient {
String get name => throw _privateConstructorUsedError;
String? get unit => throw _privateConstructorUsedError;
String get portion => throw _privateConstructorUsedError;
/// Serializes this Ingredient to a JSON map.
@@ -576,26 +578,24 @@ mixin _$Ingredient {
/// Create a copy of Ingredient
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$IngredientCopyWith<Ingredient> get copyWith =>
throw _privateConstructorUsedError;
$IngredientCopyWith<Ingredient> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $IngredientCopyWith<$Res> {
factory $IngredientCopyWith(
Ingredient value, $Res Function(Ingredient) then) =
_$IngredientCopyWithImpl<$Res, Ingredient>;
factory $IngredientCopyWith(Ingredient value, $Res Function(Ingredient) then) = _$IngredientCopyWithImpl<$Res, Ingredient>;
@useResult
$Res call({String name, String? unit, String portion});
}
/// @nodoc
class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
implements $IngredientCopyWith<$Res> {
class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> implements $IngredientCopyWith<$Res> {
_$IngredientCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -626,23 +626,17 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
}
/// @nodoc
abstract class _$$IngredientImplCopyWith<$Res>
implements $IngredientCopyWith<$Res> {
factory _$$IngredientImplCopyWith(
_$IngredientImpl value, $Res Function(_$IngredientImpl) then) =
__$$IngredientImplCopyWithImpl<$Res>;
abstract class _$$IngredientImplCopyWith<$Res> implements $IngredientCopyWith<$Res> {
factory _$$IngredientImplCopyWith(_$IngredientImpl value, $Res Function(_$IngredientImpl) then) = __$$IngredientImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String name, String? unit, String portion});
}
/// @nodoc
class __$$IngredientImplCopyWithImpl<$Res>
extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl>
implements _$$IngredientImplCopyWith<$Res> {
__$$IngredientImplCopyWithImpl(
_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then)
: super(_value, _then);
class __$$IngredientImplCopyWithImpl<$Res> extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl> implements _$$IngredientImplCopyWith<$Res> {
__$$IngredientImplCopyWithImpl(_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then) : super(_value, _then);
/// Create a copy of Ingredient
/// with the given fields replaced by the non-null parameter values.
@@ -673,11 +667,9 @@ class __$$IngredientImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$IngredientImpl implements _Ingredient {
const _$IngredientImpl(
{required this.name, this.unit, required this.portion});
const _$IngredientImpl({required this.name, this.unit, required this.portion});
factory _$IngredientImpl.fromJson(Map<String, dynamic> json) =>
_$$IngredientImplFromJson(json);
factory _$IngredientImpl.fromJson(Map<String, dynamic> json) => _$$IngredientImplFromJson(json);
@override
final String name;
@@ -710,8 +702,7 @@ class _$IngredientImpl implements _Ingredient {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
__$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity);
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith => __$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -722,18 +713,16 @@ class _$IngredientImpl implements _Ingredient {
}
abstract class _Ingredient implements Ingredient {
const factory _Ingredient(
{required final String name,
final String? unit,
required final String portion}) = _$IngredientImpl;
const factory _Ingredient({required final String name, final String? unit, required final String portion}) = _$IngredientImpl;
factory _Ingredient.fromJson(Map<String, dynamic> json) =
_$IngredientImpl.fromJson;
factory _Ingredient.fromJson(Map<String, dynamic> json) = _$IngredientImpl.fromJson;
@override
String get name;
@override
String? get unit;
@override
String get portion;
@@ -741,8 +730,7 @@ abstract class _Ingredient implements Ingredient {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith => throw _privateConstructorUsedError;
}
Step _$StepFromJson(Map<String, dynamic> json) {
@@ -752,6 +740,7 @@ Step _$StepFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$Step {
String get image => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError;
/// Serializes this Step to a JSON map.
@@ -765,19 +754,19 @@ mixin _$Step {
/// @nodoc
abstract class $StepCopyWith<$Res> {
factory $StepCopyWith(Step value, $Res Function(Step) then) =
_$StepCopyWithImpl<$Res, Step>;
factory $StepCopyWith(Step value, $Res Function(Step) then) = _$StepCopyWithImpl<$Res, Step>;
@useResult
$Res call({String image, String description});
}
/// @nodoc
class _$StepCopyWithImpl<$Res, $Val extends Step>
implements $StepCopyWith<$Res> {
class _$StepCopyWithImpl<$Res, $Val extends Step> implements $StepCopyWith<$Res> {
_$StepCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -804,20 +793,16 @@ class _$StepCopyWithImpl<$Res, $Val extends Step>
/// @nodoc
abstract class _$$StepImplCopyWith<$Res> implements $StepCopyWith<$Res> {
factory _$$StepImplCopyWith(
_$StepImpl value, $Res Function(_$StepImpl) then) =
__$$StepImplCopyWithImpl<$Res>;
factory _$$StepImplCopyWith(_$StepImpl value, $Res Function(_$StepImpl) then) = __$$StepImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String image, String description});
}
/// @nodoc
class __$$StepImplCopyWithImpl<$Res>
extends _$StepCopyWithImpl<$Res, _$StepImpl>
implements _$$StepImplCopyWith<$Res> {
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then)
: super(_value, _then);
class __$$StepImplCopyWithImpl<$Res> extends _$StepCopyWithImpl<$Res, _$StepImpl> implements _$$StepImplCopyWith<$Res> {
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then) : super(_value, _then);
/// Create a copy of Step
/// with the given fields replaced by the non-null parameter values.
@@ -845,8 +830,7 @@ class __$$StepImplCopyWithImpl<$Res>
class _$StepImpl implements _Step {
const _$StepImpl({required this.image, required this.description});
factory _$StepImpl.fromJson(Map<String, dynamic> json) =>
_$$StepImplFromJson(json);
factory _$StepImpl.fromJson(Map<String, dynamic> json) => _$$StepImplFromJson(json);
@override
final String image;
@@ -864,8 +848,7 @@ class _$StepImpl implements _Step {
(other.runtimeType == runtimeType &&
other is _$StepImpl &&
(identical(other.image, image) || other.image == image) &&
(identical(other.description, description) ||
other.description == description));
(identical(other.description, description) || other.description == description));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -877,8 +860,7 @@ class _$StepImpl implements _Step {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
__$$StepImplCopyWithImpl<_$StepImpl>(this, _$identity);
_$$StepImplCopyWith<_$StepImpl> get copyWith => __$$StepImplCopyWithImpl<_$StepImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -889,14 +871,13 @@ class _$StepImpl implements _Step {
}
abstract class _Step implements Step {
const factory _Step(
{required final String image,
required final String description}) = _$StepImpl;
const factory _Step({required final String image, required final String description}) = _$StepImpl;
factory _Step.fromJson(Map<String, dynamic> json) = _$StepImpl.fromJson;
@override
String get image;
@override
String get description;
@@ -904,6 +885,5 @@ abstract class _Step implements Step {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$StepImplCopyWith<_$StepImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,19 +6,14 @@ part of 'recipes_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) =>
_$RecipesImpl(
_$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) => _$RecipesImpl(
id: (json['id'] as num).toInt(),
image: json['image'] as String,
state: json['state'] as String,
cookingTime: (json['cooking_time'] as num).toInt(),
ingredients: (json['ingredients'] as List<dynamic>)
.map((e) => Ingredient.fromJson(e as Map<String, dynamic>))
.toList(),
ingredients: (json['ingredients'] as List<dynamic>).map((e) => Ingredient.fromJson(e as Map<String, dynamic>)).toList(),
description: json['description'] as String,
steps: (json['steps'] as List<dynamic>)
.map((e) => Step.fromJson(e as Map<String, dynamic>))
.toList(),
steps: (json['steps'] as List<dynamic>).map((e) => Step.fromJson(e as Map<String, dynamic>)).toList(),
videoUrl: json['video_url'] as String,
createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String),
@@ -31,8 +26,7 @@ _$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) =>
author: Author.fromJson(json['author'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) => <String, dynamic>{
'id': instance.id,
'image': instance.image,
'state': instance.state,
@@ -52,15 +46,13 @@ Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) =>
'author': instance.author,
};
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) =>
_$IngredientImpl(
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) => _$IngredientImpl(
name: json['name'] as String,
unit: json['unit'] as String?,
portion: json['portion'] as String,
);
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) => <String, dynamic>{
'name': instance.name,
'unit': instance.unit,
'portion': instance.portion,
@@ -71,8 +63,7 @@ _$StepImpl _$$StepImplFromJson(Map<String, dynamic> json) => _$StepImpl(
description: json['description'] as String,
);
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) => <String, dynamic>{
'image': instance.image,
'description': instance.description,
};

View File

@@ -29,26 +29,24 @@ mixin _$RecipesPagination {
/// Create a copy of RecipesPagination
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$RecipesPaginationCopyWith<RecipesPagination> get copyWith =>
throw _privateConstructorUsedError;
$RecipesPaginationCopyWith<RecipesPagination> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $RecipesPaginationCopyWith<$Res> {
factory $RecipesPaginationCopyWith(
RecipesPagination value, $Res Function(RecipesPagination) then) =
_$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>;
factory $RecipesPaginationCopyWith(RecipesPagination value, $Res Function(RecipesPagination) then) = _$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>;
@useResult
$Res call({@JsonKey(name: 'data') List<Recipes> recipesList});
}
/// @nodoc
class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination>
implements $RecipesPaginationCopyWith<$Res> {
class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination> implements $RecipesPaginationCopyWith<$Res> {
_$RecipesPaginationCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -69,23 +67,19 @@ class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination>
}
/// @nodoc
abstract class _$$RecipesPaginationImplCopyWith<$Res>
implements $RecipesPaginationCopyWith<$Res> {
factory _$$RecipesPaginationImplCopyWith(_$RecipesPaginationImpl value,
$Res Function(_$RecipesPaginationImpl) then) =
abstract class _$$RecipesPaginationImplCopyWith<$Res> implements $RecipesPaginationCopyWith<$Res> {
factory _$$RecipesPaginationImplCopyWith(_$RecipesPaginationImpl value, $Res Function(_$RecipesPaginationImpl) then) =
__$$RecipesPaginationImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({@JsonKey(name: 'data') List<Recipes> recipesList});
}
/// @nodoc
class __$$RecipesPaginationImplCopyWithImpl<$Res>
extends _$RecipesPaginationCopyWithImpl<$Res, _$RecipesPaginationImpl>
class __$$RecipesPaginationImplCopyWithImpl<$Res> extends _$RecipesPaginationCopyWithImpl<$Res, _$RecipesPaginationImpl>
implements _$$RecipesPaginationImplCopyWith<$Res> {
__$$RecipesPaginationImplCopyWithImpl(_$RecipesPaginationImpl _value,
$Res Function(_$RecipesPaginationImpl) _then)
: super(_value, _then);
__$$RecipesPaginationImplCopyWithImpl(_$RecipesPaginationImpl _value, $Res Function(_$RecipesPaginationImpl) _then) : super(_value, _then);
/// Create a copy of RecipesPagination
/// with the given fields replaced by the non-null parameter values.
@@ -106,14 +100,12 @@ class __$$RecipesPaginationImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$RecipesPaginationImpl implements _RecipesPagination {
const _$RecipesPaginationImpl(
{@JsonKey(name: 'data') required final List<Recipes> recipesList})
: _recipesList = recipesList;
const _$RecipesPaginationImpl({@JsonKey(name: 'data') required final List<Recipes> recipesList}) : _recipesList = recipesList;
factory _$RecipesPaginationImpl.fromJson(Map<String, dynamic> json) =>
_$$RecipesPaginationImplFromJson(json);
factory _$RecipesPaginationImpl.fromJson(Map<String, dynamic> json) => _$$RecipesPaginationImplFromJson(json);
final List<Recipes> _recipesList;
@override
@JsonKey(name: 'data')
List<Recipes> get recipesList {
@@ -130,25 +122,19 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$RecipesPaginationImpl &&
const DeepCollectionEquality()
.equals(other._recipesList, _recipesList));
(other.runtimeType == runtimeType && other is _$RecipesPaginationImpl && const DeepCollectionEquality().equals(other._recipesList, _recipesList));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_recipesList));
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_recipesList));
/// Create a copy of RecipesPagination
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
__$$RecipesPaginationImplCopyWithImpl<_$RecipesPaginationImpl>(
this, _$identity);
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith => __$$RecipesPaginationImplCopyWithImpl<_$RecipesPaginationImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -159,12 +145,9 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
}
abstract class _RecipesPagination implements RecipesPagination {
const factory _RecipesPagination(
{@JsonKey(name: 'data') required final List<Recipes> recipesList}) =
_$RecipesPaginationImpl;
const factory _RecipesPagination({@JsonKey(name: 'data') required final List<Recipes> recipesList}) = _$RecipesPaginationImpl;
factory _RecipesPagination.fromJson(Map<String, dynamic> json) =
_$RecipesPaginationImpl.fromJson;
factory _RecipesPagination.fromJson(Map<String, dynamic> json) = _$RecipesPaginationImpl.fromJson;
@override
@JsonKey(name: 'data')
@@ -174,6 +157,5 @@ abstract class _RecipesPagination implements RecipesPagination {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,16 +6,10 @@ part of 'recipes_pagination_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$RecipesPaginationImpl _$$RecipesPaginationImplFromJson(
Map<String, dynamic> json) =>
_$RecipesPaginationImpl(
recipesList: (json['data'] as List<dynamic>)
.map((e) => Recipes.fromJson(e as Map<String, dynamic>))
.toList(),
_$RecipesPaginationImpl _$$RecipesPaginationImplFromJson(Map<String, dynamic> json) => _$RecipesPaginationImpl(
recipesList: (json['data'] as List<dynamic>).map((e) => Recipes.fromJson(e as Map<String, dynamic>)).toList(),
);
Map<String, dynamic> _$$RecipesPaginationImplToJson(
_$RecipesPaginationImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$RecipesPaginationImplToJson(_$RecipesPaginationImpl instance) => <String, dynamic>{
'data': instance.recipesList,
};

View File

@@ -24,6 +24,7 @@ mixin _$CommentsState {
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -70,18 +71,16 @@ mixin _$CommentsState {
/// @nodoc
abstract class $CommentsStateCopyWith<$Res> {
factory $CommentsStateCopyWith(
CommentsState value, $Res Function(CommentsState) then) =
_$CommentsStateCopyWithImpl<$Res, CommentsState>;
factory $CommentsStateCopyWith(CommentsState value, $Res Function(CommentsState) then) = _$CommentsStateCopyWithImpl<$Res, CommentsState>;
}
/// @nodoc
class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState>
implements $CommentsStateCopyWith<$Res> {
class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState> implements $CommentsStateCopyWith<$Res> {
_$CommentsStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -91,18 +90,12 @@ class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState>
/// @nodoc
abstract class _$$CommentsStateImplCopyWith<$Res> {
factory _$$CommentsStateImplCopyWith(
_$CommentsStateImpl value, $Res Function(_$CommentsStateImpl) then) =
__$$CommentsStateImplCopyWithImpl<$Res>;
factory _$$CommentsStateImplCopyWith(_$CommentsStateImpl value, $Res Function(_$CommentsStateImpl) then) = __$$CommentsStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$CommentsStateImplCopyWithImpl<$Res>
extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateImpl>
implements _$$CommentsStateImplCopyWith<$Res> {
__$$CommentsStateImplCopyWithImpl(
_$CommentsStateImpl _value, $Res Function(_$CommentsStateImpl) _then)
: super(_value, _then);
class __$$CommentsStateImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateImpl> implements _$$CommentsStateImplCopyWith<$Res> {
__$$CommentsStateImplCopyWithImpl(_$CommentsStateImpl _value, $Res Function(_$CommentsStateImpl) _then) : super(_value, _then);
/// Create a copy of CommentsState
/// with the given fields replaced by the non-null parameter values.
@@ -120,8 +113,7 @@ class _$CommentsStateImpl implements _CommentsState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$CommentsStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$CommentsStateImpl);
}
@override
@@ -208,18 +200,14 @@ abstract class _CommentsState implements CommentsState {
/// @nodoc
abstract class _$$CommentsStateLoadingImplCopyWith<$Res> {
factory _$$CommentsStateLoadingImplCopyWith(_$CommentsStateLoadingImpl value,
$Res Function(_$CommentsStateLoadingImpl) then) =
factory _$$CommentsStateLoadingImplCopyWith(_$CommentsStateLoadingImpl value, $Res Function(_$CommentsStateLoadingImpl) then) =
__$$CommentsStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$CommentsStateLoadingImplCopyWithImpl<$Res>
extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateLoadingImpl>
class __$$CommentsStateLoadingImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateLoadingImpl>
implements _$$CommentsStateLoadingImplCopyWith<$Res> {
__$$CommentsStateLoadingImplCopyWithImpl(_$CommentsStateLoadingImpl _value,
$Res Function(_$CommentsStateLoadingImpl) _then)
: super(_value, _then);
__$$CommentsStateLoadingImplCopyWithImpl(_$CommentsStateLoadingImpl _value, $Res Function(_$CommentsStateLoadingImpl) _then) : super(_value, _then);
/// Create a copy of CommentsState
/// with the given fields replaced by the non-null parameter values.
@@ -237,9 +225,7 @@ class _$CommentsStateLoadingImpl implements CommentsStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CommentsStateLoadingImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$CommentsStateLoadingImpl);
}
@override
@@ -326,9 +312,9 @@ abstract class CommentsStateLoading implements CommentsState {
/// @nodoc
abstract class _$$CommentsStateLoadedImplCopyWith<$Res> {
factory _$$CommentsStateLoadedImplCopyWith(_$CommentsStateLoadedImpl value,
$Res Function(_$CommentsStateLoadedImpl) then) =
factory _$$CommentsStateLoadedImplCopyWith(_$CommentsStateLoadedImpl value, $Res Function(_$CommentsStateLoadedImpl) then) =
__$$CommentsStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call({CommentModel comment, int? replyId});
@@ -336,12 +322,9 @@ abstract class _$$CommentsStateLoadedImplCopyWith<$Res> {
}
/// @nodoc
class __$$CommentsStateLoadedImplCopyWithImpl<$Res>
extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateLoadedImpl>
class __$$CommentsStateLoadedImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateLoadedImpl>
implements _$$CommentsStateLoadedImplCopyWith<$Res> {
__$$CommentsStateLoadedImplCopyWithImpl(_$CommentsStateLoadedImpl _value,
$Res Function(_$CommentsStateLoadedImpl) _then)
: super(_value, _then);
__$$CommentsStateLoadedImplCopyWithImpl(_$CommentsStateLoadedImpl _value, $Res Function(_$CommentsStateLoadedImpl) _then) : super(_value, _then);
/// Create a copy of CommentsState
/// with the given fields replaced by the non-null parameter values.
@@ -407,8 +390,7 @@ class _$CommentsStateLoadedImpl implements CommentsStateLoaded {
@override
@pragma('vm:prefer-inline')
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith =>
__$$CommentsStateLoadedImplCopyWithImpl<_$CommentsStateLoadedImpl>(
this, _$identity);
__$$CommentsStateLoadedImplCopyWithImpl<_$CommentsStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -486,36 +468,31 @@ class _$CommentsStateLoadedImpl implements CommentsStateLoaded {
}
abstract class CommentsStateLoaded implements CommentsState {
const factory CommentsStateLoaded(
{required final CommentModel comment,
final int? replyId}) = _$CommentsStateLoadedImpl;
const factory CommentsStateLoaded({required final CommentModel comment, final int? replyId}) = _$CommentsStateLoadedImpl;
CommentModel get comment;
int? get replyId;
/// Create a copy of CommentsState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$CommentsStateErrorImplCopyWith<$Res> {
factory _$$CommentsStateErrorImplCopyWith(_$CommentsStateErrorImpl value,
$Res Function(_$CommentsStateErrorImpl) then) =
factory _$$CommentsStateErrorImplCopyWith(_$CommentsStateErrorImpl value, $Res Function(_$CommentsStateErrorImpl) then) =
__$$CommentsStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$CommentsStateErrorImplCopyWithImpl<$Res>
extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateErrorImpl>
class __$$CommentsStateErrorImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateErrorImpl>
implements _$$CommentsStateErrorImplCopyWith<$Res> {
__$$CommentsStateErrorImplCopyWithImpl(_$CommentsStateErrorImpl _value,
$Res Function(_$CommentsStateErrorImpl) _then)
: super(_value, _then);
__$$CommentsStateErrorImplCopyWithImpl(_$CommentsStateErrorImpl _value, $Res Function(_$CommentsStateErrorImpl) _then) : super(_value, _then);
/// Create a copy of CommentsState
/// with the given fields replaced by the non-null parameter values.
@@ -551,8 +528,7 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CommentsStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -564,8 +540,7 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
@override
@pragma('vm:prefer-inline')
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
__$$CommentsStateErrorImplCopyWithImpl<_$CommentsStateErrorImpl>(
this, _$identity);
__$$CommentsStateErrorImplCopyWithImpl<_$CommentsStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -643,14 +618,12 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
}
abstract class CommentsStateError implements CommentsState {
const factory CommentsStateError({required final String errorMessage}) =
_$CommentsStateErrorImpl;
const factory CommentsStateError({required final String errorMessage}) = _$CommentsStateErrorImpl;
String get errorMessage;
/// Create a copy of CommentsState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -24,6 +24,7 @@ mixin _$DietsState {
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -70,18 +71,16 @@ mixin _$DietsState {
/// @nodoc
abstract class $DietsStateCopyWith<$Res> {
factory $DietsStateCopyWith(
DietsState value, $Res Function(DietsState) then) =
_$DietsStateCopyWithImpl<$Res, DietsState>;
factory $DietsStateCopyWith(DietsState value, $Res Function(DietsState) then) = _$DietsStateCopyWithImpl<$Res, DietsState>;
}
/// @nodoc
class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState>
implements $DietsStateCopyWith<$Res> {
class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState> implements $DietsStateCopyWith<$Res> {
_$DietsStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -91,18 +90,12 @@ class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState>
/// @nodoc
abstract class _$$DietsStateImplCopyWith<$Res> {
factory _$$DietsStateImplCopyWith(
_$DietsStateImpl value, $Res Function(_$DietsStateImpl) then) =
__$$DietsStateImplCopyWithImpl<$Res>;
factory _$$DietsStateImplCopyWith(_$DietsStateImpl value, $Res Function(_$DietsStateImpl) then) = __$$DietsStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$DietsStateImplCopyWithImpl<$Res>
extends _$DietsStateCopyWithImpl<$Res, _$DietsStateImpl>
implements _$$DietsStateImplCopyWith<$Res> {
__$$DietsStateImplCopyWithImpl(
_$DietsStateImpl _value, $Res Function(_$DietsStateImpl) _then)
: super(_value, _then);
class __$$DietsStateImplCopyWithImpl<$Res> extends _$DietsStateCopyWithImpl<$Res, _$DietsStateImpl> implements _$$DietsStateImplCopyWith<$Res> {
__$$DietsStateImplCopyWithImpl(_$DietsStateImpl _value, $Res Function(_$DietsStateImpl) _then) : super(_value, _then);
/// Create a copy of DietsState
/// with the given fields replaced by the non-null parameter values.
@@ -120,8 +113,7 @@ class _$DietsStateImpl implements _DietsState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$DietsStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$DietsStateImpl);
}
@override
@@ -208,18 +200,14 @@ abstract class _DietsState implements DietsState {
/// @nodoc
abstract class _$$DietsStateLoadingImplCopyWith<$Res> {
factory _$$DietsStateLoadingImplCopyWith(_$DietsStateLoadingImpl value,
$Res Function(_$DietsStateLoadingImpl) then) =
factory _$$DietsStateLoadingImplCopyWith(_$DietsStateLoadingImpl value, $Res Function(_$DietsStateLoadingImpl) then) =
__$$DietsStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$DietsStateLoadingImplCopyWithImpl<$Res>
extends _$DietsStateCopyWithImpl<$Res, _$DietsStateLoadingImpl>
class __$$DietsStateLoadingImplCopyWithImpl<$Res> extends _$DietsStateCopyWithImpl<$Res, _$DietsStateLoadingImpl>
implements _$$DietsStateLoadingImplCopyWith<$Res> {
__$$DietsStateLoadingImplCopyWithImpl(_$DietsStateLoadingImpl _value,
$Res Function(_$DietsStateLoadingImpl) _then)
: super(_value, _then);
__$$DietsStateLoadingImplCopyWithImpl(_$DietsStateLoadingImpl _value, $Res Function(_$DietsStateLoadingImpl) _then) : super(_value, _then);
/// Create a copy of DietsState
/// with the given fields replaced by the non-null parameter values.
@@ -237,8 +225,7 @@ class _$DietsStateLoadingImpl implements DietsStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$DietsStateLoadingImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$DietsStateLoadingImpl);
}
@override
@@ -325,9 +312,9 @@ abstract class DietsStateLoading implements DietsState {
/// @nodoc
abstract class _$$DietsStateLoadedImplCopyWith<$Res> {
factory _$$DietsStateLoadedImplCopyWith(_$DietsStateLoadedImpl value,
$Res Function(_$DietsStateLoadedImpl) then) =
factory _$$DietsStateLoadedImplCopyWith(_$DietsStateLoadedImpl value, $Res Function(_$DietsStateLoadedImpl) then) =
__$$DietsStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call({DietsPagination diets});
@@ -335,12 +322,9 @@ abstract class _$$DietsStateLoadedImplCopyWith<$Res> {
}
/// @nodoc
class __$$DietsStateLoadedImplCopyWithImpl<$Res>
extends _$DietsStateCopyWithImpl<$Res, _$DietsStateLoadedImpl>
class __$$DietsStateLoadedImplCopyWithImpl<$Res> extends _$DietsStateCopyWithImpl<$Res, _$DietsStateLoadedImpl>
implements _$$DietsStateLoadedImplCopyWith<$Res> {
__$$DietsStateLoadedImplCopyWithImpl(_$DietsStateLoadedImpl _value,
$Res Function(_$DietsStateLoadedImpl) _then)
: super(_value, _then);
__$$DietsStateLoadedImplCopyWithImpl(_$DietsStateLoadedImpl _value, $Res Function(_$DietsStateLoadedImpl) _then) : super(_value, _then);
/// Create a copy of DietsState
/// with the given fields replaced by the non-null parameter values.
@@ -384,9 +368,7 @@ class _$DietsStateLoadedImpl implements DietsStateLoaded {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DietsStateLoadedImpl &&
(identical(other.diets, diets) || other.diets == diets));
(other.runtimeType == runtimeType && other is _$DietsStateLoadedImpl && (identical(other.diets, diets) || other.diets == diets));
}
@override
@@ -397,9 +379,7 @@ class _$DietsStateLoadedImpl implements DietsStateLoaded {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith =>
__$$DietsStateLoadedImplCopyWithImpl<_$DietsStateLoadedImpl>(
this, _$identity);
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith => __$$DietsStateLoadedImplCopyWithImpl<_$DietsStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -477,34 +457,27 @@ class _$DietsStateLoadedImpl implements DietsStateLoaded {
}
abstract class DietsStateLoaded implements DietsState {
const factory DietsStateLoaded({required final DietsPagination diets}) =
_$DietsStateLoadedImpl;
const factory DietsStateLoaded({required final DietsPagination diets}) = _$DietsStateLoadedImpl;
DietsPagination get diets;
/// Create a copy of DietsState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$DietsStateErrorImplCopyWith<$Res> {
factory _$$DietsStateErrorImplCopyWith(_$DietsStateErrorImpl value,
$Res Function(_$DietsStateErrorImpl) then) =
__$$DietsStateErrorImplCopyWithImpl<$Res>;
factory _$$DietsStateErrorImplCopyWith(_$DietsStateErrorImpl value, $Res Function(_$DietsStateErrorImpl) then) = __$$DietsStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$DietsStateErrorImplCopyWithImpl<$Res>
extends _$DietsStateCopyWithImpl<$Res, _$DietsStateErrorImpl>
implements _$$DietsStateErrorImplCopyWith<$Res> {
__$$DietsStateErrorImplCopyWithImpl(
_$DietsStateErrorImpl _value, $Res Function(_$DietsStateErrorImpl) _then)
: super(_value, _then);
class __$$DietsStateErrorImplCopyWithImpl<$Res> extends _$DietsStateCopyWithImpl<$Res, _$DietsStateErrorImpl> implements _$$DietsStateErrorImplCopyWith<$Res> {
__$$DietsStateErrorImplCopyWithImpl(_$DietsStateErrorImpl _value, $Res Function(_$DietsStateErrorImpl) _then) : super(_value, _then);
/// Create a copy of DietsState
/// with the given fields replaced by the non-null parameter values.
@@ -540,8 +513,7 @@ class _$DietsStateErrorImpl implements DietsStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DietsStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -552,9 +524,7 @@ class _$DietsStateErrorImpl implements DietsStateError {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith =>
__$$DietsStateErrorImplCopyWithImpl<_$DietsStateErrorImpl>(
this, _$identity);
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith => __$$DietsStateErrorImplCopyWithImpl<_$DietsStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -632,14 +602,12 @@ class _$DietsStateErrorImpl implements DietsStateError {
}
abstract class DietsStateError implements DietsState {
const factory DietsStateError({required final String errorMessage}) =
_$DietsStateErrorImpl;
const factory DietsStateError({required final String errorMessage}) = _$DietsStateErrorImpl;
String get errorMessage;
/// Create a copy of DietsState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -20,18 +20,16 @@ mixin _$FeedState {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
loaded,
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
loaded,
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
TResult? Function(String errorMessage)? error,
}) =>
throw _privateConstructorUsedError;
@@ -39,8 +37,7 @@ mixin _$FeedState {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
loaded,
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) =>
@@ -74,17 +71,16 @@ mixin _$FeedState {
/// @nodoc
abstract class $FeedStateCopyWith<$Res> {
factory $FeedStateCopyWith(FeedState value, $Res Function(FeedState) then) =
_$FeedStateCopyWithImpl<$Res, FeedState>;
factory $FeedStateCopyWith(FeedState value, $Res Function(FeedState) then) = _$FeedStateCopyWithImpl<$Res, FeedState>;
}
/// @nodoc
class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState>
implements $FeedStateCopyWith<$Res> {
class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState> implements $FeedStateCopyWith<$Res> {
_$FeedStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -94,18 +90,12 @@ class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState>
/// @nodoc
abstract class _$$FeedStateImplCopyWith<$Res> {
factory _$$FeedStateImplCopyWith(
_$FeedStateImpl value, $Res Function(_$FeedStateImpl) then) =
__$$FeedStateImplCopyWithImpl<$Res>;
factory _$$FeedStateImplCopyWith(_$FeedStateImpl value, $Res Function(_$FeedStateImpl) then) = __$$FeedStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$FeedStateImplCopyWithImpl<$Res>
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateImpl>
implements _$$FeedStateImplCopyWith<$Res> {
__$$FeedStateImplCopyWithImpl(
_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then)
: super(_value, _then);
class __$$FeedStateImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateImpl> implements _$$FeedStateImplCopyWith<$Res> {
__$$FeedStateImplCopyWithImpl(_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then) : super(_value, _then);
/// Create a copy of FeedState
/// with the given fields replaced by the non-null parameter values.
@@ -123,8 +113,7 @@ class _$FeedStateImpl implements _FeedState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$FeedStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$FeedStateImpl);
}
@override
@@ -135,9 +124,7 @@ class _$FeedStateImpl implements _FeedState {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
loaded,
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
required TResult Function(String errorMessage) error,
}) {
return $default();
@@ -148,8 +135,7 @@ class _$FeedStateImpl implements _FeedState {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
loaded,
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return $default?.call();
@@ -160,8 +146,7 @@ class _$FeedStateImpl implements _FeedState {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
loaded,
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -215,18 +200,14 @@ abstract class _FeedState implements FeedState {
/// @nodoc
abstract class _$$FeedStateLoadingImplCopyWith<$Res> {
factory _$$FeedStateLoadingImplCopyWith(_$FeedStateLoadingImpl value,
$Res Function(_$FeedStateLoadingImpl) then) =
factory _$$FeedStateLoadingImplCopyWith(_$FeedStateLoadingImpl value, $Res Function(_$FeedStateLoadingImpl) then) =
__$$FeedStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$FeedStateLoadingImplCopyWithImpl<$Res>
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadingImpl>
class __$$FeedStateLoadingImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadingImpl>
implements _$$FeedStateLoadingImplCopyWith<$Res> {
__$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value,
$Res Function(_$FeedStateLoadingImpl) _then)
: super(_value, _then);
__$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value, $Res Function(_$FeedStateLoadingImpl) _then) : super(_value, _then);
/// Create a copy of FeedState
/// with the given fields replaced by the non-null parameter values.
@@ -244,8 +225,7 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$FeedStateLoadingImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$FeedStateLoadingImpl);
}
@override
@@ -256,9 +236,7 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
loaded,
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
required TResult Function(String errorMessage) error,
}) {
return loading();
@@ -269,8 +247,7 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
loaded,
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return loading?.call();
@@ -281,8 +258,7 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
loaded,
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -336,20 +312,15 @@ abstract class FeedStateLoading implements FeedState {
/// @nodoc
abstract class _$$FeedStateLoadedImplCopyWith<$Res> {
factory _$$FeedStateLoadedImplCopyWith(_$FeedStateLoadedImpl value,
$Res Function(_$FeedStateLoadedImpl) then) =
__$$FeedStateLoadedImplCopyWithImpl<$Res>;
factory _$$FeedStateLoadedImplCopyWith(_$FeedStateLoadedImpl value, $Res Function(_$FeedStateLoadedImpl) then) = __$$FeedStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call({List<FeedBlogPostModel> feedBlogPostList, bool isLoading});
}
/// @nodoc
class __$$FeedStateLoadedImplCopyWithImpl<$Res>
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadedImpl>
implements _$$FeedStateLoadedImplCopyWith<$Res> {
__$$FeedStateLoadedImplCopyWithImpl(
_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then)
: super(_value, _then);
class __$$FeedStateLoadedImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadedImpl> implements _$$FeedStateLoadedImplCopyWith<$Res> {
__$$FeedStateLoadedImplCopyWithImpl(_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then) : super(_value, _then);
/// Create a copy of FeedState
/// with the given fields replaced by the non-null parameter values.
@@ -375,16 +346,13 @@ class __$$FeedStateLoadedImplCopyWithImpl<$Res>
/// @nodoc
class _$FeedStateLoadedImpl implements FeedStateLoaded {
const _$FeedStateLoadedImpl(
{required final List<FeedBlogPostModel> feedBlogPostList,
required this.isLoading})
: _feedBlogPostList = feedBlogPostList;
const _$FeedStateLoadedImpl({required final List<FeedBlogPostModel> feedBlogPostList, required this.isLoading}) : _feedBlogPostList = feedBlogPostList;
final List<FeedBlogPostModel> _feedBlogPostList;
@override
List<FeedBlogPostModel> get feedBlogPostList {
if (_feedBlogPostList is EqualUnmodifiableListView)
return _feedBlogPostList;
if (_feedBlogPostList is EqualUnmodifiableListView) return _feedBlogPostList;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_feedBlogPostList);
}
@@ -402,33 +370,26 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FeedStateLoadedImpl &&
const DeepCollectionEquality()
.equals(other._feedBlogPostList, _feedBlogPostList) &&
(identical(other.isLoading, isLoading) ||
other.isLoading == isLoading));
const DeepCollectionEquality().equals(other._feedBlogPostList, _feedBlogPostList) &&
(identical(other.isLoading, isLoading) || other.isLoading == isLoading));
}
@override
int get hashCode => Object.hash(runtimeType,
const DeepCollectionEquality().hash(_feedBlogPostList), isLoading);
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_feedBlogPostList), isLoading);
/// Create a copy of FeedState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
__$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(
this, _$identity);
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith => __$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
loaded,
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
required TResult Function(String errorMessage) error,
}) {
return loaded(feedBlogPostList, isLoading);
@@ -439,8 +400,7 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
loaded,
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return loaded?.call(feedBlogPostList, isLoading);
@@ -451,8 +411,7 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
loaded,
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -501,36 +460,29 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
}
abstract class FeedStateLoaded implements FeedState {
const factory FeedStateLoaded(
{required final List<FeedBlogPostModel> feedBlogPostList,
required final bool isLoading}) = _$FeedStateLoadedImpl;
const factory FeedStateLoaded({required final List<FeedBlogPostModel> feedBlogPostList, required final bool isLoading}) = _$FeedStateLoadedImpl;
List<FeedBlogPostModel> get feedBlogPostList;
bool get isLoading;
/// Create a copy of FeedState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$FeedStateErrorImplCopyWith<$Res> {
factory _$$FeedStateErrorImplCopyWith(_$FeedStateErrorImpl value,
$Res Function(_$FeedStateErrorImpl) then) =
__$$FeedStateErrorImplCopyWithImpl<$Res>;
factory _$$FeedStateErrorImplCopyWith(_$FeedStateErrorImpl value, $Res Function(_$FeedStateErrorImpl) then) = __$$FeedStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$FeedStateErrorImplCopyWithImpl<$Res>
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateErrorImpl>
implements _$$FeedStateErrorImplCopyWith<$Res> {
__$$FeedStateErrorImplCopyWithImpl(
_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then)
: super(_value, _then);
class __$$FeedStateErrorImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateErrorImpl> implements _$$FeedStateErrorImplCopyWith<$Res> {
__$$FeedStateErrorImplCopyWithImpl(_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then) : super(_value, _then);
/// Create a copy of FeedState
/// with the given fields replaced by the non-null parameter values.
@@ -566,8 +518,7 @@ class _$FeedStateErrorImpl implements FeedStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FeedStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -578,18 +529,14 @@ class _$FeedStateErrorImpl implements FeedStateError {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
__$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(
this, _$identity);
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => __$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
loaded,
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
required TResult Function(String errorMessage) error,
}) {
return error(errorMessage);
@@ -600,8 +547,7 @@ class _$FeedStateErrorImpl implements FeedStateError {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
loaded,
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return error?.call(errorMessage);
@@ -612,8 +558,7 @@ class _$FeedStateErrorImpl implements FeedStateError {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
loaded,
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -662,14 +607,12 @@ class _$FeedStateErrorImpl implements FeedStateError {
}
abstract class FeedStateError implements FeedState {
const factory FeedStateError({required final String errorMessage}) =
_$FeedStateErrorImpl;
const factory FeedStateError({required final String errorMessage}) = _$FeedStateErrorImpl;
String get errorMessage;
/// Create a copy of FeedState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -20,23 +20,16 @@ mixin _$RecipesState {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
List<Recipes> recipesList,
List<RecipeTag> recipesTags,
Set<int> selectedTags,
int selectedTagsCounter,
bool isLoading)
loaded,
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
TResult? Function(String errorMessage)? error,
}) =>
throw _privateConstructorUsedError;
@@ -44,9 +37,7 @@ mixin _$RecipesState {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) =>
@@ -80,18 +71,16 @@ mixin _$RecipesState {
/// @nodoc
abstract class $RecipesStateCopyWith<$Res> {
factory $RecipesStateCopyWith(
RecipesState value, $Res Function(RecipesState) then) =
_$RecipesStateCopyWithImpl<$Res, RecipesState>;
factory $RecipesStateCopyWith(RecipesState value, $Res Function(RecipesState) then) = _$RecipesStateCopyWithImpl<$Res, RecipesState>;
}
/// @nodoc
class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState>
implements $RecipesStateCopyWith<$Res> {
class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState> implements $RecipesStateCopyWith<$Res> {
_$RecipesStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -101,18 +90,12 @@ class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState>
/// @nodoc
abstract class _$$RecipesStateImplCopyWith<$Res> {
factory _$$RecipesStateImplCopyWith(
_$RecipesStateImpl value, $Res Function(_$RecipesStateImpl) then) =
__$$RecipesStateImplCopyWithImpl<$Res>;
factory _$$RecipesStateImplCopyWith(_$RecipesStateImpl value, $Res Function(_$RecipesStateImpl) then) = __$$RecipesStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$RecipesStateImplCopyWithImpl<$Res>
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateImpl>
implements _$$RecipesStateImplCopyWith<$Res> {
__$$RecipesStateImplCopyWithImpl(
_$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then)
: super(_value, _then);
class __$$RecipesStateImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateImpl> implements _$$RecipesStateImplCopyWith<$Res> {
__$$RecipesStateImplCopyWithImpl(_$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then) : super(_value, _then);
/// Create a copy of RecipesState
/// with the given fields replaced by the non-null parameter values.
@@ -130,8 +113,7 @@ class _$RecipesStateImpl implements _RecipesState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$RecipesStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipesStateImpl);
}
@override
@@ -142,13 +124,7 @@ class _$RecipesStateImpl implements _RecipesState {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
List<Recipes> recipesList,
List<RecipeTag> recipesTags,
Set<int> selectedTags,
int selectedTagsCounter,
bool isLoading)
loaded,
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
required TResult Function(String errorMessage) error,
}) {
return $default();
@@ -159,9 +135,7 @@ class _$RecipesStateImpl implements _RecipesState {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return $default?.call();
@@ -172,9 +146,7 @@ class _$RecipesStateImpl implements _RecipesState {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -228,18 +200,14 @@ abstract class _RecipesState implements RecipesState {
/// @nodoc
abstract class _$$RecipesStateLoadingImplCopyWith<$Res> {
factory _$$RecipesStateLoadingImplCopyWith(_$RecipesStateLoadingImpl value,
$Res Function(_$RecipesStateLoadingImpl) then) =
factory _$$RecipesStateLoadingImplCopyWith(_$RecipesStateLoadingImpl value, $Res Function(_$RecipesStateLoadingImpl) then) =
__$$RecipesStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$RecipesStateLoadingImplCopyWithImpl<$Res>
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadingImpl>
class __$$RecipesStateLoadingImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadingImpl>
implements _$$RecipesStateLoadingImplCopyWith<$Res> {
__$$RecipesStateLoadingImplCopyWithImpl(_$RecipesStateLoadingImpl _value,
$Res Function(_$RecipesStateLoadingImpl) _then)
: super(_value, _then);
__$$RecipesStateLoadingImplCopyWithImpl(_$RecipesStateLoadingImpl _value, $Res Function(_$RecipesStateLoadingImpl) _then) : super(_value, _then);
/// Create a copy of RecipesState
/// with the given fields replaced by the non-null parameter values.
@@ -257,9 +225,7 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$RecipesStateLoadingImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipesStateLoadingImpl);
}
@override
@@ -270,13 +236,7 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
List<Recipes> recipesList,
List<RecipeTag> recipesTags,
Set<int> selectedTags,
int selectedTagsCounter,
bool isLoading)
loaded,
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
required TResult Function(String errorMessage) error,
}) {
return loading();
@@ -287,9 +247,7 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return loading?.call();
@@ -300,9 +258,7 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -356,25 +312,17 @@ abstract class RecipesStateLoading implements RecipesState {
/// @nodoc
abstract class _$$RecipesStateLoadedImplCopyWith<$Res> {
factory _$$RecipesStateLoadedImplCopyWith(_$RecipesStateLoadedImpl value,
$Res Function(_$RecipesStateLoadedImpl) then) =
factory _$$RecipesStateLoadedImplCopyWith(_$RecipesStateLoadedImpl value, $Res Function(_$RecipesStateLoadedImpl) then) =
__$$RecipesStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call(
{List<Recipes> recipesList,
List<RecipeTag> recipesTags,
Set<int> selectedTags,
int selectedTagsCounter,
bool isLoading});
$Res call({List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading});
}
/// @nodoc
class __$$RecipesStateLoadedImplCopyWithImpl<$Res>
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadedImpl>
class __$$RecipesStateLoadedImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadedImpl>
implements _$$RecipesStateLoadedImplCopyWith<$Res> {
__$$RecipesStateLoadedImplCopyWithImpl(_$RecipesStateLoadedImpl _value,
$Res Function(_$RecipesStateLoadedImpl) _then)
: super(_value, _then);
__$$RecipesStateLoadedImplCopyWithImpl(_$RecipesStateLoadedImpl _value, $Res Function(_$RecipesStateLoadedImpl) _then) : super(_value, _then);
/// Create a copy of RecipesState
/// with the given fields replaced by the non-null parameter values.
@@ -426,6 +374,7 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
_selectedTags = selectedTags;
final List<Recipes> _recipesList;
@override
List<Recipes> get recipesList {
if (_recipesList is EqualUnmodifiableListView) return _recipesList;
@@ -434,6 +383,7 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
}
final List<RecipeTag> _recipesTags;
@override
List<RecipeTag> get recipesTags {
if (_recipesTags is EqualUnmodifiableListView) return _recipesTags;
@@ -442,6 +392,7 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
}
final Set<int> _selectedTags;
@override
Set<int> get selectedTags {
if (_selectedTags is EqualUnmodifiableSetView) return _selectedTags;
@@ -464,26 +415,16 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$RecipesStateLoadedImpl &&
const DeepCollectionEquality()
.equals(other._recipesList, _recipesList) &&
const DeepCollectionEquality()
.equals(other._recipesTags, _recipesTags) &&
const DeepCollectionEquality()
.equals(other._selectedTags, _selectedTags) &&
(identical(other.selectedTagsCounter, selectedTagsCounter) ||
other.selectedTagsCounter == selectedTagsCounter) &&
(identical(other.isLoading, isLoading) ||
other.isLoading == isLoading));
const DeepCollectionEquality().equals(other._recipesList, _recipesList) &&
const DeepCollectionEquality().equals(other._recipesTags, _recipesTags) &&
const DeepCollectionEquality().equals(other._selectedTags, _selectedTags) &&
(identical(other.selectedTagsCounter, selectedTagsCounter) || other.selectedTagsCounter == selectedTagsCounter) &&
(identical(other.isLoading, isLoading) || other.isLoading == isLoading));
}
@override
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(_recipesList),
const DeepCollectionEquality().hash(_recipesTags),
const DeepCollectionEquality().hash(_selectedTags),
selectedTagsCounter,
isLoading);
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_recipesList), const DeepCollectionEquality().hash(_recipesTags),
const DeepCollectionEquality().hash(_selectedTags), selectedTagsCounter, isLoading);
/// Create a copy of RecipesState
/// with the given fields replaced by the non-null parameter values.
@@ -491,25 +432,17 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
@override
@pragma('vm:prefer-inline')
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
__$$RecipesStateLoadedImplCopyWithImpl<_$RecipesStateLoadedImpl>(
this, _$identity);
__$$RecipesStateLoadedImplCopyWithImpl<_$RecipesStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
List<Recipes> recipesList,
List<RecipeTag> recipesTags,
Set<int> selectedTags,
int selectedTagsCounter,
bool isLoading)
loaded,
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
required TResult Function(String errorMessage) error,
}) {
return loaded(
recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
return loaded(recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
}
@override
@@ -517,13 +450,10 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return loaded?.call(
recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
return loaded?.call(recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
}
@override
@@ -531,15 +461,12 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
if (loaded != null) {
return loaded(recipesList, recipesTags, selectedTags, selectedTagsCounter,
isLoading);
return loaded(recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
}
return orElse();
}
@@ -591,34 +518,34 @@ abstract class RecipesStateLoaded implements RecipesState {
required final bool isLoading}) = _$RecipesStateLoadedImpl;
List<Recipes> get recipesList;
List<RecipeTag> get recipesTags;
Set<int> get selectedTags;
int get selectedTagsCounter;
bool get isLoading;
/// Create a copy of RecipesState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$RecipesStateErrorImplCopyWith<$Res> {
factory _$$RecipesStateErrorImplCopyWith(_$RecipesStateErrorImpl value,
$Res Function(_$RecipesStateErrorImpl) then) =
factory _$$RecipesStateErrorImplCopyWith(_$RecipesStateErrorImpl value, $Res Function(_$RecipesStateErrorImpl) then) =
__$$RecipesStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$RecipesStateErrorImplCopyWithImpl<$Res>
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateErrorImpl>
class __$$RecipesStateErrorImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateErrorImpl>
implements _$$RecipesStateErrorImplCopyWith<$Res> {
__$$RecipesStateErrorImplCopyWithImpl(_$RecipesStateErrorImpl _value,
$Res Function(_$RecipesStateErrorImpl) _then)
: super(_value, _then);
__$$RecipesStateErrorImplCopyWithImpl(_$RecipesStateErrorImpl _value, $Res Function(_$RecipesStateErrorImpl) _then) : super(_value, _then);
/// Create a copy of RecipesState
/// with the given fields replaced by the non-null parameter values.
@@ -654,8 +581,7 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$RecipesStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -666,22 +592,14 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
__$$RecipesStateErrorImplCopyWithImpl<_$RecipesStateErrorImpl>(
this, _$identity);
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith => __$$RecipesStateErrorImplCopyWithImpl<_$RecipesStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
List<Recipes> recipesList,
List<RecipeTag> recipesTags,
Set<int> selectedTags,
int selectedTagsCounter,
bool isLoading)
loaded,
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
required TResult Function(String errorMessage) error,
}) {
return error(errorMessage);
@@ -692,9 +610,7 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return error?.call(errorMessage);
@@ -705,9 +621,7 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
loaded,
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -756,14 +670,12 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
}
abstract class RecipesStateError implements RecipesState {
const factory RecipesStateError({required final String errorMessage}) =
_$RecipesStateErrorImpl;
const factory RecipesStateError({required final String errorMessage}) = _$RecipesStateErrorImpl;
String get errorMessage;
/// Create a copy of RecipesState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -1,6 +1,5 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:eatvio_app/core/const.dart';
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';

View File

@@ -1,6 +1,5 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:eatvio_app/core/const.dart';
import 'package:eatvio_app/features/feed/models/recipes_model.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';

View File

@@ -17,11 +17,7 @@ class FeedRepository {
}
}
Future<List<Recipes>> getRecipes({
String? query,
List<int>? tags,
int page = 1
}) async {
Future<List<Recipes>> getRecipes({String? query, List<int>? tags, int page = 1}) async {
try {
return (await feedService.getRecipes(
query: query,

View File

@@ -398,9 +398,7 @@ class _FeedService implements FeedService {
}
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 {

View File

@@ -1,6 +1,5 @@
import 'package:dio/dio.dart';
import 'package:eatvio_app/core/const.dart';
import 'package:eatvio_app/core/token_storage.dart';
import 'package:eatvio_app/core/utils/image_constant.dart';
import 'package:eatvio_app/locator_service.dart';

View File

@@ -1,9 +1,8 @@
import 'package:eatvio_app/core/models/base_models.dart';
import 'package:eatvio_app/core/models/pagination_model.dart';
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'plan_pagination_model.freezed.dart';
part 'plan_pagination_model.g.dart';
@freezed

View File

@@ -22,8 +22,10 @@ PlanPaginationModel _$PlanPaginationModelFromJson(Map<String, dynamic> json) {
mixin _$PlanPaginationModel {
@JsonKey(name: "data")
List<PlanModel> get data => throw _privateConstructorUsedError;
@JsonKey(name: "links")
Links get links => throw _privateConstructorUsedError;
@JsonKey(name: "meta")
Meta get meta => throw _privateConstructorUsedError;
@@ -33,32 +35,29 @@ mixin _$PlanPaginationModel {
/// Create a copy of PlanPaginationModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PlanPaginationModelCopyWith<PlanPaginationModel> get copyWith =>
throw _privateConstructorUsedError;
$PlanPaginationModelCopyWith<PlanPaginationModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PlanPaginationModelCopyWith<$Res> {
factory $PlanPaginationModelCopyWith(
PlanPaginationModel value, $Res Function(PlanPaginationModel) then) =
factory $PlanPaginationModelCopyWith(PlanPaginationModel value, $Res Function(PlanPaginationModel) then) =
_$PlanPaginationModelCopyWithImpl<$Res, PlanPaginationModel>;
@useResult
$Res call(
{@JsonKey(name: "data") List<PlanModel> data,
@JsonKey(name: "links") Links links,
@JsonKey(name: "meta") Meta meta});
$Res call({@JsonKey(name: "data") List<PlanModel> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
$LinksCopyWith<$Res> get links;
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class _$PlanPaginationModelCopyWithImpl<$Res, $Val extends PlanPaginationModel>
implements $PlanPaginationModelCopyWith<$Res> {
class _$PlanPaginationModelCopyWithImpl<$Res, $Val extends PlanPaginationModel> implements $PlanPaginationModelCopyWith<$Res> {
_$PlanPaginationModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -109,31 +108,25 @@ class _$PlanPaginationModelCopyWithImpl<$Res, $Val extends PlanPaginationModel>
}
/// @nodoc
abstract class _$$PlanPaginationModelImplCopyWith<$Res>
implements $PlanPaginationModelCopyWith<$Res> {
factory _$$PlanPaginationModelImplCopyWith(_$PlanPaginationModelImpl value,
$Res Function(_$PlanPaginationModelImpl) then) =
abstract class _$$PlanPaginationModelImplCopyWith<$Res> implements $PlanPaginationModelCopyWith<$Res> {
factory _$$PlanPaginationModelImplCopyWith(_$PlanPaginationModelImpl value, $Res Function(_$PlanPaginationModelImpl) then) =
__$$PlanPaginationModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: "data") List<PlanModel> data,
@JsonKey(name: "links") Links links,
@JsonKey(name: "meta") Meta meta});
$Res call({@JsonKey(name: "data") List<PlanModel> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
@override
$LinksCopyWith<$Res> get links;
@override
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class __$$PlanPaginationModelImplCopyWithImpl<$Res>
extends _$PlanPaginationModelCopyWithImpl<$Res, _$PlanPaginationModelImpl>
class __$$PlanPaginationModelImplCopyWithImpl<$Res> extends _$PlanPaginationModelCopyWithImpl<$Res, _$PlanPaginationModelImpl>
implements _$$PlanPaginationModelImplCopyWith<$Res> {
__$$PlanPaginationModelImplCopyWithImpl(_$PlanPaginationModelImpl _value,
$Res Function(_$PlanPaginationModelImpl) _then)
: super(_value, _then);
__$$PlanPaginationModelImplCopyWithImpl(_$PlanPaginationModelImpl _value, $Res Function(_$PlanPaginationModelImpl) _then) : super(_value, _then);
/// Create a copy of PlanPaginationModel
/// with the given fields replaced by the non-null parameter values.
@@ -165,15 +158,13 @@ class __$$PlanPaginationModelImplCopyWithImpl<$Res>
@JsonSerializable()
class _$PlanPaginationModelImpl implements _PlanPaginationModel {
const _$PlanPaginationModelImpl(
{@JsonKey(name: "data") required final List<PlanModel> data,
@JsonKey(name: "links") required this.links,
@JsonKey(name: "meta") required this.meta})
{@JsonKey(name: "data") required final List<PlanModel> data, @JsonKey(name: "links") required this.links, @JsonKey(name: "meta") required this.meta})
: _data = data;
factory _$PlanPaginationModelImpl.fromJson(Map<String, dynamic> json) =>
_$$PlanPaginationModelImplFromJson(json);
factory _$PlanPaginationModelImpl.fromJson(Map<String, dynamic> json) => _$$PlanPaginationModelImplFromJson(json);
final List<PlanModel> _data;
@override
@JsonKey(name: "data")
List<PlanModel> get data {
@@ -206,8 +197,7 @@ class _$PlanPaginationModelImpl implements _PlanPaginationModel {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
/// Create a copy of PlanPaginationModel
/// with the given fields replaced by the non-null parameter values.
@@ -215,8 +205,7 @@ class _$PlanPaginationModelImpl implements _PlanPaginationModel {
@override
@pragma('vm:prefer-inline')
_$$PlanPaginationModelImplCopyWith<_$PlanPaginationModelImpl> get copyWith =>
__$$PlanPaginationModelImplCopyWithImpl<_$PlanPaginationModelImpl>(
this, _$identity);
__$$PlanPaginationModelImplCopyWithImpl<_$PlanPaginationModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -228,20 +217,20 @@ class _$PlanPaginationModelImpl implements _PlanPaginationModel {
abstract class _PlanPaginationModel implements PlanPaginationModel {
const factory _PlanPaginationModel(
{@JsonKey(name: "data") required final List<PlanModel> data,
@JsonKey(name: "links") required final Links links,
@JsonKey(name: "meta") required final Meta meta}) =
_$PlanPaginationModelImpl;
{@JsonKey(name: "data") required final List<PlanModel> data,
@JsonKey(name: "links") required final Links links,
@JsonKey(name: "meta") required final Meta meta}) = _$PlanPaginationModelImpl;
factory _PlanPaginationModel.fromJson(Map<String, dynamic> json) =
_$PlanPaginationModelImpl.fromJson;
factory _PlanPaginationModel.fromJson(Map<String, dynamic> json) = _$PlanPaginationModelImpl.fromJson;
@override
@JsonKey(name: "data")
List<PlanModel> get data;
@override
@JsonKey(name: "links")
Links get links;
@override
@JsonKey(name: "meta")
Meta get meta;
@@ -250,8 +239,7 @@ abstract class _PlanPaginationModel implements PlanPaginationModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PlanPaginationModelImplCopyWith<_$PlanPaginationModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$PlanPaginationModelImplCopyWith<_$PlanPaginationModelImpl> get copyWith => throw _privateConstructorUsedError;
}
PlanModel _$PlanModelFromJson(Map<String, dynamic> json) {
@@ -262,32 +250,46 @@ PlanModel _$PlanModelFromJson(Map<String, dynamic> json) {
mixin _$PlanModel {
@JsonKey(name: "id")
int get id => throw _privateConstructorUsedError;
@JsonKey(name: "name")
String get name => throw _privateConstructorUsedError;
@JsonKey(name: "image")
String get image => throw _privateConstructorUsedError;
@JsonKey(name: "duration")
int get duration => throw _privateConstructorUsedError;
@JsonKey(name: "state")
String get state => throw _privateConstructorUsedError;
@JsonKey(name: "type")
PlanType get type => throw _privateConstructorUsedError;
@JsonKey(name: "details")
String get details => throw _privateConstructorUsedError;
@JsonKey(name: "packets_count")
int get packetsCount => throw _privateConstructorUsedError;
@JsonKey(name: "packet1_options")
dynamic get packet1Options => throw _privateConstructorUsedError;
@JsonKey(name: "packet2_options")
dynamic get packet2Options => throw _privateConstructorUsedError;
@JsonKey(name: "packet3_options")
dynamic get packet3Options => throw _privateConstructorUsedError;
@JsonKey(name: "author")
Author get author => throw _privateConstructorUsedError;
@JsonKey(name: "total_likes")
int get totalLikes => throw _privateConstructorUsedError;
@JsonKey(name: "total_views")
int get totalViews => throw _privateConstructorUsedError;
@JsonKey(name: "total_comments")
int get totalComments => throw _privateConstructorUsedError;
@@ -297,14 +299,13 @@ mixin _$PlanModel {
/// Create a copy of PlanModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PlanModelCopyWith<PlanModel> get copyWith =>
throw _privateConstructorUsedError;
$PlanModelCopyWith<PlanModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PlanModelCopyWith<$Res> {
factory $PlanModelCopyWith(PlanModel value, $Res Function(PlanModel) then) =
_$PlanModelCopyWithImpl<$Res, PlanModel>;
factory $PlanModelCopyWith(PlanModel value, $Res Function(PlanModel) then) = _$PlanModelCopyWithImpl<$Res, PlanModel>;
@useResult
$Res call(
{@JsonKey(name: "id") int id,
@@ -324,16 +325,17 @@ abstract class $PlanModelCopyWith<$Res> {
@JsonKey(name: "total_comments") int totalComments});
$PlanTypeCopyWith<$Res> get type;
$AuthorCopyWith<$Res> get author;
}
/// @nodoc
class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel>
implements $PlanModelCopyWith<$Res> {
class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel> implements $PlanModelCopyWith<$Res> {
_$PlanModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -444,11 +446,9 @@ class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel>
}
/// @nodoc
abstract class _$$PlanModelImplCopyWith<$Res>
implements $PlanModelCopyWith<$Res> {
factory _$$PlanModelImplCopyWith(
_$PlanModelImpl value, $Res Function(_$PlanModelImpl) then) =
__$$PlanModelImplCopyWithImpl<$Res>;
abstract class _$$PlanModelImplCopyWith<$Res> implements $PlanModelCopyWith<$Res> {
factory _$$PlanModelImplCopyWith(_$PlanModelImpl value, $Res Function(_$PlanModelImpl) then) = __$$PlanModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -470,17 +470,14 @@ abstract class _$$PlanModelImplCopyWith<$Res>
@override
$PlanTypeCopyWith<$Res> get type;
@override
$AuthorCopyWith<$Res> get author;
}
/// @nodoc
class __$$PlanModelImplCopyWithImpl<$Res>
extends _$PlanModelCopyWithImpl<$Res, _$PlanModelImpl>
implements _$$PlanModelImplCopyWith<$Res> {
__$$PlanModelImplCopyWithImpl(
_$PlanModelImpl _value, $Res Function(_$PlanModelImpl) _then)
: super(_value, _then);
class __$$PlanModelImplCopyWithImpl<$Res> extends _$PlanModelCopyWithImpl<$Res, _$PlanModelImpl> implements _$$PlanModelImplCopyWith<$Res> {
__$$PlanModelImplCopyWithImpl(_$PlanModelImpl _value, $Res Function(_$PlanModelImpl) _then) : super(_value, _then);
/// Create a copy of PlanModel
/// with the given fields replaced by the non-null parameter values.
@@ -588,8 +585,7 @@ class _$PlanModelImpl implements _PlanModel {
@JsonKey(name: "total_views") required this.totalViews,
@JsonKey(name: "total_comments") required this.totalComments});
factory _$PlanModelImpl.fromJson(Map<String, dynamic> json) =>
_$$PlanModelImplFromJson(json);
factory _$PlanModelImpl.fromJson(Map<String, dynamic> json) => _$$PlanModelImplFromJson(json);
@override
@JsonKey(name: "id")
@@ -650,26 +646,18 @@ class _$PlanModelImpl implements _PlanModel {
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.image, image) || other.image == image) &&
(identical(other.duration, duration) ||
other.duration == duration) &&
(identical(other.duration, duration) || other.duration == duration) &&
(identical(other.state, state) || other.state == state) &&
(identical(other.type, type) || other.type == type) &&
(identical(other.details, details) || other.details == details) &&
(identical(other.packetsCount, packetsCount) ||
other.packetsCount == packetsCount) &&
const DeepCollectionEquality()
.equals(other.packet1Options, packet1Options) &&
const DeepCollectionEquality()
.equals(other.packet2Options, packet2Options) &&
const DeepCollectionEquality()
.equals(other.packet3Options, packet3Options) &&
(identical(other.packetsCount, packetsCount) || other.packetsCount == packetsCount) &&
const DeepCollectionEquality().equals(other.packet1Options, packet1Options) &&
const DeepCollectionEquality().equals(other.packet2Options, packet2Options) &&
const DeepCollectionEquality().equals(other.packet3Options, packet3Options) &&
(identical(other.author, author) || other.author == author) &&
(identical(other.totalLikes, totalLikes) ||
other.totalLikes == totalLikes) &&
(identical(other.totalViews, totalViews) ||
other.totalViews == totalViews) &&
(identical(other.totalComments, totalComments) ||
other.totalComments == totalComments));
(identical(other.totalLikes, totalLikes) || other.totalLikes == totalLikes) &&
(identical(other.totalViews, totalViews) || other.totalViews == totalViews) &&
(identical(other.totalComments, totalComments) || other.totalComments == totalComments));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -697,8 +685,7 @@ class _$PlanModelImpl implements _PlanModel {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PlanModelImplCopyWith<_$PlanModelImpl> get copyWith =>
__$$PlanModelImplCopyWithImpl<_$PlanModelImpl>(this, _$identity);
_$$PlanModelImplCopyWith<_$PlanModelImpl> get copyWith => __$$PlanModelImplCopyWithImpl<_$PlanModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -710,68 +697,80 @@ class _$PlanModelImpl implements _PlanModel {
abstract class _PlanModel implements PlanModel {
const factory _PlanModel(
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "name") required final String name,
@JsonKey(name: "image") required final String image,
@JsonKey(name: "duration") required final int duration,
@JsonKey(name: "state") required final String state,
@JsonKey(name: "type") required final PlanType type,
@JsonKey(name: "details") required final String details,
@JsonKey(name: "packets_count") required final int packetsCount,
@JsonKey(name: "packet1_options") final dynamic packet1Options,
@JsonKey(name: "packet2_options") final dynamic packet2Options,
@JsonKey(name: "packet3_options") final dynamic packet3Options,
@JsonKey(name: "author") required final Author author,
@JsonKey(name: "total_likes") required final int totalLikes,
@JsonKey(name: "total_views") required final int totalViews,
@JsonKey(name: "total_comments") required final int totalComments}) =
_$PlanModelImpl;
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "name") required final String name,
@JsonKey(name: "image") required final String image,
@JsonKey(name: "duration") required final int duration,
@JsonKey(name: "state") required final String state,
@JsonKey(name: "type") required final PlanType type,
@JsonKey(name: "details") required final String details,
@JsonKey(name: "packets_count") required final int packetsCount,
@JsonKey(name: "packet1_options") final dynamic packet1Options,
@JsonKey(name: "packet2_options") final dynamic packet2Options,
@JsonKey(name: "packet3_options") final dynamic packet3Options,
@JsonKey(name: "author") required final Author author,
@JsonKey(name: "total_likes") required final int totalLikes,
@JsonKey(name: "total_views") required final int totalViews,
@JsonKey(name: "total_comments") required final int totalComments}) = _$PlanModelImpl;
factory _PlanModel.fromJson(Map<String, dynamic> json) =
_$PlanModelImpl.fromJson;
factory _PlanModel.fromJson(Map<String, dynamic> json) = _$PlanModelImpl.fromJson;
@override
@JsonKey(name: "id")
int get id;
@override
@JsonKey(name: "name")
String get name;
@override
@JsonKey(name: "image")
String get image;
@override
@JsonKey(name: "duration")
int get duration;
@override
@JsonKey(name: "state")
String get state;
@override
@JsonKey(name: "type")
PlanType get type;
@override
@JsonKey(name: "details")
String get details;
@override
@JsonKey(name: "packets_count")
int get packetsCount;
@override
@JsonKey(name: "packet1_options")
dynamic get packet1Options;
@override
@JsonKey(name: "packet2_options")
dynamic get packet2Options;
@override
@JsonKey(name: "packet3_options")
dynamic get packet3Options;
@override
@JsonKey(name: "author")
Author get author;
@override
@JsonKey(name: "total_likes")
int get totalLikes;
@override
@JsonKey(name: "total_views")
int get totalViews;
@override
@JsonKey(name: "total_comments")
int get totalComments;
@@ -780,8 +779,7 @@ abstract class _PlanModel implements PlanModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PlanModelImplCopyWith<_$PlanModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$PlanModelImplCopyWith<_$PlanModelImpl> get copyWith => throw _privateConstructorUsedError;
}
PacketOptions _$PacketOptionsFromJson(Map<String, dynamic> json) {
@@ -792,10 +790,13 @@ PacketOptions _$PacketOptionsFromJson(Map<String, dynamic> json) {
mixin _$PacketOptions {
@JsonKey(name: "items")
List<String> get items => throw _privateConstructorUsedError;
@JsonKey(name: "price")
dynamic get price => throw _privateConstructorUsedError;
@JsonKey(name: "short")
String get short => throw _privateConstructorUsedError;
@JsonKey(name: "description")
String get description => throw _privateConstructorUsedError;
@@ -805,15 +806,13 @@ mixin _$PacketOptions {
/// Create a copy of PacketOptions
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PacketOptionsCopyWith<PacketOptions> get copyWith =>
throw _privateConstructorUsedError;
$PacketOptionsCopyWith<PacketOptions> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PacketOptionsCopyWith<$Res> {
factory $PacketOptionsCopyWith(
PacketOptions value, $Res Function(PacketOptions) then) =
_$PacketOptionsCopyWithImpl<$Res, PacketOptions>;
factory $PacketOptionsCopyWith(PacketOptions value, $Res Function(PacketOptions) then) = _$PacketOptionsCopyWithImpl<$Res, PacketOptions>;
@useResult
$Res call(
{@JsonKey(name: "items") List<String> items,
@@ -823,12 +822,12 @@ abstract class $PacketOptionsCopyWith<$Res> {
}
/// @nodoc
class _$PacketOptionsCopyWithImpl<$Res, $Val extends PacketOptions>
implements $PacketOptionsCopyWith<$Res> {
class _$PacketOptionsCopyWithImpl<$Res, $Val extends PacketOptions> implements $PacketOptionsCopyWith<$Res> {
_$PacketOptionsCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -864,11 +863,9 @@ class _$PacketOptionsCopyWithImpl<$Res, $Val extends PacketOptions>
}
/// @nodoc
abstract class _$$PacketOptionsImplCopyWith<$Res>
implements $PacketOptionsCopyWith<$Res> {
factory _$$PacketOptionsImplCopyWith(
_$PacketOptionsImpl value, $Res Function(_$PacketOptionsImpl) then) =
__$$PacketOptionsImplCopyWithImpl<$Res>;
abstract class _$$PacketOptionsImplCopyWith<$Res> implements $PacketOptionsCopyWith<$Res> {
factory _$$PacketOptionsImplCopyWith(_$PacketOptionsImpl value, $Res Function(_$PacketOptionsImpl) then) = __$$PacketOptionsImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -879,12 +876,8 @@ abstract class _$$PacketOptionsImplCopyWith<$Res>
}
/// @nodoc
class __$$PacketOptionsImplCopyWithImpl<$Res>
extends _$PacketOptionsCopyWithImpl<$Res, _$PacketOptionsImpl>
implements _$$PacketOptionsImplCopyWith<$Res> {
__$$PacketOptionsImplCopyWithImpl(
_$PacketOptionsImpl _value, $Res Function(_$PacketOptionsImpl) _then)
: super(_value, _then);
class __$$PacketOptionsImplCopyWithImpl<$Res> extends _$PacketOptionsCopyWithImpl<$Res, _$PacketOptionsImpl> implements _$$PacketOptionsImplCopyWith<$Res> {
__$$PacketOptionsImplCopyWithImpl(_$PacketOptionsImpl _value, $Res Function(_$PacketOptionsImpl) _then) : super(_value, _then);
/// Create a copy of PacketOptions
/// with the given fields replaced by the non-null parameter values.
@@ -927,10 +920,10 @@ class _$PacketOptionsImpl implements _PacketOptions {
@JsonKey(name: "description") required this.description})
: _items = items;
factory _$PacketOptionsImpl.fromJson(Map<String, dynamic> json) =>
_$$PacketOptionsImplFromJson(json);
factory _$PacketOptionsImpl.fromJson(Map<String, dynamic> json) => _$$PacketOptionsImplFromJson(json);
final List<String> _items;
@override
@JsonKey(name: "items")
List<String> get items {
@@ -962,26 +955,19 @@ class _$PacketOptionsImpl implements _PacketOptions {
const DeepCollectionEquality().equals(other._items, _items) &&
const DeepCollectionEquality().equals(other.price, price) &&
(identical(other.short, short) || other.short == short) &&
(identical(other.description, description) ||
other.description == description));
(identical(other.description, description) || other.description == description));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(_items),
const DeepCollectionEquality().hash(price),
short,
description);
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_items), const DeepCollectionEquality().hash(price), short, description);
/// Create a copy of PacketOptions
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PacketOptionsImplCopyWith<_$PacketOptionsImpl> get copyWith =>
__$$PacketOptionsImplCopyWithImpl<_$PacketOptionsImpl>(this, _$identity);
_$$PacketOptionsImplCopyWith<_$PacketOptionsImpl> get copyWith => __$$PacketOptionsImplCopyWithImpl<_$PacketOptionsImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -993,24 +979,25 @@ class _$PacketOptionsImpl implements _PacketOptions {
abstract class _PacketOptions implements PacketOptions {
const factory _PacketOptions(
{@JsonKey(name: "items") required final List<String> items,
@JsonKey(name: "price") required final dynamic price,
@JsonKey(name: "short") required final String short,
@JsonKey(name: "description") required final String description}) =
_$PacketOptionsImpl;
{@JsonKey(name: "items") required final List<String> items,
@JsonKey(name: "price") required final dynamic price,
@JsonKey(name: "short") required final String short,
@JsonKey(name: "description") required final String description}) = _$PacketOptionsImpl;
factory _PacketOptions.fromJson(Map<String, dynamic> json) =
_$PacketOptionsImpl.fromJson;
factory _PacketOptions.fromJson(Map<String, dynamic> json) = _$PacketOptionsImpl.fromJson;
@override
@JsonKey(name: "items")
List<String> get items;
@override
@JsonKey(name: "price")
dynamic get price;
@override
@JsonKey(name: "short")
String get short;
@override
@JsonKey(name: "description")
String get description;
@@ -1019,8 +1006,7 @@ abstract class _PacketOptions implements PacketOptions {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PacketOptionsImplCopyWith<_$PacketOptionsImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$PacketOptionsImplCopyWith<_$PacketOptionsImpl> get copyWith => throw _privateConstructorUsedError;
}
PlanType _$PlanTypeFromJson(Map<String, dynamic> json) {
@@ -1031,10 +1017,13 @@ PlanType _$PlanTypeFromJson(Map<String, dynamic> json) {
mixin _$PlanType {
@JsonKey(name: "fit")
bool get fit => throw _privateConstructorUsedError;
@JsonKey(name: "slim")
bool get slim => throw _privateConstructorUsedError;
@JsonKey(name: "behavior")
bool get behavior => throw _privateConstructorUsedError;
@JsonKey(name: "wellness")
bool get wellness => throw _privateConstructorUsedError;
@@ -1044,29 +1033,25 @@ mixin _$PlanType {
/// Create a copy of PlanType
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PlanTypeCopyWith<PlanType> get copyWith =>
throw _privateConstructorUsedError;
$PlanTypeCopyWith<PlanType> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PlanTypeCopyWith<$Res> {
factory $PlanTypeCopyWith(PlanType value, $Res Function(PlanType) then) =
_$PlanTypeCopyWithImpl<$Res, PlanType>;
factory $PlanTypeCopyWith(PlanType value, $Res Function(PlanType) then) = _$PlanTypeCopyWithImpl<$Res, PlanType>;
@useResult
$Res call(
{@JsonKey(name: "fit") bool fit,
@JsonKey(name: "slim") bool slim,
@JsonKey(name: "behavior") bool behavior,
@JsonKey(name: "wellness") bool wellness});
{@JsonKey(name: "fit") bool fit, @JsonKey(name: "slim") bool slim, @JsonKey(name: "behavior") bool behavior, @JsonKey(name: "wellness") bool wellness});
}
/// @nodoc
class _$PlanTypeCopyWithImpl<$Res, $Val extends PlanType>
implements $PlanTypeCopyWith<$Res> {
class _$PlanTypeCopyWithImpl<$Res, $Val extends PlanType> implements $PlanTypeCopyWith<$Res> {
_$PlanTypeCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -1102,27 +1087,18 @@ class _$PlanTypeCopyWithImpl<$Res, $Val extends PlanType>
}
/// @nodoc
abstract class _$$PlanTypeImplCopyWith<$Res>
implements $PlanTypeCopyWith<$Res> {
factory _$$PlanTypeImplCopyWith(
_$PlanTypeImpl value, $Res Function(_$PlanTypeImpl) then) =
__$$PlanTypeImplCopyWithImpl<$Res>;
abstract class _$$PlanTypeImplCopyWith<$Res> implements $PlanTypeCopyWith<$Res> {
factory _$$PlanTypeImplCopyWith(_$PlanTypeImpl value, $Res Function(_$PlanTypeImpl) then) = __$$PlanTypeImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: "fit") bool fit,
@JsonKey(name: "slim") bool slim,
@JsonKey(name: "behavior") bool behavior,
@JsonKey(name: "wellness") bool wellness});
{@JsonKey(name: "fit") bool fit, @JsonKey(name: "slim") bool slim, @JsonKey(name: "behavior") bool behavior, @JsonKey(name: "wellness") bool wellness});
}
/// @nodoc
class __$$PlanTypeImplCopyWithImpl<$Res>
extends _$PlanTypeCopyWithImpl<$Res, _$PlanTypeImpl>
implements _$$PlanTypeImplCopyWith<$Res> {
__$$PlanTypeImplCopyWithImpl(
_$PlanTypeImpl _value, $Res Function(_$PlanTypeImpl) _then)
: super(_value, _then);
class __$$PlanTypeImplCopyWithImpl<$Res> extends _$PlanTypeCopyWithImpl<$Res, _$PlanTypeImpl> implements _$$PlanTypeImplCopyWith<$Res> {
__$$PlanTypeImplCopyWithImpl(_$PlanTypeImpl _value, $Res Function(_$PlanTypeImpl) _then) : super(_value, _then);
/// Create a copy of PlanType
/// with the given fields replaced by the non-null parameter values.
@@ -1164,8 +1140,7 @@ class _$PlanTypeImpl implements _PlanType {
@JsonKey(name: "behavior") required this.behavior,
@JsonKey(name: "wellness") required this.wellness});
factory _$PlanTypeImpl.fromJson(Map<String, dynamic> json) =>
_$$PlanTypeImplFromJson(json);
factory _$PlanTypeImpl.fromJson(Map<String, dynamic> json) => _$$PlanTypeImplFromJson(json);
@override
@JsonKey(name: "fit")
@@ -1192,10 +1167,8 @@ class _$PlanTypeImpl implements _PlanType {
other is _$PlanTypeImpl &&
(identical(other.fit, fit) || other.fit == fit) &&
(identical(other.slim, slim) || other.slim == slim) &&
(identical(other.behavior, behavior) ||
other.behavior == behavior) &&
(identical(other.wellness, wellness) ||
other.wellness == wellness));
(identical(other.behavior, behavior) || other.behavior == behavior) &&
(identical(other.wellness, wellness) || other.wellness == wellness));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -1207,8 +1180,7 @@ class _$PlanTypeImpl implements _PlanType {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PlanTypeImplCopyWith<_$PlanTypeImpl> get copyWith =>
__$$PlanTypeImplCopyWithImpl<_$PlanTypeImpl>(this, _$identity);
_$$PlanTypeImplCopyWith<_$PlanTypeImpl> get copyWith => __$$PlanTypeImplCopyWithImpl<_$PlanTypeImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -1220,24 +1192,25 @@ class _$PlanTypeImpl implements _PlanType {
abstract class _PlanType implements PlanType {
const factory _PlanType(
{@JsonKey(name: "fit") required final bool fit,
@JsonKey(name: "slim") required final bool slim,
@JsonKey(name: "behavior") required final bool behavior,
@JsonKey(name: "wellness") required final bool wellness}) =
_$PlanTypeImpl;
{@JsonKey(name: "fit") required final bool fit,
@JsonKey(name: "slim") required final bool slim,
@JsonKey(name: "behavior") required final bool behavior,
@JsonKey(name: "wellness") required final bool wellness}) = _$PlanTypeImpl;
factory _PlanType.fromJson(Map<String, dynamic> json) =
_$PlanTypeImpl.fromJson;
factory _PlanType.fromJson(Map<String, dynamic> json) = _$PlanTypeImpl.fromJson;
@override
@JsonKey(name: "fit")
bool get fit;
@override
@JsonKey(name: "slim")
bool get slim;
@override
@JsonKey(name: "behavior")
bool get behavior;
@override
@JsonKey(name: "wellness")
bool get wellness;
@@ -1246,6 +1219,5 @@ abstract class _PlanType implements PlanType {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PlanTypeImplCopyWith<_$PlanTypeImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$PlanTypeImplCopyWith<_$PlanTypeImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,26 +6,19 @@ part of 'plan_pagination_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$PlanPaginationModelImpl _$$PlanPaginationModelImplFromJson(
Map<String, dynamic> json) =>
_$PlanPaginationModelImpl(
data: (json['data'] as List<dynamic>)
.map((e) => PlanModel.fromJson(e as Map<String, dynamic>))
.toList(),
_$PlanPaginationModelImpl _$$PlanPaginationModelImplFromJson(Map<String, dynamic> json) => _$PlanPaginationModelImpl(
data: (json['data'] as List<dynamic>).map((e) => PlanModel.fromJson(e as Map<String, dynamic>)).toList(),
links: Links.fromJson(json['links'] as Map<String, dynamic>),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$PlanPaginationModelImplToJson(
_$PlanPaginationModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$PlanPaginationModelImplToJson(_$PlanPaginationModelImpl instance) => <String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
};
_$PlanModelImpl _$$PlanModelImplFromJson(Map<String, dynamic> json) =>
_$PlanModelImpl(
_$PlanModelImpl _$$PlanModelImplFromJson(Map<String, dynamic> json) => _$PlanModelImpl(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
image: json['image'] as String,
@@ -43,8 +36,7 @@ _$PlanModelImpl _$$PlanModelImplFromJson(Map<String, dynamic> json) =>
totalComments: (json['total_comments'] as num).toInt(),
);
Map<String, dynamic> _$$PlanModelImplToJson(_$PlanModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$PlanModelImplToJson(_$PlanModelImpl instance) => <String, dynamic>{
'id': instance.id,
'name': instance.name,
'image': instance.image,
@@ -62,32 +54,28 @@ Map<String, dynamic> _$$PlanModelImplToJson(_$PlanModelImpl instance) =>
'total_comments': instance.totalComments,
};
_$PacketOptionsImpl _$$PacketOptionsImplFromJson(Map<String, dynamic> json) =>
_$PacketOptionsImpl(
_$PacketOptionsImpl _$$PacketOptionsImplFromJson(Map<String, dynamic> json) => _$PacketOptionsImpl(
items: (json['items'] as List<dynamic>).map((e) => e as String).toList(),
price: json['price'],
short: json['short'] as String,
description: json['description'] as String,
);
Map<String, dynamic> _$$PacketOptionsImplToJson(_$PacketOptionsImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$PacketOptionsImplToJson(_$PacketOptionsImpl instance) => <String, dynamic>{
'items': instance.items,
'price': instance.price,
'short': instance.short,
'description': instance.description,
};
_$PlanTypeImpl _$$PlanTypeImplFromJson(Map<String, dynamic> json) =>
_$PlanTypeImpl(
_$PlanTypeImpl _$$PlanTypeImplFromJson(Map<String, dynamic> json) => _$PlanTypeImpl(
fit: json['fit'] as bool,
slim: json['slim'] as bool,
behavior: json['behavior'] as bool,
wellness: json['wellness'] as bool,
);
Map<String, dynamic> _$$PlanTypeImplToJson(_$PlanTypeImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$PlanTypeImplToJson(_$PlanTypeImpl instance) => <String, dynamic>{
'fit': instance.fit,
'slim': instance.slim,
'behavior': instance.behavior,

View File

@@ -24,6 +24,7 @@ mixin _$PlansState {
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -70,18 +71,16 @@ mixin _$PlansState {
/// @nodoc
abstract class $PlansStateCopyWith<$Res> {
factory $PlansStateCopyWith(
PlansState value, $Res Function(PlansState) then) =
_$PlansStateCopyWithImpl<$Res, PlansState>;
factory $PlansStateCopyWith(PlansState value, $Res Function(PlansState) then) = _$PlansStateCopyWithImpl<$Res, PlansState>;
}
/// @nodoc
class _$PlansStateCopyWithImpl<$Res, $Val extends PlansState>
implements $PlansStateCopyWith<$Res> {
class _$PlansStateCopyWithImpl<$Res, $Val extends PlansState> implements $PlansStateCopyWith<$Res> {
_$PlansStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -91,18 +90,12 @@ class _$PlansStateCopyWithImpl<$Res, $Val extends PlansState>
/// @nodoc
abstract class _$$PlansStateImplCopyWith<$Res> {
factory _$$PlansStateImplCopyWith(
_$PlansStateImpl value, $Res Function(_$PlansStateImpl) then) =
__$$PlansStateImplCopyWithImpl<$Res>;
factory _$$PlansStateImplCopyWith(_$PlansStateImpl value, $Res Function(_$PlansStateImpl) then) = __$$PlansStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$PlansStateImplCopyWithImpl<$Res>
extends _$PlansStateCopyWithImpl<$Res, _$PlansStateImpl>
implements _$$PlansStateImplCopyWith<$Res> {
__$$PlansStateImplCopyWithImpl(
_$PlansStateImpl _value, $Res Function(_$PlansStateImpl) _then)
: super(_value, _then);
class __$$PlansStateImplCopyWithImpl<$Res> extends _$PlansStateCopyWithImpl<$Res, _$PlansStateImpl> implements _$$PlansStateImplCopyWith<$Res> {
__$$PlansStateImplCopyWithImpl(_$PlansStateImpl _value, $Res Function(_$PlansStateImpl) _then) : super(_value, _then);
/// Create a copy of PlansState
/// with the given fields replaced by the non-null parameter values.
@@ -120,8 +113,7 @@ class _$PlansStateImpl implements _PlansState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$PlansStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlansStateImpl);
}
@override
@@ -208,18 +200,14 @@ abstract class _PlansState implements PlansState {
/// @nodoc
abstract class _$$PlansStateLoadingImplCopyWith<$Res> {
factory _$$PlansStateLoadingImplCopyWith(_$PlansStateLoadingImpl value,
$Res Function(_$PlansStateLoadingImpl) then) =
factory _$$PlansStateLoadingImplCopyWith(_$PlansStateLoadingImpl value, $Res Function(_$PlansStateLoadingImpl) then) =
__$$PlansStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$PlansStateLoadingImplCopyWithImpl<$Res>
extends _$PlansStateCopyWithImpl<$Res, _$PlansStateLoadingImpl>
class __$$PlansStateLoadingImplCopyWithImpl<$Res> extends _$PlansStateCopyWithImpl<$Res, _$PlansStateLoadingImpl>
implements _$$PlansStateLoadingImplCopyWith<$Res> {
__$$PlansStateLoadingImplCopyWithImpl(_$PlansStateLoadingImpl _value,
$Res Function(_$PlansStateLoadingImpl) _then)
: super(_value, _then);
__$$PlansStateLoadingImplCopyWithImpl(_$PlansStateLoadingImpl _value, $Res Function(_$PlansStateLoadingImpl) _then) : super(_value, _then);
/// Create a copy of PlansState
/// with the given fields replaced by the non-null parameter values.
@@ -237,8 +225,7 @@ class _$PlansStateLoadingImpl implements PlansStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$PlansStateLoadingImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlansStateLoadingImpl);
}
@override
@@ -325,9 +312,9 @@ abstract class PlansStateLoading implements PlansState {
/// @nodoc
abstract class _$$PlansStateLoadedImplCopyWith<$Res> {
factory _$$PlansStateLoadedImplCopyWith(_$PlansStateLoadedImpl value,
$Res Function(_$PlansStateLoadedImpl) then) =
factory _$$PlansStateLoadedImplCopyWith(_$PlansStateLoadedImpl value, $Res Function(_$PlansStateLoadedImpl) then) =
__$$PlansStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call({PlanPaginationModel plansModel});
@@ -335,12 +322,9 @@ abstract class _$$PlansStateLoadedImplCopyWith<$Res> {
}
/// @nodoc
class __$$PlansStateLoadedImplCopyWithImpl<$Res>
extends _$PlansStateCopyWithImpl<$Res, _$PlansStateLoadedImpl>
class __$$PlansStateLoadedImplCopyWithImpl<$Res> extends _$PlansStateCopyWithImpl<$Res, _$PlansStateLoadedImpl>
implements _$$PlansStateLoadedImplCopyWith<$Res> {
__$$PlansStateLoadedImplCopyWithImpl(_$PlansStateLoadedImpl _value,
$Res Function(_$PlansStateLoadedImpl) _then)
: super(_value, _then);
__$$PlansStateLoadedImplCopyWithImpl(_$PlansStateLoadedImpl _value, $Res Function(_$PlansStateLoadedImpl) _then) : super(_value, _then);
/// Create a copy of PlansState
/// with the given fields replaced by the non-null parameter values.
@@ -384,10 +368,7 @@ class _$PlansStateLoadedImpl implements PlansStateLoaded {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$PlansStateLoadedImpl &&
(identical(other.plansModel, plansModel) ||
other.plansModel == plansModel));
(other.runtimeType == runtimeType && other is _$PlansStateLoadedImpl && (identical(other.plansModel, plansModel) || other.plansModel == plansModel));
}
@override
@@ -398,9 +379,7 @@ class _$PlansStateLoadedImpl implements PlansStateLoaded {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PlansStateLoadedImplCopyWith<_$PlansStateLoadedImpl> get copyWith =>
__$$PlansStateLoadedImplCopyWithImpl<_$PlansStateLoadedImpl>(
this, _$identity);
_$$PlansStateLoadedImplCopyWith<_$PlansStateLoadedImpl> get copyWith => __$$PlansStateLoadedImplCopyWithImpl<_$PlansStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -478,34 +457,27 @@ class _$PlansStateLoadedImpl implements PlansStateLoaded {
}
abstract class PlansStateLoaded implements PlansState {
const factory PlansStateLoaded(
{required final PlanPaginationModel plansModel}) = _$PlansStateLoadedImpl;
const factory PlansStateLoaded({required final PlanPaginationModel plansModel}) = _$PlansStateLoadedImpl;
PlanPaginationModel get plansModel;
/// Create a copy of PlansState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PlansStateLoadedImplCopyWith<_$PlansStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$PlansStateLoadedImplCopyWith<_$PlansStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$PlansStateErrorImplCopyWith<$Res> {
factory _$$PlansStateErrorImplCopyWith(_$PlansStateErrorImpl value,
$Res Function(_$PlansStateErrorImpl) then) =
__$$PlansStateErrorImplCopyWithImpl<$Res>;
factory _$$PlansStateErrorImplCopyWith(_$PlansStateErrorImpl value, $Res Function(_$PlansStateErrorImpl) then) = __$$PlansStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$PlansStateErrorImplCopyWithImpl<$Res>
extends _$PlansStateCopyWithImpl<$Res, _$PlansStateErrorImpl>
implements _$$PlansStateErrorImplCopyWith<$Res> {
__$$PlansStateErrorImplCopyWithImpl(
_$PlansStateErrorImpl _value, $Res Function(_$PlansStateErrorImpl) _then)
: super(_value, _then);
class __$$PlansStateErrorImplCopyWithImpl<$Res> extends _$PlansStateCopyWithImpl<$Res, _$PlansStateErrorImpl> implements _$$PlansStateErrorImplCopyWith<$Res> {
__$$PlansStateErrorImplCopyWithImpl(_$PlansStateErrorImpl _value, $Res Function(_$PlansStateErrorImpl) _then) : super(_value, _then);
/// Create a copy of PlansState
/// with the given fields replaced by the non-null parameter values.
@@ -541,8 +513,7 @@ class _$PlansStateErrorImpl implements PlansStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$PlansStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -553,9 +524,7 @@ class _$PlansStateErrorImpl implements PlansStateError {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PlansStateErrorImplCopyWith<_$PlansStateErrorImpl> get copyWith =>
__$$PlansStateErrorImplCopyWithImpl<_$PlansStateErrorImpl>(
this, _$identity);
_$$PlansStateErrorImplCopyWith<_$PlansStateErrorImpl> get copyWith => __$$PlansStateErrorImplCopyWithImpl<_$PlansStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
@@ -633,14 +602,12 @@ class _$PlansStateErrorImpl implements PlansStateError {
}
abstract class PlansStateError implements PlansState {
const factory PlansStateError({required final String errorMessage}) =
_$PlansStateErrorImpl;
const factory PlansStateError({required final String errorMessage}) = _$PlansStateErrorImpl;
String get errorMessage;
/// Create a copy of PlansState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PlansStateErrorImplCopyWith<_$PlansStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$PlansStateErrorImplCopyWith<_$PlansStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -55,9 +55,7 @@ class _PlansService implements PlansService {
}
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 {

View File

@@ -1,7 +1,6 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'profile_model.freezed.dart';
part 'profile_model.g.dart';
@freezed

View File

@@ -22,20 +22,28 @@ ProfileModel _$ProfileModelFromJson(Map<String, dynamic> json) {
mixin _$ProfileModel {
@JsonKey(name: "id")
int get id => throw _privateConstructorUsedError;
@JsonKey(name: "name")
String get name => throw _privateConstructorUsedError;
@JsonKey(name: "email")
String get email => throw _privateConstructorUsedError;
@JsonKey(name: "email_verified_at")
DateTime? get emailVerifiedAt => throw _privateConstructorUsedError;
@JsonKey(name: "created_at")
DateTime? get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
DateTime? get updatedAt => throw _privateConstructorUsedError;
@JsonKey(name: "is_public_profile")
bool get isPublicProfile => throw _privateConstructorUsedError;
@JsonKey(name: "slug")
String get slug => throw _privateConstructorUsedError;
@JsonKey(name: "profile_photo_url")
String get profilePhotoUrl => throw _privateConstructorUsedError;
@@ -45,15 +53,13 @@ mixin _$ProfileModel {
/// Create a copy of ProfileModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProfileModelCopyWith<ProfileModel> get copyWith =>
throw _privateConstructorUsedError;
$ProfileModelCopyWith<ProfileModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProfileModelCopyWith<$Res> {
factory $ProfileModelCopyWith(
ProfileModel value, $Res Function(ProfileModel) then) =
_$ProfileModelCopyWithImpl<$Res, ProfileModel>;
factory $ProfileModelCopyWith(ProfileModel value, $Res Function(ProfileModel) then) = _$ProfileModelCopyWithImpl<$Res, ProfileModel>;
@useResult
$Res call(
{@JsonKey(name: "id") int id,
@@ -68,12 +74,12 @@ abstract class $ProfileModelCopyWith<$Res> {
}
/// @nodoc
class _$ProfileModelCopyWithImpl<$Res, $Val extends ProfileModel>
implements $ProfileModelCopyWith<$Res> {
class _$ProfileModelCopyWithImpl<$Res, $Val extends ProfileModel> implements $ProfileModelCopyWith<$Res> {
_$ProfileModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -134,11 +140,9 @@ class _$ProfileModelCopyWithImpl<$Res, $Val extends ProfileModel>
}
/// @nodoc
abstract class _$$ProfileModelImplCopyWith<$Res>
implements $ProfileModelCopyWith<$Res> {
factory _$$ProfileModelImplCopyWith(
_$ProfileModelImpl value, $Res Function(_$ProfileModelImpl) then) =
__$$ProfileModelImplCopyWithImpl<$Res>;
abstract class _$$ProfileModelImplCopyWith<$Res> implements $ProfileModelCopyWith<$Res> {
factory _$$ProfileModelImplCopyWith(_$ProfileModelImpl value, $Res Function(_$ProfileModelImpl) then) = __$$ProfileModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -154,12 +158,8 @@ abstract class _$$ProfileModelImplCopyWith<$Res>
}
/// @nodoc
class __$$ProfileModelImplCopyWithImpl<$Res>
extends _$ProfileModelCopyWithImpl<$Res, _$ProfileModelImpl>
implements _$$ProfileModelImplCopyWith<$Res> {
__$$ProfileModelImplCopyWithImpl(
_$ProfileModelImpl _value, $Res Function(_$ProfileModelImpl) _then)
: super(_value, _then);
class __$$ProfileModelImplCopyWithImpl<$Res> extends _$ProfileModelCopyWithImpl<$Res, _$ProfileModelImpl> implements _$$ProfileModelImplCopyWith<$Res> {
__$$ProfileModelImplCopyWithImpl(_$ProfileModelImpl _value, $Res Function(_$ProfileModelImpl) _then) : super(_value, _then);
/// Create a copy of ProfileModel
/// with the given fields replaced by the non-null parameter values.
@@ -231,8 +231,7 @@ class _$ProfileModelImpl implements _ProfileModel {
@JsonKey(name: "slug") required this.slug,
@JsonKey(name: "profile_photo_url") required this.profilePhotoUrl});
factory _$ProfileModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ProfileModelImplFromJson(json);
factory _$ProfileModelImpl.fromJson(Map<String, dynamic> json) => _$$ProfileModelImplFromJson(json);
@override
@JsonKey(name: "id")
@@ -275,31 +274,24 @@ class _$ProfileModelImpl implements _ProfileModel {
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.email, email) || other.email == email) &&
(identical(other.emailVerifiedAt, emailVerifiedAt) ||
other.emailVerifiedAt == emailVerifiedAt) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.isPublicProfile, isPublicProfile) ||
other.isPublicProfile == isPublicProfile) &&
(identical(other.emailVerifiedAt, emailVerifiedAt) || other.emailVerifiedAt == emailVerifiedAt) &&
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) &&
(identical(other.isPublicProfile, isPublicProfile) || other.isPublicProfile == isPublicProfile) &&
(identical(other.slug, slug) || other.slug == slug) &&
(identical(other.profilePhotoUrl, profilePhotoUrl) ||
other.profilePhotoUrl == profilePhotoUrl));
(identical(other.profilePhotoUrl, profilePhotoUrl) || other.profilePhotoUrl == profilePhotoUrl));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id, name, email, emailVerifiedAt,
createdAt, updatedAt, isPublicProfile, slug, profilePhotoUrl);
int get hashCode => Object.hash(runtimeType, id, name, email, emailVerifiedAt, createdAt, updatedAt, isPublicProfile, slug, profilePhotoUrl);
/// Create a copy of ProfileModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProfileModelImplCopyWith<_$ProfileModelImpl> get copyWith =>
__$$ProfileModelImplCopyWithImpl<_$ProfileModelImpl>(this, _$identity);
_$$ProfileModelImplCopyWith<_$ProfileModelImpl> get copyWith => __$$ProfileModelImplCopyWithImpl<_$ProfileModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -319,36 +311,42 @@ abstract class _ProfileModel implements ProfileModel {
@JsonKey(name: "updated_at") final DateTime? updatedAt,
@JsonKey(name: "is_public_profile") required final bool isPublicProfile,
@JsonKey(name: "slug") required final String slug,
@JsonKey(name: "profile_photo_url")
required final String profilePhotoUrl}) = _$ProfileModelImpl;
@JsonKey(name: "profile_photo_url") required final String profilePhotoUrl}) = _$ProfileModelImpl;
factory _ProfileModel.fromJson(Map<String, dynamic> json) =
_$ProfileModelImpl.fromJson;
factory _ProfileModel.fromJson(Map<String, dynamic> json) = _$ProfileModelImpl.fromJson;
@override
@JsonKey(name: "id")
int get id;
@override
@JsonKey(name: "name")
String get name;
@override
@JsonKey(name: "email")
String get email;
@override
@JsonKey(name: "email_verified_at")
DateTime? get emailVerifiedAt;
@override
@JsonKey(name: "created_at")
DateTime? get createdAt;
@override
@JsonKey(name: "updated_at")
DateTime? get updatedAt;
@override
@JsonKey(name: "is_public_profile")
bool get isPublicProfile;
@override
@JsonKey(name: "slug")
String get slug;
@override
@JsonKey(name: "profile_photo_url")
String get profilePhotoUrl;
@@ -357,8 +355,7 @@ abstract class _ProfileModel implements ProfileModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfileModelImplCopyWith<_$ProfileModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ProfileModelImplCopyWith<_$ProfileModelImpl> get copyWith => throw _privateConstructorUsedError;
}
ProfileDetailsModel _$ProfileDetailsModelFromJson(Map<String, dynamic> json) {
@@ -369,56 +366,82 @@ ProfileDetailsModel _$ProfileDetailsModelFromJson(Map<String, dynamic> json) {
mixin _$ProfileDetailsModel {
@JsonKey(name: "first_name")
String get firstName => throw _privateConstructorUsedError;
@JsonKey(name: "last_name")
String get lastName => throw _privateConstructorUsedError;
@JsonKey(name: "birthdate")
String get birthdate => throw _privateConstructorUsedError;
@JsonKey(name: "gender")
String get gender => throw _privateConstructorUsedError;
@JsonKey(name: "country")
String get country => throw _privateConstructorUsedError;
@JsonKey(name: "city")
String get city => throw _privateConstructorUsedError;
@JsonKey(name: "lang")
String get lang => throw _privateConstructorUsedError;
@JsonKey(name: "weight")
double get weight => throw _privateConstructorUsedError;
@JsonKey(name: "height")
int get height => throw _privateConstructorUsedError;
@JsonKey(name: "chest_circumference")
int get chestCircumference => throw _privateConstructorUsedError;
@JsonKey(name: "waist_circumference")
int get waistCircumference => throw _privateConstructorUsedError;
@JsonKey(name: "hip_circumference")
int get hipCircumference => throw _privateConstructorUsedError;
@JsonKey(name: "blood_pressure_up")
int get bloodPressureUp => throw _privateConstructorUsedError;
@JsonKey(name: "blood_pressure_down")
int get bloodPressureDown => throw _privateConstructorUsedError;
@JsonKey(name: "has_hypo")
bool get hasHypo => throw _privateConstructorUsedError;
@JsonKey(name: "has_hyper")
bool get hasHyper => throw _privateConstructorUsedError;
@JsonKey(name: "about_alergy")
String get aboutAlergy => throw _privateConstructorUsedError;
@JsonKey(name: "about_taking_pils")
String get aboutTakingPils => throw _privateConstructorUsedError;
@JsonKey(name: "about_sport_hobbies")
String get aboutSportHobbies => throw _privateConstructorUsedError;
@JsonKey(name: "favorite_foods")
String get favoriteFoods => throw _privateConstructorUsedError;
@JsonKey(name: "unfavorite_foods")
String get unfavoriteFoods => throw _privateConstructorUsedError;
@JsonKey(name: "additional_info")
String get additionalInfo => throw _privateConstructorUsedError;
@JsonKey(name: "created_at")
DateTime? get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
DateTime? get updatedAt => throw _privateConstructorUsedError;
@JsonKey(name: "is_mood_fillable")
bool get isMoodFillable => throw _privateConstructorUsedError;
@JsonKey(name: "is_bedtime_fillable")
bool get isBedtimeFillable => throw _privateConstructorUsedError;
@JsonKey(name: "activity_coefficient")
double get activityCoefficient => throw _privateConstructorUsedError;
@@ -428,15 +451,14 @@ mixin _$ProfileDetailsModel {
/// Create a copy of ProfileDetailsModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProfileDetailsModelCopyWith<ProfileDetailsModel> get copyWith =>
throw _privateConstructorUsedError;
$ProfileDetailsModelCopyWith<ProfileDetailsModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProfileDetailsModelCopyWith<$Res> {
factory $ProfileDetailsModelCopyWith(
ProfileDetailsModel value, $Res Function(ProfileDetailsModel) then) =
factory $ProfileDetailsModelCopyWith(ProfileDetailsModel value, $Res Function(ProfileDetailsModel) then) =
_$ProfileDetailsModelCopyWithImpl<$Res, ProfileDetailsModel>;
@useResult
$Res call(
{@JsonKey(name: "first_name") String firstName,
@@ -469,12 +491,12 @@ abstract class $ProfileDetailsModelCopyWith<$Res> {
}
/// @nodoc
class _$ProfileDetailsModelCopyWithImpl<$Res, $Val extends ProfileDetailsModel>
implements $ProfileDetailsModelCopyWith<$Res> {
class _$ProfileDetailsModelCopyWithImpl<$Res, $Val extends ProfileDetailsModel> implements $ProfileDetailsModelCopyWith<$Res> {
_$ProfileDetailsModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -625,11 +647,10 @@ class _$ProfileDetailsModelCopyWithImpl<$Res, $Val extends ProfileDetailsModel>
}
/// @nodoc
abstract class _$$ProfileDetailsModelImplCopyWith<$Res>
implements $ProfileDetailsModelCopyWith<$Res> {
factory _$$ProfileDetailsModelImplCopyWith(_$ProfileDetailsModelImpl value,
$Res Function(_$ProfileDetailsModelImpl) then) =
abstract class _$$ProfileDetailsModelImplCopyWith<$Res> implements $ProfileDetailsModelCopyWith<$Res> {
factory _$$ProfileDetailsModelImplCopyWith(_$ProfileDetailsModelImpl value, $Res Function(_$ProfileDetailsModelImpl) then) =
__$$ProfileDetailsModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -663,12 +684,9 @@ abstract class _$$ProfileDetailsModelImplCopyWith<$Res>
}
/// @nodoc
class __$$ProfileDetailsModelImplCopyWithImpl<$Res>
extends _$ProfileDetailsModelCopyWithImpl<$Res, _$ProfileDetailsModelImpl>
class __$$ProfileDetailsModelImplCopyWithImpl<$Res> extends _$ProfileDetailsModelCopyWithImpl<$Res, _$ProfileDetailsModelImpl>
implements _$$ProfileDetailsModelImplCopyWith<$Res> {
__$$ProfileDetailsModelImplCopyWithImpl(_$ProfileDetailsModelImpl _value,
$Res Function(_$ProfileDetailsModelImpl) _then)
: super(_value, _then);
__$$ProfileDetailsModelImplCopyWithImpl(_$ProfileDetailsModelImpl _value, $Res Function(_$ProfileDetailsModelImpl) _then) : super(_value, _then);
/// Create a copy of ProfileDetailsModel
/// with the given fields replaced by the non-null parameter values.
@@ -846,11 +864,9 @@ class _$ProfileDetailsModelImpl implements _ProfileDetailsModel {
@JsonKey(name: "updated_at") this.updatedAt,
@JsonKey(name: "is_mood_fillable") required this.isMoodFillable,
@JsonKey(name: "is_bedtime_fillable") required this.isBedtimeFillable,
@JsonKey(name: "activity_coefficient")
required this.activityCoefficient});
@JsonKey(name: "activity_coefficient") required this.activityCoefficient});
factory _$ProfileDetailsModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ProfileDetailsModelImplFromJson(json);
factory _$ProfileDetailsModelImpl.fromJson(Map<String, dynamic> json) => _$$ProfileDetailsModelImplFromJson(json);
@override
@JsonKey(name: "first_name")
@@ -944,53 +960,33 @@ class _$ProfileDetailsModelImpl implements _ProfileDetailsModel {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfileDetailsModelImpl &&
(identical(other.firstName, firstName) ||
other.firstName == firstName) &&
(identical(other.lastName, lastName) ||
other.lastName == lastName) &&
(identical(other.birthdate, birthdate) ||
other.birthdate == birthdate) &&
(identical(other.firstName, firstName) || other.firstName == firstName) &&
(identical(other.lastName, lastName) || other.lastName == lastName) &&
(identical(other.birthdate, birthdate) || other.birthdate == birthdate) &&
(identical(other.gender, gender) || other.gender == gender) &&
(identical(other.country, country) || other.country == country) &&
(identical(other.city, city) || other.city == city) &&
(identical(other.lang, lang) || other.lang == lang) &&
(identical(other.weight, weight) || other.weight == weight) &&
(identical(other.height, height) || other.height == height) &&
(identical(other.chestCircumference, chestCircumference) ||
other.chestCircumference == chestCircumference) &&
(identical(other.waistCircumference, waistCircumference) ||
other.waistCircumference == waistCircumference) &&
(identical(other.hipCircumference, hipCircumference) ||
other.hipCircumference == hipCircumference) &&
(identical(other.bloodPressureUp, bloodPressureUp) ||
other.bloodPressureUp == bloodPressureUp) &&
(identical(other.bloodPressureDown, bloodPressureDown) ||
other.bloodPressureDown == bloodPressureDown) &&
(identical(other.chestCircumference, chestCircumference) || other.chestCircumference == chestCircumference) &&
(identical(other.waistCircumference, waistCircumference) || other.waistCircumference == waistCircumference) &&
(identical(other.hipCircumference, hipCircumference) || other.hipCircumference == hipCircumference) &&
(identical(other.bloodPressureUp, bloodPressureUp) || other.bloodPressureUp == bloodPressureUp) &&
(identical(other.bloodPressureDown, bloodPressureDown) || other.bloodPressureDown == bloodPressureDown) &&
(identical(other.hasHypo, hasHypo) || other.hasHypo == hasHypo) &&
(identical(other.hasHyper, hasHyper) ||
other.hasHyper == hasHyper) &&
(identical(other.aboutAlergy, aboutAlergy) ||
other.aboutAlergy == aboutAlergy) &&
(identical(other.aboutTakingPils, aboutTakingPils) ||
other.aboutTakingPils == aboutTakingPils) &&
(identical(other.aboutSportHobbies, aboutSportHobbies) ||
other.aboutSportHobbies == aboutSportHobbies) &&
(identical(other.favoriteFoods, favoriteFoods) ||
other.favoriteFoods == favoriteFoods) &&
(identical(other.unfavoriteFoods, unfavoriteFoods) ||
other.unfavoriteFoods == unfavoriteFoods) &&
(identical(other.additionalInfo, additionalInfo) ||
other.additionalInfo == additionalInfo) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.isMoodFillable, isMoodFillable) ||
other.isMoodFillable == isMoodFillable) &&
(identical(other.isBedtimeFillable, isBedtimeFillable) ||
other.isBedtimeFillable == isBedtimeFillable) &&
(identical(other.activityCoefficient, activityCoefficient) ||
other.activityCoefficient == activityCoefficient));
(identical(other.hasHyper, hasHyper) || other.hasHyper == hasHyper) &&
(identical(other.aboutAlergy, aboutAlergy) || other.aboutAlergy == aboutAlergy) &&
(identical(other.aboutTakingPils, aboutTakingPils) || other.aboutTakingPils == aboutTakingPils) &&
(identical(other.aboutSportHobbies, aboutSportHobbies) || other.aboutSportHobbies == aboutSportHobbies) &&
(identical(other.favoriteFoods, favoriteFoods) || other.favoriteFoods == favoriteFoods) &&
(identical(other.unfavoriteFoods, unfavoriteFoods) || other.unfavoriteFoods == unfavoriteFoods) &&
(identical(other.additionalInfo, additionalInfo) || other.additionalInfo == additionalInfo) &&
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) &&
(identical(other.isMoodFillable, isMoodFillable) || other.isMoodFillable == isMoodFillable) &&
(identical(other.isBedtimeFillable, isBedtimeFillable) || other.isBedtimeFillable == isBedtimeFillable) &&
(identical(other.activityCoefficient, activityCoefficient) || other.activityCoefficient == activityCoefficient));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -1032,8 +1028,7 @@ class _$ProfileDetailsModelImpl implements _ProfileDetailsModel {
@override
@pragma('vm:prefer-inline')
_$$ProfileDetailsModelImplCopyWith<_$ProfileDetailsModelImpl> get copyWith =>
__$$ProfileDetailsModelImplCopyWithImpl<_$ProfileDetailsModelImpl>(
this, _$identity);
__$$ProfileDetailsModelImplCopyWithImpl<_$ProfileDetailsModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -1054,112 +1049,131 @@ abstract class _ProfileDetailsModel implements ProfileDetailsModel {
@JsonKey(name: "lang") required final String lang,
@JsonKey(name: "weight") required final double weight,
@JsonKey(name: "height") required final int height,
@JsonKey(name: "chest_circumference")
required final int chestCircumference,
@JsonKey(name: "waist_circumference")
required final int waistCircumference,
@JsonKey(name: "chest_circumference") required final int chestCircumference,
@JsonKey(name: "waist_circumference") required final int waistCircumference,
@JsonKey(name: "hip_circumference") required final int hipCircumference,
@JsonKey(name: "blood_pressure_up") required final int bloodPressureUp,
@JsonKey(name: "blood_pressure_down")
required final int bloodPressureDown,
@JsonKey(name: "blood_pressure_down") required final int bloodPressureDown,
@JsonKey(name: "has_hypo") required final bool hasHypo,
@JsonKey(name: "has_hyper") required final bool hasHyper,
@JsonKey(name: "about_alergy") required final String aboutAlergy,
@JsonKey(name: "about_taking_pils") required final String aboutTakingPils,
@JsonKey(name: "about_sport_hobbies")
required final String aboutSportHobbies,
@JsonKey(name: "about_sport_hobbies") required final String aboutSportHobbies,
@JsonKey(name: "favorite_foods") required final String favoriteFoods,
@JsonKey(name: "unfavorite_foods") required final String unfavoriteFoods,
@JsonKey(name: "additional_info") required final String additionalInfo,
@JsonKey(name: "created_at") final DateTime? createdAt,
@JsonKey(name: "updated_at") final DateTime? updatedAt,
@JsonKey(name: "is_mood_fillable") required final bool isMoodFillable,
@JsonKey(name: "is_bedtime_fillable")
required final bool isBedtimeFillable,
@JsonKey(name: "activity_coefficient")
required final double activityCoefficient}) = _$ProfileDetailsModelImpl;
@JsonKey(name: "is_bedtime_fillable") required final bool isBedtimeFillable,
@JsonKey(name: "activity_coefficient") required final double activityCoefficient}) = _$ProfileDetailsModelImpl;
factory _ProfileDetailsModel.fromJson(Map<String, dynamic> json) =
_$ProfileDetailsModelImpl.fromJson;
factory _ProfileDetailsModel.fromJson(Map<String, dynamic> json) = _$ProfileDetailsModelImpl.fromJson;
@override
@JsonKey(name: "first_name")
String get firstName;
@override
@JsonKey(name: "last_name")
String get lastName;
@override
@JsonKey(name: "birthdate")
String get birthdate;
@override
@JsonKey(name: "gender")
String get gender;
@override
@JsonKey(name: "country")
String get country;
@override
@JsonKey(name: "city")
String get city;
@override
@JsonKey(name: "lang")
String get lang;
@override
@JsonKey(name: "weight")
double get weight;
@override
@JsonKey(name: "height")
int get height;
@override
@JsonKey(name: "chest_circumference")
int get chestCircumference;
@override
@JsonKey(name: "waist_circumference")
int get waistCircumference;
@override
@JsonKey(name: "hip_circumference")
int get hipCircumference;
@override
@JsonKey(name: "blood_pressure_up")
int get bloodPressureUp;
@override
@JsonKey(name: "blood_pressure_down")
int get bloodPressureDown;
@override
@JsonKey(name: "has_hypo")
bool get hasHypo;
@override
@JsonKey(name: "has_hyper")
bool get hasHyper;
@override
@JsonKey(name: "about_alergy")
String get aboutAlergy;
@override
@JsonKey(name: "about_taking_pils")
String get aboutTakingPils;
@override
@JsonKey(name: "about_sport_hobbies")
String get aboutSportHobbies;
@override
@JsonKey(name: "favorite_foods")
String get favoriteFoods;
@override
@JsonKey(name: "unfavorite_foods")
String get unfavoriteFoods;
@override
@JsonKey(name: "additional_info")
String get additionalInfo;
@override
@JsonKey(name: "created_at")
DateTime? get createdAt;
@override
@JsonKey(name: "updated_at")
DateTime? get updatedAt;
@override
@JsonKey(name: "is_mood_fillable")
bool get isMoodFillable;
@override
@JsonKey(name: "is_bedtime_fillable")
bool get isBedtimeFillable;
@override
@JsonKey(name: "activity_coefficient")
double get activityCoefficient;
@@ -1168,6 +1182,5 @@ abstract class _ProfileDetailsModel implements ProfileDetailsModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfileDetailsModelImplCopyWith<_$ProfileDetailsModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ProfileDetailsModelImplCopyWith<_$ProfileDetailsModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,27 +6,19 @@ part of 'profile_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$ProfileModelImpl _$$ProfileModelImplFromJson(Map<String, dynamic> json) =>
_$ProfileModelImpl(
_$ProfileModelImpl _$$ProfileModelImplFromJson(Map<String, dynamic> json) => _$ProfileModelImpl(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
email: json['email'] as String,
emailVerifiedAt: json['email_verified_at'] == null
? null
: DateTime.parse(json['email_verified_at'] as String),
createdAt: json['created_at'] == null
? null
: DateTime.parse(json['created_at'] as String),
updatedAt: json['updated_at'] == null
? null
: DateTime.parse(json['updated_at'] as String),
emailVerifiedAt: json['email_verified_at'] == null ? null : DateTime.parse(json['email_verified_at'] as String),
createdAt: json['created_at'] == null ? null : DateTime.parse(json['created_at'] as String),
updatedAt: json['updated_at'] == null ? null : DateTime.parse(json['updated_at'] as String),
isPublicProfile: json['is_public_profile'] as bool,
slug: json['slug'] as String,
profilePhotoUrl: json['profile_photo_url'] as String,
);
Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) => <String, dynamic>{
'id': instance.id,
'name': instance.name,
'email': instance.email,
@@ -38,9 +30,7 @@ Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) =>
'profile_photo_url': instance.profilePhotoUrl,
};
_$ProfileDetailsModelImpl _$$ProfileDetailsModelImplFromJson(
Map<String, dynamic> json) =>
_$ProfileDetailsModelImpl(
_$ProfileDetailsModelImpl _$$ProfileDetailsModelImplFromJson(Map<String, dynamic> json) => _$ProfileDetailsModelImpl(
firstName: json['first_name'] as String,
lastName: json['last_name'] as String,
birthdate: json['birthdate'] as String,
@@ -63,20 +53,14 @@ _$ProfileDetailsModelImpl _$$ProfileDetailsModelImplFromJson(
favoriteFoods: json['favorite_foods'] as String,
unfavoriteFoods: json['unfavorite_foods'] as String,
additionalInfo: json['additional_info'] as String,
createdAt: json['created_at'] == null
? null
: DateTime.parse(json['created_at'] as String),
updatedAt: json['updated_at'] == null
? null
: DateTime.parse(json['updated_at'] as String),
createdAt: json['created_at'] == null ? null : DateTime.parse(json['created_at'] as String),
updatedAt: json['updated_at'] == null ? null : DateTime.parse(json['updated_at'] as String),
isMoodFillable: json['is_mood_fillable'] as bool,
isBedtimeFillable: json['is_bedtime_fillable'] as bool,
activityCoefficient: (json['activity_coefficient'] as num).toDouble(),
);
Map<String, dynamic> _$$ProfileDetailsModelImplToJson(
_$ProfileDetailsModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$ProfileDetailsModelImplToJson(_$ProfileDetailsModelImpl instance) => <String, dynamic>{
'first_name': instance.firstName,
'last_name': instance.lastName,
'birthdate': instance.birthdate,

View File

@@ -20,21 +20,16 @@ mixin _$ProfileState {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) =>
throw _privateConstructorUsedError;
@@ -42,9 +37,7 @@ mixin _$ProfileState {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) =>
@@ -78,18 +71,16 @@ mixin _$ProfileState {
/// @nodoc
abstract class $ProfileStateCopyWith<$Res> {
factory $ProfileStateCopyWith(
ProfileState value, $Res Function(ProfileState) then) =
_$ProfileStateCopyWithImpl<$Res, ProfileState>;
factory $ProfileStateCopyWith(ProfileState value, $Res Function(ProfileState) then) = _$ProfileStateCopyWithImpl<$Res, ProfileState>;
}
/// @nodoc
class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState>
implements $ProfileStateCopyWith<$Res> {
class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState> implements $ProfileStateCopyWith<$Res> {
_$ProfileStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -99,18 +90,12 @@ class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState>
/// @nodoc
abstract class _$$ProfileStateImplCopyWith<$Res> {
factory _$$ProfileStateImplCopyWith(
_$ProfileStateImpl value, $Res Function(_$ProfileStateImpl) then) =
__$$ProfileStateImplCopyWithImpl<$Res>;
factory _$$ProfileStateImplCopyWith(_$ProfileStateImpl value, $Res Function(_$ProfileStateImpl) then) = __$$ProfileStateImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$ProfileStateImplCopyWithImpl<$Res>
extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateImpl>
implements _$$ProfileStateImplCopyWith<$Res> {
__$$ProfileStateImplCopyWithImpl(
_$ProfileStateImpl _value, $Res Function(_$ProfileStateImpl) _then)
: super(_value, _then);
class __$$ProfileStateImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateImpl> implements _$$ProfileStateImplCopyWith<$Res> {
__$$ProfileStateImplCopyWithImpl(_$ProfileStateImpl _value, $Res Function(_$ProfileStateImpl) _then) : super(_value, _then);
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -128,8 +113,7 @@ class _$ProfileStateImpl implements _ProfileState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$ProfileStateImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ProfileStateImpl);
}
@override
@@ -140,11 +124,7 @@ class _$ProfileStateImpl implements _ProfileState {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) {
return $default();
@@ -155,9 +135,7 @@ class _$ProfileStateImpl implements _ProfileState {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return $default?.call();
@@ -168,9 +146,7 @@ class _$ProfileStateImpl implements _ProfileState {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -224,18 +200,14 @@ abstract class _ProfileState implements ProfileState {
/// @nodoc
abstract class _$$ProfileStateLoadingImplCopyWith<$Res> {
factory _$$ProfileStateLoadingImplCopyWith(_$ProfileStateLoadingImpl value,
$Res Function(_$ProfileStateLoadingImpl) then) =
factory _$$ProfileStateLoadingImplCopyWith(_$ProfileStateLoadingImpl value, $Res Function(_$ProfileStateLoadingImpl) then) =
__$$ProfileStateLoadingImplCopyWithImpl<$Res>;
}
/// @nodoc
class __$$ProfileStateLoadingImplCopyWithImpl<$Res>
extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateLoadingImpl>
class __$$ProfileStateLoadingImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateLoadingImpl>
implements _$$ProfileStateLoadingImplCopyWith<$Res> {
__$$ProfileStateLoadingImplCopyWithImpl(_$ProfileStateLoadingImpl _value,
$Res Function(_$ProfileStateLoadingImpl) _then)
: super(_value, _then);
__$$ProfileStateLoadingImplCopyWithImpl(_$ProfileStateLoadingImpl _value, $Res Function(_$ProfileStateLoadingImpl) _then) : super(_value, _then);
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -253,9 +225,7 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfileStateLoadingImpl);
return identical(this, other) || (other.runtimeType == runtimeType && other is _$ProfileStateLoadingImpl);
}
@override
@@ -266,11 +236,7 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) {
return loading();
@@ -281,9 +247,7 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return loading?.call();
@@ -294,9 +258,7 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -350,26 +312,21 @@ abstract class ProfileStateLoading implements ProfileState {
/// @nodoc
abstract class _$$ProfileStateLoadedImplCopyWith<$Res> {
factory _$$ProfileStateLoadedImplCopyWith(_$ProfileStateLoadedImpl value,
$Res Function(_$ProfileStateLoadedImpl) then) =
factory _$$ProfileStateLoadedImplCopyWith(_$ProfileStateLoadedImpl value, $Res Function(_$ProfileStateLoadedImpl) then) =
__$$ProfileStateLoadedImplCopyWithImpl<$Res>;
@useResult
$Res call(
{ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts});
$Res call({ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts});
$ProfileModelCopyWith<$Res> get profile;
$ProfileDetailsModelCopyWith<$Res> get profileDetails;
}
/// @nodoc
class __$$ProfileStateLoadedImplCopyWithImpl<$Res>
extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateLoadedImpl>
class __$$ProfileStateLoadedImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateLoadedImpl>
implements _$$ProfileStateLoadedImplCopyWith<$Res> {
__$$ProfileStateLoadedImplCopyWithImpl(_$ProfileStateLoadedImpl _value,
$Res Function(_$ProfileStateLoadedImpl) _then)
: super(_value, _then);
__$$ProfileStateLoadedImplCopyWithImpl(_$ProfileStateLoadedImpl _value, $Res Function(_$ProfileStateLoadedImpl) _then) : super(_value, _then);
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -420,10 +377,7 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res>
/// @nodoc
class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
const _$ProfileStateLoadedImpl(
{required this.profile,
required this.profileDetails,
required final List<FeedBlogPostModel> blogPosts})
const _$ProfileStateLoadedImpl({required this.profile, required this.profileDetails, required final List<FeedBlogPostModel> blogPosts})
: _blogPosts = blogPosts;
@override
@@ -431,6 +385,7 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
@override
final ProfileDetailsModel profileDetails;
final List<FeedBlogPostModel> _blogPosts;
@override
List<FeedBlogPostModel> get blogPosts {
if (_blogPosts is EqualUnmodifiableListView) return _blogPosts;
@@ -449,15 +404,12 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
(other.runtimeType == runtimeType &&
other is _$ProfileStateLoadedImpl &&
(identical(other.profile, profile) || other.profile == profile) &&
(identical(other.profileDetails, profileDetails) ||
other.profileDetails == profileDetails) &&
const DeepCollectionEquality()
.equals(other._blogPosts, _blogPosts));
(identical(other.profileDetails, profileDetails) || other.profileDetails == profileDetails) &&
const DeepCollectionEquality().equals(other._blogPosts, _blogPosts));
}
@override
int get hashCode => Object.hash(runtimeType, profile, profileDetails,
const DeepCollectionEquality().hash(_blogPosts));
int get hashCode => Object.hash(runtimeType, profile, profileDetails, const DeepCollectionEquality().hash(_blogPosts));
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -465,19 +417,14 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
@override
@pragma('vm:prefer-inline')
_$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith =>
__$$ProfileStateLoadedImplCopyWithImpl<_$ProfileStateLoadedImpl>(
this, _$identity);
__$$ProfileStateLoadedImplCopyWithImpl<_$ProfileStateLoadedImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) {
return loaded(profile, profileDetails, blogPosts);
@@ -488,9 +435,7 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return loaded?.call(profile, profileDetails, blogPosts);
@@ -501,9 +446,7 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -553,38 +496,35 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
abstract class ProfileStateLoaded implements ProfileState {
const factory ProfileStateLoaded(
{required final ProfileModel profile,
required final ProfileDetailsModel profileDetails,
required final List<FeedBlogPostModel> blogPosts}) =
_$ProfileStateLoadedImpl;
{required final ProfileModel profile,
required final ProfileDetailsModel profileDetails,
required final List<FeedBlogPostModel> blogPosts}) = _$ProfileStateLoadedImpl;
ProfileModel get profile;
ProfileDetailsModel get profileDetails;
List<FeedBlogPostModel> get blogPosts;
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$ProfileStateErrorImplCopyWith<$Res> {
factory _$$ProfileStateErrorImplCopyWith(_$ProfileStateErrorImpl value,
$Res Function(_$ProfileStateErrorImpl) then) =
factory _$$ProfileStateErrorImplCopyWith(_$ProfileStateErrorImpl value, $Res Function(_$ProfileStateErrorImpl) then) =
__$$ProfileStateErrorImplCopyWithImpl<$Res>;
@useResult
$Res call({String errorMessage});
}
/// @nodoc
class __$$ProfileStateErrorImplCopyWithImpl<$Res>
extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateErrorImpl>
class __$$ProfileStateErrorImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateErrorImpl>
implements _$$ProfileStateErrorImplCopyWith<$Res> {
__$$ProfileStateErrorImplCopyWithImpl(_$ProfileStateErrorImpl _value,
$Res Function(_$ProfileStateErrorImpl) _then)
: super(_value, _then);
__$$ProfileStateErrorImplCopyWithImpl(_$ProfileStateErrorImpl _value, $Res Function(_$ProfileStateErrorImpl) _then) : super(_value, _then);
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -620,8 +560,7 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProfileStateErrorImpl &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
@@ -632,20 +571,14 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith =>
__$$ProfileStateErrorImplCopyWithImpl<_$ProfileStateErrorImpl>(
this, _$identity);
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith => __$$ProfileStateErrorImplCopyWithImpl<_$ProfileStateErrorImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function() $default, {
required TResult Function() loading,
required TResult Function(
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)
loaded,
required TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts) loaded,
required TResult Function(String errorMessage) error,
}) {
return error(errorMessage);
@@ -656,9 +589,7 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
TResult? Function()? loading,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult? Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult? Function(String errorMessage)? error,
}) {
return error?.call(errorMessage);
@@ -669,9 +600,7 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
TResult maybeWhen<TResult extends Object?>(
TResult Function()? $default, {
TResult Function()? loading,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts)?
loaded,
TResult Function(ProfileModel profile, ProfileDetailsModel profileDetails, List<FeedBlogPostModel> blogPosts)? loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -720,14 +649,12 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
}
abstract class ProfileStateError implements ProfileState {
const factory ProfileStateError({required final String errorMessage}) =
_$ProfileStateErrorImpl;
const factory ProfileStateError({required final String errorMessage}) = _$ProfileStateErrorImpl;
String get errorMessage;
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -1,4 +1,4 @@
//
//
// import 'package:eatvio_app/features/profile/models/profile_model.dart';
// import 'package:eatvio_app/features/profile/presentation/bloc/profile_cubit/profile_cubit.dart';
// import 'package:flutter/cupertino.dart';

View File

@@ -1,4 +1,4 @@
//
//
// import 'package:eatvio_app/features/profile/models/profile_model.dart';
// import 'package:eatvio_app/features/profile/presentation/bloc/profile_cubit/profile_cubit.dart';
// import 'package:flutter/cupertino.dart';

View File

@@ -191,8 +191,7 @@ class _ProfileService implements ProfileService {
}
@override
Future<FeedBlogPostSettingsModel> getBlogPostByAuthorSlug(
{required String slug}) async {
Future<FeedBlogPostSettingsModel> getBlogPostByAuthorSlug({required String slug}) async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
@@ -225,9 +224,7 @@ class _ProfileService implements ProfileService {
}
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 {

Some files were not shown because too many files have changed in this diff Show More