fix: charts, profile, bottom nav bar

This commit is contained in:
mso7nueh
2024-09-18 16:14:00 +03:00
parent c800d35663
commit d771feefe3
81 changed files with 1478 additions and 2209 deletions

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

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

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

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

@@ -74,9 +74,22 @@ class _BottomNavigationBarWidgetState extends State<BottomNavigationBarWidget> {
items: [
BottomNavigationBarItem(
label: '',
icon: SvgPicture.asset(
ImageConstant.imgLogo,
height: 32,
icon: BlocProvider<ProfileAvatarCubit>(
create: (context) => sl<ProfileAvatarCubit>()..getMyProfile(),
child: BlocBuilder<ProfileAvatarCubit, ProfileAvatarState>(
builder: (BuildContext context, ProfileAvatarState state) {
if (state is ProfileAvatarStateLoaded) {
return CircleAvatar(
backgroundImage: NetworkImage(state.profile.profilePhotoUrl),
radius: 16,
);
}
return CircleAvatar(
radius: 16,
backgroundColor: Colors.black12,
);
},
),
),
),
BottomNavigationBarItem(
@@ -193,22 +206,9 @@ class _BottomNavigationBarWidgetState extends State<BottomNavigationBarWidget> {
),
BottomNavigationBarItem(
label: '',
icon: BlocProvider<ProfileAvatarCubit>(
create: (context) => sl<ProfileAvatarCubit>()..getMyProfile(),
child: BlocBuilder<ProfileAvatarCubit, ProfileAvatarState>(
builder: (BuildContext context, ProfileAvatarState state) {
if (state is ProfileAvatarStateLoaded) {
return CircleAvatar(
backgroundImage: NetworkImage(state.profile.profilePhotoUrl),
radius: 16,
);
}
return CircleAvatar(
radius: 16,
backgroundColor: Colors.black12,
);
},
),
icon: SvgPicture.asset(
ImageConstant.imgLogo,
height: 32,
),
),
],

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

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

@@ -4,6 +4,7 @@ import 'package:freezed_annotation/freezed_annotation.dart';
import './meal.dart';
part 'diary_model.freezed.dart';
part 'diary_model.g.dart';
@freezed

View File

@@ -4,6 +4,7 @@ import './photo.dart';
import './portion.dart';
part 'meal.freezed.dart';
part 'meal.g.dart';
@freezed

View File

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

View File

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

View File

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

View File

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

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

@@ -2,6 +2,7 @@ import 'package:eatvio_app/core/models/pagination_model.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'diets_pagination_model.freezed.dart';
part 'diets_pagination_model.g.dart';
@freezed

View File

@@ -3,6 +3,7 @@ import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'feed_blog_post_settings_model.freezed.dart';
part 'feed_blog_post_settings_model.g.dart';
@freezed

View File

@@ -2,6 +2,7 @@ import 'package:eatvio_app/features/feed/models/recipes_model.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'recipes_pagination_model.freezed.dart';
part 'recipes_pagination_model.g.dart';
@freezed

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

@@ -3,6 +3,7 @@ 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

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

View File

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

View File

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

View File

@@ -4,6 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
class ProfileCubit extends Cubit<ProfileState> {
final ProfileRepository profileRepository;
String _currentPeriod = '1';
ProfileCubit({
required this.profileRepository,
@@ -15,8 +16,6 @@ class ProfileCubit extends Cubit<ProfileState> {
profile: await profileRepository.getProfileBySlug(slug),
profileDetails: await profileRepository.getMyProfileDetails(),
blogPosts: await profileRepository.getBlogPostsByAuthorSlug(slug: slug),
weightPoints: await profileRepository.getWeight(period: '1', slug: slug),
circumferencePoints: await profileRepository.getCircumferences(period: '1', slug: slug),
));
} catch (e) {
emit(ProfileState.error(errorMessage: e.toString()));
@@ -24,15 +23,18 @@ class ProfileCubit extends Cubit<ProfileState> {
}
}
getMyProfile() async {
getMyProfile({
String period = '1',
}) async {
_currentPeriod = period;
try {
final profile = await profileRepository.getMyProfile();
emit(ProfileState.loaded(
profile: profile,
profileDetails: await profileRepository.getMyProfileDetails(),
blogPosts: await profileRepository.getBlogPostsByAuthorSlug(slug: profile.slug),
weightPoints: await profileRepository.getWeight(period: '1'),
circumferencePoints: await profileRepository.getCircumferences(period: '1'),
weightPoints: await profileRepository.getWeight(period: period),
circumferencePoints: await profileRepository.getCircumferences(period: period),
));
} catch (e) {
emit(ProfileState.error(errorMessage: e.toString()));
@@ -51,7 +53,7 @@ class ProfileCubit extends Cubit<ProfileState> {
waistCircumference: waistCircumference,
hipCircumference: hipCircumference,
);
emit((state as ProfileStateLoaded).copyWith());
await getMyProfile(period: _currentPeriod);
} catch (e) {
emit(ProfileState.error(errorMessage: e.toString()));
print(e);
@@ -63,7 +65,7 @@ class ProfileCubit extends Cubit<ProfileState> {
}) async {
try {
await profileRepository.addWeight(weight: weight);
emit((state as ProfileStateLoaded).copyWith());
await getMyProfile(period: _currentPeriod);
} catch (e) {
emit(ProfileState.error(errorMessage: e.toString()));
print(e);

View File

@@ -16,8 +16,8 @@ abstract class ProfileState with _$ProfileState {
required ProfileModel profile,
required ProfileDetailsModel profileDetails,
required List<FeedBlogPostModel> blogPosts,
required List<WeightModel> weightPoints,
required List<CircumferenceModel> circumferencePoints,
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints,
}) = ProfileStateLoaded;
const factory ProfileState.error({

View File

@@ -24,8 +24,8 @@ mixin _$ProfileState {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)
loaded,
required TResult Function(String errorMessage) error,
}) =>
@@ -38,8 +38,8 @@ mixin _$ProfileState {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)?
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)?
loaded,
TResult? Function(String errorMessage)? error,
}) =>
@@ -52,8 +52,8 @@ mixin _$ProfileState {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)?
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)?
loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
@@ -154,8 +154,8 @@ class _$ProfileStateImpl implements _ProfileState {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)
loaded,
required TResult Function(String errorMessage) error,
}) {
@@ -171,8 +171,8 @@ class _$ProfileStateImpl implements _ProfileState {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)?
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)?
loaded,
TResult? Function(String errorMessage)? error,
}) {
@@ -188,8 +188,8 @@ class _$ProfileStateImpl implements _ProfileState {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)?
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)?
loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
@@ -290,8 +290,8 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)
loaded,
required TResult Function(String errorMessage) error,
}) {
@@ -307,8 +307,8 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)?
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)?
loaded,
TResult? Function(String errorMessage)? error,
}) {
@@ -324,8 +324,8 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)?
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)?
loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
@@ -388,8 +388,8 @@ abstract class _$$ProfileStateLoadedImplCopyWith<$Res> {
{ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints});
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints});
$ProfileModelCopyWith<$Res> get profile;
$ProfileDetailsModelCopyWith<$Res> get profileDetails;
@@ -411,8 +411,8 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res>
Object? profile = null,
Object? profileDetails = null,
Object? blogPosts = null,
Object? weightPoints = null,
Object? circumferencePoints = null,
Object? weightPoints = freezed,
Object? circumferencePoints = freezed,
}) {
return _then(_$ProfileStateLoadedImpl(
profile: null == profile
@@ -427,14 +427,14 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res>
? _value._blogPosts
: blogPosts // ignore: cast_nullable_to_non_nullable
as List<FeedBlogPostModel>,
weightPoints: null == weightPoints
weightPoints: freezed == weightPoints
? _value._weightPoints
: weightPoints // ignore: cast_nullable_to_non_nullable
as List<WeightModel>,
circumferencePoints: null == circumferencePoints
as List<WeightModel>?,
circumferencePoints: freezed == circumferencePoints
? _value._circumferencePoints
: circumferencePoints // ignore: cast_nullable_to_non_nullable
as List<CircumferenceModel>,
as List<CircumferenceModel>?,
));
}
@@ -466,8 +466,8 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
{required this.profile,
required this.profileDetails,
required final List<FeedBlogPostModel> blogPosts,
required final List<WeightModel> weightPoints,
required final List<CircumferenceModel> circumferencePoints})
final List<WeightModel>? weightPoints,
final List<CircumferenceModel>? circumferencePoints})
: _blogPosts = blogPosts,
_weightPoints = weightPoints,
_circumferencePoints = circumferencePoints;
@@ -484,21 +484,25 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
return EqualUnmodifiableListView(_blogPosts);
}
final List<WeightModel> _weightPoints;
final List<WeightModel>? _weightPoints;
@override
List<WeightModel> get weightPoints {
List<WeightModel>? get weightPoints {
final value = _weightPoints;
if (value == null) return null;
if (_weightPoints is EqualUnmodifiableListView) return _weightPoints;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_weightPoints);
return EqualUnmodifiableListView(value);
}
final List<CircumferenceModel> _circumferencePoints;
final List<CircumferenceModel>? _circumferencePoints;
@override
List<CircumferenceModel> get circumferencePoints {
List<CircumferenceModel>? get circumferencePoints {
final value = _circumferencePoints;
if (value == null) return null;
if (_circumferencePoints is EqualUnmodifiableListView)
return _circumferencePoints;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_circumferencePoints);
return EqualUnmodifiableListView(value);
}
@override
@@ -549,8 +553,8 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)
loaded,
required TResult Function(String errorMessage) error,
}) {
@@ -567,8 +571,8 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)?
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)?
loaded,
TResult? Function(String errorMessage)? error,
}) {
@@ -585,8 +589,8 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)?
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)?
loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
@@ -641,15 +645,15 @@ abstract class ProfileStateLoaded implements ProfileState {
{required final ProfileModel profile,
required final ProfileDetailsModel profileDetails,
required final List<FeedBlogPostModel> blogPosts,
required final List<WeightModel> weightPoints,
required final List<CircumferenceModel> circumferencePoints}) =
final List<WeightModel>? weightPoints,
final List<CircumferenceModel>? circumferencePoints}) =
_$ProfileStateLoadedImpl;
ProfileModel get profile;
ProfileDetailsModel get profileDetails;
List<FeedBlogPostModel> get blogPosts;
List<WeightModel> get weightPoints;
List<CircumferenceModel> get circumferencePoints;
List<WeightModel>? get weightPoints;
List<CircumferenceModel>? get circumferencePoints;
/// Create a copy of ProfileState
/// with the given fields replaced by the non-null parameter values.
@@ -734,8 +738,8 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)
loaded,
required TResult Function(String errorMessage) error,
}) {
@@ -751,8 +755,8 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)?
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)?
loaded,
TResult? Function(String errorMessage)? error,
}) {
@@ -768,8 +772,8 @@ class _$ProfileStateErrorImpl implements ProfileStateError {
ProfileModel profile,
ProfileDetailsModel profileDetails,
List<FeedBlogPostModel> blogPosts,
List<WeightModel> weightPoints,
List<CircumferenceModel> circumferencePoints)?
List<WeightModel>? weightPoints,
List<CircumferenceModel>? circumferencePoints)?
loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),

View File

@@ -30,265 +30,268 @@ class _ProfileScreenState extends State<ProfileScreen> {
List<WeightModel> weightPoints = [];
final List<String> chipsLabelList = ['Вес', 'Замеры', 'ИМТ'];
final List<String> chipsIntervalLabelList = ['1М', '3М', '6М', '1Г', 'ВСЁ ВРЕМЯ'];
final List<String> chipsIntervalList = ['1', '3', '6', '12', 'all'];
int _selectedChipIndex = 0;
int _selectedIntervalChipIndex = 0;
final ProfileCubit profileCubit = sl<ProfileCubit>();
@override
void initState() {
super.initState();
widget.author == null ? profileCubit.getMyProfile() : profileCubit.getProfileBySlug(widget.author!.authorSlug);
}
@override
Widget build(BuildContext context) {
return BlocProvider<ProfileCubit>(
create: (BuildContext context) {
if (widget.author == null)
return sl<ProfileCubit>()..getMyProfile();
else
return sl<ProfileCubit>()..getProfileBySlug(widget.author!.authorSlug);
},
child: BlocBuilder<ProfileCubit, ProfileState>(
builder: (BuildContext context, ProfileState state) {
if (state is ProfileStateLoaded) {
circumferencePoints = state.circumferencePoints;
weightPoints = state.weightPoints;
return Scaffold(
backgroundColor: Colors.grey.shade200,
appBar: widget.author == null ? AppBar(toolbarHeight: 0) : AppBar(),
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.vertical(
bottom: Radius.circular(16),
),
return BlocBuilder<ProfileCubit, ProfileState>(
bloc: profileCubit,
builder: (BuildContext context, ProfileState state) {
if (state is ProfileStateLoaded) {
if (state.circumferencePoints != null) {
circumferencePoints = state.circumferencePoints!;
weightPoints = state.weightPoints!;
}
return Scaffold(
backgroundColor: Colors.grey.shade200,
appBar: widget.author == null ? AppBar(toolbarHeight: 0) : AppBar(),
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.vertical(
bottom: Radius.circular(16),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16),
child: Row(
children: [
CircleAvatar(
radius: 32,
backgroundImage: NetworkImage(state.profile.profilePhotoUrl),
),
const SizedBox(width: 12),
Text(
state.profile.name,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.w500,
height: 1,
),
),
const Spacer(),
Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
child: SvgPicture.asset(
height: 28,
width: 28,
'assets/icons/subscribers.svg',
colorFilter: ColorFilter.mode(appTheme.blueA400, BlendMode.srcIn),
),
),
SizedBox(width: 8),
Column(
children: [
Text(
'123',
style: TextStyle(
height: 1,
fontSize: 18,
fontWeight: FontWeight.w500,
color: Colors.black87,
),
),
Text(
'Подписчика',
style: TextStyle(
height: 1,
fontSize: 12,
fontWeight: FontWeight.w400,
color: Colors.black38,
),
),
],
),
],
),
GestureDetector(
onTap: () => Share.shareUri(
Uri.parse(
baseUrl + '/ru/profile/' + state.profile.slug,
),
),
child: Container(
padding: EdgeInsets.only(left: 16),
child: SvgPicture.asset(
height: 24,
width: 24,
'assets/icons/share.svg',
colorFilter: ColorFilter.mode(appTheme.blueA400, BlendMode.srcIn),
),
),
),
],
),
),
if (state.profileDetails.additionalInfo.isNotEmpty)
Container(
alignment: Alignment.centerLeft,
padding: const EdgeInsets.all(16),
child: Text(
state.profileDetails.additionalInfo,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16),
child: Row(
children: [
CircleAvatar(
radius: 32,
backgroundImage: NetworkImage(state.profile.profilePhotoUrl),
),
const SizedBox(width: 12),
Text(
state.profile.name,
style: TextStyle(
color: Colors.black.withOpacity(0.4),
color: Colors.black,
fontWeight: FontWeight.w500,
height: 1,
),
),
),
if (widget.author != null) const SizedBox(height: 8),
if (widget.author != null)
Row(
children: [
SizedBox(width: 16),
GestureDetector(
onTap: () => GoRouter.of(context).pushNamed(
'chatScreen',
const Spacer(),
Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
child: SvgPicture.asset(
height: 28,
width: 28,
'assets/icons/subscribers.svg',
colorFilter: ColorFilter.mode(appTheme.blueA400, BlendMode.srcIn),
),
),
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.all(8),
width: (MediaQuery.of(context).size.width - 40) / 2,
decoration: BoxDecoration(
color: appTheme.blueA400.withOpacity(0.1),
borderRadius: BorderRadius.circular(16),
),
child: Text(
'Сообщение',
style: TextStyle(
color: appTheme.blueA400,
SizedBox(width: 8),
Column(
children: [
Text(
'123',
style: TextStyle(
height: 1,
fontSize: 18,
fontWeight: FontWeight.w500,
color: Colors.black87,
),
),
),
Text(
'Подписчика',
style: TextStyle(
height: 1,
fontSize: 12,
fontWeight: FontWeight.w400,
color: Colors.black38,
),
),
],
),
],
),
GestureDetector(
onTap: () => Share.shareUri(
Uri.parse(
baseUrl + '/ru/profile/' + state.profile.slug,
),
),
SizedBox(width: 8),
Container(
child: Container(
padding: EdgeInsets.only(left: 16),
child: SvgPicture.asset(
height: 24,
width: 24,
'assets/icons/share.svg',
colorFilter: ColorFilter.mode(appTheme.blueA400, BlendMode.srcIn),
),
),
),
],
),
),
if (state.profileDetails.additionalInfo.isNotEmpty)
Container(
alignment: Alignment.centerLeft,
padding: const EdgeInsets.all(16),
child: Text(
state.profileDetails.additionalInfo,
style: TextStyle(
color: Colors.black.withOpacity(0.4),
height: 1,
),
),
),
if (widget.author != null) const SizedBox(height: 8),
if (widget.author != null)
Row(
children: [
SizedBox(width: 16),
GestureDetector(
onTap: () => GoRouter.of(context).pushNamed(
'chatScreen',
),
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.all(8),
width: (MediaQuery.of(context).size.width - 40) / 2,
decoration: BoxDecoration(
color: appTheme.blueA400,
color: appTheme.blueA400.withOpacity(0.1),
borderRadius: BorderRadius.circular(16),
),
child: Text(
'Подписаться',
'Сообщение',
style: TextStyle(
color: Colors.white,
color: appTheme.blueA400,
),
),
),
SizedBox(width: 16),
],
),
if (widget.author != null) SizedBox(height: 16),
if (widget.author == null) _divider(context),
if (widget.author == null)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 8),
SingleChildScrollView(
padding: EdgeInsets.symmetric(horizontal: 16),
scrollDirection: Axis.horizontal,
child: Row(
children: [
_choiceChipWidget(0),
SizedBox(width: 8),
_choiceChipWidget(1),
SizedBox(width: 8),
_choiceChipWidget(2),
],
),
SizedBox(width: 8),
Container(
alignment: Alignment.center,
padding: EdgeInsets.all(8),
width: (MediaQuery.of(context).size.width - 40) / 2,
decoration: BoxDecoration(
color: appTheme.blueA400,
borderRadius: BorderRadius.circular(16),
),
child: Text(
'Подписаться',
style: TextStyle(
color: Colors.white,
),
),
Builder(
builder: (context) {
switch (_selectedChipIndex) {
case 0:
return WeightChartWidget(
weightPoints: weightPoints,
profileCubit: context.read<ProfileCubit>(),
);
case 1:
return CircumferenceChartWidget(
circumferencePoints: circumferencePoints,
profileCubit: context.read<ProfileCubit>(),
);
case 2:
return ImtChartWidget(
weightPoints: weightPoints,
);
}
return SizedBox.shrink();
},
),
SizedBox(height: 8),
Row(
),
SizedBox(width: 16),
],
),
if (widget.author != null) SizedBox(height: 16),
if (widget.author == null) _divider(context),
if (widget.author == null)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 8),
SingleChildScrollView(
padding: EdgeInsets.symmetric(horizontal: 16),
scrollDirection: Axis.horizontal,
child: Row(
children: [
SizedBox(width: 16),
_choiceIntervalChipWidget(0),
_choiceChipWidget(0),
SizedBox(width: 8),
_choiceIntervalChipWidget(1),
_choiceChipWidget(1),
SizedBox(width: 8),
_choiceIntervalChipWidget(2),
SizedBox(width: 8),
_choiceIntervalChipWidget(3),
SizedBox(width: 8),
_choiceIntervalChipWidget(4),
_choiceChipWidget(2),
],
),
SizedBox(height: 8),
],
),
],
),
),
Builder(
builder: (context) {
switch (_selectedChipIndex) {
case 0:
return WeightChartWidget(
weightPoints: weightPoints,
profileCubit: profileCubit,
);
case 1:
return CircumferenceChartWidget(
circumferencePoints: circumferencePoints,
profileCubit: profileCubit,
);
case 2:
return ImtChartWidget(
weightPoints: weightPoints,
);
}
return SizedBox.shrink();
},
),
SizedBox(height: 8),
Row(
children: [
SizedBox(width: 16),
_choiceIntervalChipWidget(0),
SizedBox(width: 8),
_choiceIntervalChipWidget(1),
SizedBox(width: 8),
_choiceIntervalChipWidget(2),
SizedBox(width: 8),
_choiceIntervalChipWidget(3),
SizedBox(width: 8),
_choiceIntervalChipWidget(4),
],
),
SizedBox(height: 8),
],
),
],
),
SizedBox(height: 16),
ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) => BlogPostWidget(feedBlogPostModel: state.blogPosts[index]),
separatorBuilder: (context, index) => SizedBox(height: 8),
itemCount: state.blogPosts.length,
),
SizedBox(height: 16),
],
),
),
SizedBox(height: 16),
ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) => BlogPostWidget(feedBlogPostModel: state.blogPosts[index]),
separatorBuilder: (context, index) => SizedBox(height: 8),
itemCount: state.blogPosts.length,
),
SizedBox(height: 16),
],
),
);
} else if (state is ProfileStateError) {
return Scaffold(
appBar: AppBar(),
body: Center(
child: Padding(
padding: const EdgeInsets.all(16),
child: Text(state.errorMessage),
),
),
);
} else if (state is ProfileStateError) {
return Scaffold(
appBar: AppBar(),
body: Center(
child: Padding(
padding: const EdgeInsets.all(16),
child: Text(state.errorMessage),
),
);
} else {
return Scaffold(
appBar: AppBar(),
body: Center(
child: CircularProgressIndicator(),
),
);
}
},
),
),
);
} else {
return Scaffold(
appBar: AppBar(),
body: Center(
child: CircularProgressIndicator(),
),
);
}
},
);
}
@@ -321,6 +324,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
selected: _selectedIntervalChipIndex == index,
onSelected: (bool selected) {
profileCubit.getMyProfile(period: chipsIntervalList[index]);
setState(() {
_selectedIntervalChipIndex = index;
});

View File

@@ -54,68 +54,73 @@ class _WeightChartWidgetState extends State<WeightChartWidget> {
color: Colors.black12,
),
),
if (widget.weightPoints.length > 1) widget.weightPoints.last.weight > widget.weightPoints[widget.weightPoints.length - 2].weight
? Icon(
Icons.arrow_drop_up,
size: 40,
color: Colors.grey.withOpacity(0.4),
)
: Icon(
Icons.arrow_drop_down,
size: 40,
color: Colors.grey.withOpacity(0.4),
),
if (widget.weightPoints.length > 1)
widget.weightPoints.last.weight > widget.weightPoints[widget.weightPoints.length - 2].weight
? Icon(
Icons.arrow_drop_up,
size: 40,
color: Colors.grey.withOpacity(0.4),
)
: Icon(
Icons.arrow_drop_down,
size: 40,
color: Colors.grey.withOpacity(0.4),
),
],
),
),
Stack(
alignment: Alignment.bottomRight,
children: [
SfCartesianChart(
margin: EdgeInsets.symmetric(horizontal: 8),
enableAxisAnimation: true,
plotAreaBorderWidth: 0,
trackballBehavior: TrackballBehavior(
enable: true,
activationMode: ActivationMode.singleTap,
tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
tooltipSettings: InteractiveTooltip(),
lineType: TrackballLineType.vertical,
),
primaryXAxis: DateTimeCategoryAxis(
tickPosition: TickPosition.inside,
majorTickLines: MajorTickLines(
size: 0,
),
edgeLabelPlacement: EdgeLabelPlacement.shift,
dateFormat: DateFormat.MMMd('ru'),
labelStyle: TextStyle(
color: Colors.grey,
),
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
axisLine: AxisLine(
color: Colors.grey.withOpacity(0.3),
width: 0.4,
),
),
primaryYAxis: NumericAxis(
isVisible: false,
labelFormat: '{value} кг',
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey),
axisLine: AxisLine(
width: 1,
),
majorTickLines: MajorTickLines(size: 0),
),
series: _getSplineSeries(),
tooltipBehavior: TooltipBehavior(enable: true),
SfCartesianChart(
margin: EdgeInsets.symmetric(horizontal: 8),
enableAxisAnimation: true,
plotAreaBorderWidth: 0,
trackballBehavior: TrackballBehavior(
enable: true,
activationMode: ActivationMode.singleTap,
tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
tooltipSettings: InteractiveTooltip(),
lineType: TrackballLineType.vertical,
),
primaryXAxis: DateTimeCategoryAxis(
tickPosition: TickPosition.inside,
majorTickLines: MajorTickLines(
size: 0,
),
edgeLabelPlacement: EdgeLabelPlacement.shift,
dateFormat: DateFormat.MMMd('ru'),
labelStyle: TextStyle(
color: Colors.grey,
),
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey.withOpacity(0.3)),
axisLine: AxisLine(
color: Colors.grey.withOpacity(0.3),
width: 0.4,
),
),
primaryYAxis: NumericAxis(
isVisible: false,
labelFormat: '{value} кг',
majorGridLines: MajorGridLines(dashArray: [1], color: Colors.grey),
axisLine: AxisLine(
width: 1,
),
majorTickLines: MajorTickLines(size: 0),
),
series: _getSplineSeries(),
tooltipBehavior: TooltipBehavior(enable: true),
),
FloatingActionButton.small(
heroTag: 'addWeight',
onPressed: () {
if (widget.weightPoints.isNotEmpty) {
weightKilo = int.parse(widget.weightPoints.last.weight.toString().split('.')[0]);
weightGrams = int.parse(widget.weightPoints.last.weight.toString().split('.')[1][0]);
try {
weightKilo = int.parse(widget.weightPoints.last.weight.toString().split('.')[0]);
weightGrams = int.parse(widget.weightPoints.last.weight.toString().split('.')[1][0]);
} catch (e) {
weightGrams = 0;
}
weightKiloController = FixedExtentScrollController(initialItem: weightKilo - 20);
weightGramsController = FixedExtentScrollController(initialItem: weightGrams);
} else {
@@ -192,7 +197,7 @@ class _WeightChartWidgetState extends State<WeightChartWidget> {
},
);
},
backgroundColor: Colors.red,
backgroundColor: appTheme.blueA400,
shape: CircleBorder(),
child: Icon(
Icons.add,

View File

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

View File

@@ -3,6 +3,7 @@ import 'package:eatvio_app/features/recipes/models/step.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'recipe_model.freezed.dart';
part 'recipe_model.g.dart';
@freezed

View File

@@ -22,8 +22,10 @@ RecipeTagModel _$RecipeTagModelFromJson(Map<String, dynamic> json) {
mixin _$RecipeTagModel {
@JsonKey(name: "data")
List<RecipeTag> 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 _$RecipeTagModel {
/// Create a copy of RecipeTagModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$RecipeTagModelCopyWith<RecipeTagModel> get copyWith =>
throw _privateConstructorUsedError;
$RecipeTagModelCopyWith<RecipeTagModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $RecipeTagModelCopyWith<$Res> {
factory $RecipeTagModelCopyWith(
RecipeTagModel value, $Res Function(RecipeTagModel) then) =
_$RecipeTagModelCopyWithImpl<$Res, RecipeTagModel>;
factory $RecipeTagModelCopyWith(RecipeTagModel value, $Res Function(RecipeTagModel) then) = _$RecipeTagModelCopyWithImpl<$Res, RecipeTagModel>;
@useResult
$Res call(
{@JsonKey(name: "data") List<RecipeTag> data,
@JsonKey(name: "links") Links links,
@JsonKey(name: "meta") Meta meta});
$Res call({@JsonKey(name: "data") List<RecipeTag> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
$LinksCopyWith<$Res> get links;
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel>
implements $RecipeTagModelCopyWith<$Res> {
class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel> implements $RecipeTagModelCopyWith<$Res> {
_$RecipeTagModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -109,31 +107,23 @@ class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel>
}
/// @nodoc
abstract class _$$RecipeTagModelImplCopyWith<$Res>
implements $RecipeTagModelCopyWith<$Res> {
factory _$$RecipeTagModelImplCopyWith(_$RecipeTagModelImpl value,
$Res Function(_$RecipeTagModelImpl) then) =
__$$RecipeTagModelImplCopyWithImpl<$Res>;
abstract class _$$RecipeTagModelImplCopyWith<$Res> implements $RecipeTagModelCopyWith<$Res> {
factory _$$RecipeTagModelImplCopyWith(_$RecipeTagModelImpl value, $Res Function(_$RecipeTagModelImpl) then) = __$$RecipeTagModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: "data") List<RecipeTag> data,
@JsonKey(name: "links") Links links,
@JsonKey(name: "meta") Meta meta});
$Res call({@JsonKey(name: "data") List<RecipeTag> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
@override
$LinksCopyWith<$Res> get links;
@override
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class __$$RecipeTagModelImplCopyWithImpl<$Res>
extends _$RecipeTagModelCopyWithImpl<$Res, _$RecipeTagModelImpl>
implements _$$RecipeTagModelImplCopyWith<$Res> {
__$$RecipeTagModelImplCopyWithImpl(
_$RecipeTagModelImpl _value, $Res Function(_$RecipeTagModelImpl) _then)
: super(_value, _then);
class __$$RecipeTagModelImplCopyWithImpl<$Res> extends _$RecipeTagModelCopyWithImpl<$Res, _$RecipeTagModelImpl> implements _$$RecipeTagModelImplCopyWith<$Res> {
__$$RecipeTagModelImplCopyWithImpl(_$RecipeTagModelImpl _value, $Res Function(_$RecipeTagModelImpl) _then) : super(_value, _then);
/// Create a copy of RecipeTagModel
/// with the given fields replaced by the non-null parameter values.
@@ -165,15 +155,13 @@ class __$$RecipeTagModelImplCopyWithImpl<$Res>
@JsonSerializable()
class _$RecipeTagModelImpl implements _RecipeTagModel {
const _$RecipeTagModelImpl(
{@JsonKey(name: "data") required final List<RecipeTag> data,
@JsonKey(name: "links") required this.links,
@JsonKey(name: "meta") required this.meta})
{@JsonKey(name: "data") required final List<RecipeTag> data, @JsonKey(name: "links") required this.links, @JsonKey(name: "meta") required this.meta})
: _data = data;
factory _$RecipeTagModelImpl.fromJson(Map<String, dynamic> json) =>
_$$RecipeTagModelImplFromJson(json);
factory _$RecipeTagModelImpl.fromJson(Map<String, dynamic> json) => _$$RecipeTagModelImplFromJson(json);
final List<RecipeTag> _data;
@override
@JsonKey(name: "data")
List<RecipeTag> get data {
@@ -206,17 +194,14 @@ class _$RecipeTagModelImpl implements _RecipeTagModel {
@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 RecipeTagModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith =>
__$$RecipeTagModelImplCopyWithImpl<_$RecipeTagModelImpl>(
this, _$identity);
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith => __$$RecipeTagModelImplCopyWithImpl<_$RecipeTagModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -232,15 +217,16 @@ abstract class _RecipeTagModel implements RecipeTagModel {
@JsonKey(name: "links") required final Links links,
@JsonKey(name: "meta") required final Meta meta}) = _$RecipeTagModelImpl;
factory _RecipeTagModel.fromJson(Map<String, dynamic> json) =
_$RecipeTagModelImpl.fromJson;
factory _RecipeTagModel.fromJson(Map<String, dynamic> json) = _$RecipeTagModelImpl.fromJson;
@override
@JsonKey(name: "data")
List<RecipeTag> get data;
@override
@JsonKey(name: "links")
Links get links;
@override
@JsonKey(name: "meta")
Meta get meta;
@@ -249,8 +235,7 @@ abstract class _RecipeTagModel implements RecipeTagModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith => throw _privateConstructorUsedError;
}
RecipeTag _$RecipeTagFromJson(Map<String, dynamic> json) {
@@ -261,12 +246,16 @@ RecipeTag _$RecipeTagFromJson(Map<String, dynamic> json) {
mixin _$RecipeTag {
@JsonKey(name: "id")
int get id => throw _privateConstructorUsedError;
@JsonKey(name: "name")
String get name => throw _privateConstructorUsedError;
@JsonKey(name: "recipes_count")
int get recipesCount => throw _privateConstructorUsedError;
@JsonKey(name: "created_at")
DateTime get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
DateTime get updatedAt => throw _privateConstructorUsedError;
@@ -276,14 +265,13 @@ mixin _$RecipeTag {
/// Create a copy of RecipeTag
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$RecipeTagCopyWith<RecipeTag> get copyWith =>
throw _privateConstructorUsedError;
$RecipeTagCopyWith<RecipeTag> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $RecipeTagCopyWith<$Res> {
factory $RecipeTagCopyWith(RecipeTag value, $Res Function(RecipeTag) then) =
_$RecipeTagCopyWithImpl<$Res, RecipeTag>;
factory $RecipeTagCopyWith(RecipeTag value, $Res Function(RecipeTag) then) = _$RecipeTagCopyWithImpl<$Res, RecipeTag>;
@useResult
$Res call(
{@JsonKey(name: "id") int id,
@@ -294,12 +282,12 @@ abstract class $RecipeTagCopyWith<$Res> {
}
/// @nodoc
class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag>
implements $RecipeTagCopyWith<$Res> {
class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag> implements $RecipeTagCopyWith<$Res> {
_$RecipeTagCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -340,11 +328,9 @@ class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag>
}
/// @nodoc
abstract class _$$RecipeTagImplCopyWith<$Res>
implements $RecipeTagCopyWith<$Res> {
factory _$$RecipeTagImplCopyWith(
_$RecipeTagImpl value, $Res Function(_$RecipeTagImpl) then) =
__$$RecipeTagImplCopyWithImpl<$Res>;
abstract class _$$RecipeTagImplCopyWith<$Res> implements $RecipeTagCopyWith<$Res> {
factory _$$RecipeTagImplCopyWith(_$RecipeTagImpl value, $Res Function(_$RecipeTagImpl) then) = __$$RecipeTagImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -356,12 +342,8 @@ abstract class _$$RecipeTagImplCopyWith<$Res>
}
/// @nodoc
class __$$RecipeTagImplCopyWithImpl<$Res>
extends _$RecipeTagCopyWithImpl<$Res, _$RecipeTagImpl>
implements _$$RecipeTagImplCopyWith<$Res> {
__$$RecipeTagImplCopyWithImpl(
_$RecipeTagImpl _value, $Res Function(_$RecipeTagImpl) _then)
: super(_value, _then);
class __$$RecipeTagImplCopyWithImpl<$Res> extends _$RecipeTagCopyWithImpl<$Res, _$RecipeTagImpl> implements _$$RecipeTagImplCopyWith<$Res> {
__$$RecipeTagImplCopyWithImpl(_$RecipeTagImpl _value, $Res Function(_$RecipeTagImpl) _then) : super(_value, _then);
/// Create a copy of RecipeTag
/// with the given fields replaced by the non-null parameter values.
@@ -409,8 +391,7 @@ class _$RecipeTagImpl implements _RecipeTag {
@JsonKey(name: "created_at") required this.createdAt,
@JsonKey(name: "updated_at") required this.updatedAt});
factory _$RecipeTagImpl.fromJson(Map<String, dynamic> json) =>
_$$RecipeTagImplFromJson(json);
factory _$RecipeTagImpl.fromJson(Map<String, dynamic> json) => _$$RecipeTagImplFromJson(json);
@override
@JsonKey(name: "id")
@@ -440,26 +421,21 @@ class _$RecipeTagImpl implements _RecipeTag {
other is _$RecipeTagImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.recipesCount, recipesCount) ||
other.recipesCount == recipesCount) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt));
(identical(other.recipesCount, recipesCount) || other.recipesCount == recipesCount) &&
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode =>
Object.hash(runtimeType, id, name, recipesCount, createdAt, updatedAt);
int get hashCode => Object.hash(runtimeType, id, name, recipesCount, createdAt, updatedAt);
/// Create a copy of RecipeTag
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith =>
__$$RecipeTagImplCopyWithImpl<_$RecipeTagImpl>(this, _$identity);
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith => __$$RecipeTagImplCopyWithImpl<_$RecipeTagImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -471,28 +447,30 @@ class _$RecipeTagImpl implements _RecipeTag {
abstract class _RecipeTag implements RecipeTag {
const factory _RecipeTag(
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "name") required final String name,
@JsonKey(name: "recipes_count") required final int recipesCount,
@JsonKey(name: "created_at") required final DateTime createdAt,
@JsonKey(name: "updated_at") required final DateTime updatedAt}) =
_$RecipeTagImpl;
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "name") required final String name,
@JsonKey(name: "recipes_count") required final int recipesCount,
@JsonKey(name: "created_at") required final DateTime createdAt,
@JsonKey(name: "updated_at") required final DateTime updatedAt}) = _$RecipeTagImpl;
factory _RecipeTag.fromJson(Map<String, dynamic> json) =
_$RecipeTagImpl.fromJson;
factory _RecipeTag.fromJson(Map<String, dynamic> json) = _$RecipeTagImpl.fromJson;
@override
@JsonKey(name: "id")
int get id;
@override
@JsonKey(name: "name")
String get name;
@override
@JsonKey(name: "recipes_count")
int get recipesCount;
@override
@JsonKey(name: "created_at")
DateTime get createdAt;
@override
@JsonKey(name: "updated_at")
DateTime get updatedAt;
@@ -501,6 +479,5 @@ abstract class _RecipeTag implements RecipeTag {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,25 +6,19 @@ part of 'recipe_tag_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$RecipeTagModelImpl _$$RecipeTagModelImplFromJson(Map<String, dynamic> json) =>
_$RecipeTagModelImpl(
data: (json['data'] as List<dynamic>)
.map((e) => RecipeTag.fromJson(e as Map<String, dynamic>))
.toList(),
_$RecipeTagModelImpl _$$RecipeTagModelImplFromJson(Map<String, dynamic> json) => _$RecipeTagModelImpl(
data: (json['data'] as List<dynamic>).map((e) => RecipeTag.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> _$$RecipeTagModelImplToJson(
_$RecipeTagModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$RecipeTagModelImplToJson(_$RecipeTagModelImpl instance) => <String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
};
_$RecipeTagImpl _$$RecipeTagImplFromJson(Map<String, dynamic> json) =>
_$RecipeTagImpl(
_$RecipeTagImpl _$$RecipeTagImplFromJson(Map<String, dynamic> json) => _$RecipeTagImpl(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
recipesCount: (json['recipes_count'] as num).toInt(),
@@ -32,8 +26,7 @@ _$RecipeTagImpl _$$RecipeTagImplFromJson(Map<String, dynamic> json) =>
updatedAt: DateTime.parse(json['updated_at'] as String),
);
Map<String, dynamic> _$$RecipeTagImplToJson(_$RecipeTagImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$RecipeTagImplToJson(_$RecipeTagImpl instance) => <String, dynamic>{
'id': instance.id,
'name': instance.name,
'recipes_count': instance.recipesCount,

View File

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

View File

@@ -21,6 +21,7 @@ LocationModel _$LocationModelFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$LocationModel {
List<String> get locations => throw _privateConstructorUsedError;
@JsonKey(name: 'response_body')
String get responseBody => throw _privateConstructorUsedError;
@@ -30,28 +31,24 @@ mixin _$LocationModel {
/// Create a copy of LocationModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$LocationModelCopyWith<LocationModel> get copyWith =>
throw _privateConstructorUsedError;
$LocationModelCopyWith<LocationModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $LocationModelCopyWith<$Res> {
factory $LocationModelCopyWith(
LocationModel value, $Res Function(LocationModel) then) =
_$LocationModelCopyWithImpl<$Res, LocationModel>;
factory $LocationModelCopyWith(LocationModel value, $Res Function(LocationModel) then) = _$LocationModelCopyWithImpl<$Res, LocationModel>;
@useResult
$Res call(
{List<String> locations,
@JsonKey(name: 'response_body') String responseBody});
$Res call({List<String> locations, @JsonKey(name: 'response_body') String responseBody});
}
/// @nodoc
class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel>
implements $LocationModelCopyWith<$Res> {
class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel> implements $LocationModelCopyWith<$Res> {
_$LocationModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -77,25 +74,17 @@ class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel>
}
/// @nodoc
abstract class _$$LocationModelImplCopyWith<$Res>
implements $LocationModelCopyWith<$Res> {
factory _$$LocationModelImplCopyWith(
_$LocationModelImpl value, $Res Function(_$LocationModelImpl) then) =
__$$LocationModelImplCopyWithImpl<$Res>;
abstract class _$$LocationModelImplCopyWith<$Res> implements $LocationModelCopyWith<$Res> {
factory _$$LocationModelImplCopyWith(_$LocationModelImpl value, $Res Function(_$LocationModelImpl) then) = __$$LocationModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{List<String> locations,
@JsonKey(name: 'response_body') String responseBody});
$Res call({List<String> locations, @JsonKey(name: 'response_body') String responseBody});
}
/// @nodoc
class __$$LocationModelImplCopyWithImpl<$Res>
extends _$LocationModelCopyWithImpl<$Res, _$LocationModelImpl>
implements _$$LocationModelImplCopyWith<$Res> {
__$$LocationModelImplCopyWithImpl(
_$LocationModelImpl _value, $Res Function(_$LocationModelImpl) _then)
: super(_value, _then);
class __$$LocationModelImplCopyWithImpl<$Res> extends _$LocationModelCopyWithImpl<$Res, _$LocationModelImpl> implements _$$LocationModelImplCopyWith<$Res> {
__$$LocationModelImplCopyWithImpl(_$LocationModelImpl _value, $Res Function(_$LocationModelImpl) _then) : super(_value, _then);
/// Create a copy of LocationModel
/// with the given fields replaced by the non-null parameter values.
@@ -121,15 +110,12 @@ class __$$LocationModelImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$LocationModelImpl implements _LocationModel {
const _$LocationModelImpl(
{required final List<String> locations,
@JsonKey(name: 'response_body') required this.responseBody})
: _locations = locations;
const _$LocationModelImpl({required final List<String> locations, @JsonKey(name: 'response_body') required this.responseBody}) : _locations = locations;
factory _$LocationModelImpl.fromJson(Map<String, dynamic> json) =>
_$$LocationModelImplFromJson(json);
factory _$LocationModelImpl.fromJson(Map<String, dynamic> json) => _$$LocationModelImplFromJson(json);
final List<String> _locations;
@override
List<String> get locations {
if (_locations is EqualUnmodifiableListView) return _locations;
@@ -151,24 +137,20 @@ class _$LocationModelImpl implements _LocationModel {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$LocationModelImpl &&
const DeepCollectionEquality()
.equals(other._locations, _locations) &&
(identical(other.responseBody, responseBody) ||
other.responseBody == responseBody));
const DeepCollectionEquality().equals(other._locations, _locations) &&
(identical(other.responseBody, responseBody) || other.responseBody == responseBody));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,
const DeepCollectionEquality().hash(_locations), responseBody);
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_locations), responseBody);
/// Create a copy of LocationModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith =>
__$$LocationModelImplCopyWithImpl<_$LocationModelImpl>(this, _$identity);
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith => __$$LocationModelImplCopyWithImpl<_$LocationModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -179,16 +161,14 @@ class _$LocationModelImpl implements _LocationModel {
}
abstract class _LocationModel implements LocationModel {
const factory _LocationModel(
{required final List<String> locations,
@JsonKey(name: 'response_body') required final String responseBody}) =
const factory _LocationModel({required final List<String> locations, @JsonKey(name: 'response_body') required final String responseBody}) =
_$LocationModelImpl;
factory _LocationModel.fromJson(Map<String, dynamic> json) =
_$LocationModelImpl.fromJson;
factory _LocationModel.fromJson(Map<String, dynamic> json) = _$LocationModelImpl.fromJson;
@override
List<String> get locations;
@override
@JsonKey(name: 'response_body')
String get responseBody;
@@ -197,6 +177,5 @@ abstract class _LocationModel implements LocationModel {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,15 +6,12 @@ part of 'location_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$LocationModelImpl _$$LocationModelImplFromJson(Map<String, dynamic> json) =>
_$LocationModelImpl(
locations:
(json['locations'] as List<dynamic>).map((e) => e as String).toList(),
_$LocationModelImpl _$$LocationModelImplFromJson(Map<String, dynamic> json) => _$LocationModelImpl(
locations: (json['locations'] as List<dynamic>).map((e) => e as String).toList(),
responseBody: json['response_body'] as String,
);
Map<String, dynamic> _$$LocationModelImplToJson(_$LocationModelImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$LocationModelImplToJson(_$LocationModelImpl instance) => <String, dynamic>{
'locations': instance.locations,
'response_body': instance.responseBody,
};

View File

@@ -14,8 +14,7 @@ T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
UserRegistrationSheet _$UserRegistrationSheetFromJson(
Map<String, dynamic> json) {
UserRegistrationSheet _$UserRegistrationSheetFromJson(Map<String, dynamic> json) {
return _UserRegistrationSheet.fromJson(json);
}
@@ -23,48 +22,74 @@ UserRegistrationSheet _$UserRegistrationSheetFromJson(
mixin _$UserRegistrationSheet {
@JsonKey(name: 'first_name')
String get firstName => throw _privateConstructorUsedError;
@JsonKey(name: 'last_name')
String get lastName => throw _privateConstructorUsedError;
String get email => throw _privateConstructorUsedError;
String get password => throw _privateConstructorUsedError;
@JsonKey(name: 'password_confirmation')
String get passwordConfirmation => throw _privateConstructorUsedError;
@JsonKey(name: 'terms')
String get termsAccepted => throw _privateConstructorUsedError;
String get birthdate => throw _privateConstructorUsedError;
String get gender => throw _privateConstructorUsedError;
String get location => throw _privateConstructorUsedError;
@JsonKey(name: 'response_body')
String get responseBody => throw _privateConstructorUsedError;
String get lang => throw _privateConstructorUsedError;
int get weight => throw _privateConstructorUsedError;
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')
int get hasHypo => throw _privateConstructorUsedError;
@JsonKey(name: 'has_hyper')
int get hasHyper => throw _privateConstructorUsedError;
@JsonKey(name: 'about_alergy')
String get aboutAllergy => 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: 'activity_coefficient')
double get activityCoefficient => throw _privateConstructorUsedError;
@@ -74,15 +99,14 @@ mixin _$UserRegistrationSheet {
/// Create a copy of UserRegistrationSheet
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$UserRegistrationSheetCopyWith<UserRegistrationSheet> get copyWith =>
throw _privateConstructorUsedError;
$UserRegistrationSheetCopyWith<UserRegistrationSheet> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $UserRegistrationSheetCopyWith<$Res> {
factory $UserRegistrationSheetCopyWith(UserRegistrationSheet value,
$Res Function(UserRegistrationSheet) then) =
factory $UserRegistrationSheetCopyWith(UserRegistrationSheet value, $Res Function(UserRegistrationSheet) then) =
_$UserRegistrationSheetCopyWithImpl<$Res, UserRegistrationSheet>;
@useResult
$Res call(
{@JsonKey(name: 'first_name') String firstName,
@@ -115,13 +139,12 @@ abstract class $UserRegistrationSheetCopyWith<$Res> {
}
/// @nodoc
class _$UserRegistrationSheetCopyWithImpl<$Res,
$Val extends UserRegistrationSheet>
implements $UserRegistrationSheetCopyWith<$Res> {
class _$UserRegistrationSheetCopyWithImpl<$Res, $Val extends UserRegistrationSheet> implements $UserRegistrationSheetCopyWith<$Res> {
_$UserRegistrationSheetCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -272,12 +295,10 @@ class _$UserRegistrationSheetCopyWithImpl<$Res,
}
/// @nodoc
abstract class _$$UserRegistrationSheetImplCopyWith<$Res>
implements $UserRegistrationSheetCopyWith<$Res> {
factory _$$UserRegistrationSheetImplCopyWith(
_$UserRegistrationSheetImpl value,
$Res Function(_$UserRegistrationSheetImpl) then) =
abstract class _$$UserRegistrationSheetImplCopyWith<$Res> implements $UserRegistrationSheetCopyWith<$Res> {
factory _$$UserRegistrationSheetImplCopyWith(_$UserRegistrationSheetImpl value, $Res Function(_$UserRegistrationSheetImpl) then) =
__$$UserRegistrationSheetImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@@ -311,13 +332,9 @@ abstract class _$$UserRegistrationSheetImplCopyWith<$Res>
}
/// @nodoc
class __$$UserRegistrationSheetImplCopyWithImpl<$Res>
extends _$UserRegistrationSheetCopyWithImpl<$Res,
_$UserRegistrationSheetImpl>
class __$$UserRegistrationSheetImplCopyWithImpl<$Res> extends _$UserRegistrationSheetCopyWithImpl<$Res, _$UserRegistrationSheetImpl>
implements _$$UserRegistrationSheetImplCopyWith<$Res> {
__$$UserRegistrationSheetImplCopyWithImpl(_$UserRegistrationSheetImpl _value,
$Res Function(_$UserRegistrationSheetImpl) _then)
: super(_value, _then);
__$$UserRegistrationSheetImplCopyWithImpl(_$UserRegistrationSheetImpl _value, $Res Function(_$UserRegistrationSheetImpl) _then) : super(_value, _then);
/// Create a copy of UserRegistrationSheet
/// with the given fields replaced by the non-null parameter values.
@@ -473,8 +490,7 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
@JsonKey(name: 'last_name') required this.lastName,
required this.email,
required this.password,
@JsonKey(name: 'password_confirmation')
required this.passwordConfirmation,
@JsonKey(name: 'password_confirmation') required this.passwordConfirmation,
@JsonKey(name: 'terms') this.termsAccepted = 'accepted',
required this.birthdate,
required this.gender,
@@ -498,8 +514,7 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
@JsonKey(name: 'additional_info') required this.additionalInfo,
@JsonKey(name: 'activity_coefficient') this.activityCoefficient = 1.2});
factory _$UserRegistrationSheetImpl.fromJson(Map<String, dynamic> json) =>
_$$UserRegistrationSheetImplFromJson(json);
factory _$UserRegistrationSheetImpl.fromJson(Map<String, dynamic> json) => _$$UserRegistrationSheetImplFromJson(json);
@override
@JsonKey(name: 'first_name')
@@ -585,54 +600,33 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$UserRegistrationSheetImpl &&
(identical(other.firstName, firstName) ||
other.firstName == firstName) &&
(identical(other.lastName, lastName) ||
other.lastName == lastName) &&
(identical(other.firstName, firstName) || other.firstName == firstName) &&
(identical(other.lastName, lastName) || other.lastName == lastName) &&
(identical(other.email, email) || other.email == email) &&
(identical(other.password, password) ||
other.password == password) &&
(identical(other.passwordConfirmation, passwordConfirmation) ||
other.passwordConfirmation == passwordConfirmation) &&
(identical(other.termsAccepted, termsAccepted) ||
other.termsAccepted == termsAccepted) &&
(identical(other.birthdate, birthdate) ||
other.birthdate == birthdate) &&
(identical(other.password, password) || other.password == password) &&
(identical(other.passwordConfirmation, passwordConfirmation) || other.passwordConfirmation == passwordConfirmation) &&
(identical(other.termsAccepted, termsAccepted) || other.termsAccepted == termsAccepted) &&
(identical(other.birthdate, birthdate) || other.birthdate == birthdate) &&
(identical(other.gender, gender) || other.gender == gender) &&
(identical(other.location, location) ||
other.location == location) &&
(identical(other.responseBody, responseBody) ||
other.responseBody == responseBody) &&
(identical(other.location, location) || other.location == location) &&
(identical(other.responseBody, responseBody) || other.responseBody == responseBody) &&
(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.aboutAllergy, aboutAllergy) ||
other.aboutAllergy == aboutAllergy) &&
(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.activityCoefficient, activityCoefficient) ||
other.activityCoefficient == activityCoefficient));
(identical(other.hasHyper, hasHyper) || other.hasHyper == hasHyper) &&
(identical(other.aboutAllergy, aboutAllergy) || other.aboutAllergy == aboutAllergy) &&
(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.activityCoefficient, activityCoefficient) || other.activityCoefficient == activityCoefficient));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -673,9 +667,8 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
get copyWith => __$$UserRegistrationSheetImplCopyWithImpl<
_$UserRegistrationSheetImpl>(this, _$identity);
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl> get copyWith =>
__$$UserRegistrationSheetImplCopyWithImpl<_$UserRegistrationSheetImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
@@ -691,8 +684,7 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet {
@JsonKey(name: 'last_name') required final String lastName,
required final String email,
required final String password,
@JsonKey(name: 'password_confirmation')
required final String passwordConfirmation,
@JsonKey(name: 'password_confirmation') required final String passwordConfirmation,
@JsonKey(name: 'terms') final String termsAccepted,
required final String birthdate,
required final String gender,
@@ -701,99 +693,119 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet {
required final String lang,
required final int weight,
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 int hasHypo,
@JsonKey(name: 'has_hyper') required final int hasHyper,
@JsonKey(name: 'about_alergy') required final String aboutAllergy,
@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: 'activity_coefficient')
final double activityCoefficient}) = _$UserRegistrationSheetImpl;
@JsonKey(name: 'activity_coefficient') final double activityCoefficient}) = _$UserRegistrationSheetImpl;
factory _UserRegistrationSheet.fromJson(Map<String, dynamic> json) =
_$UserRegistrationSheetImpl.fromJson;
factory _UserRegistrationSheet.fromJson(Map<String, dynamic> json) = _$UserRegistrationSheetImpl.fromJson;
@override
@JsonKey(name: 'first_name')
String get firstName;
@override
@JsonKey(name: 'last_name')
String get lastName;
@override
String get email;
@override
String get password;
@override
@JsonKey(name: 'password_confirmation')
String get passwordConfirmation;
@override
@JsonKey(name: 'terms')
String get termsAccepted;
@override
String get birthdate;
@override
String get gender;
@override
String get location;
@override
@JsonKey(name: 'response_body')
String get responseBody;
@override
String get lang;
@override
int get weight;
@override
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')
int get hasHypo;
@override
@JsonKey(name: 'has_hyper')
int get hasHyper;
@override
@JsonKey(name: 'about_alergy')
String get aboutAllergy;
@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: 'activity_coefficient')
double get activityCoefficient;
@@ -802,6 +814,5 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
get copyWith => throw _privateConstructorUsedError;
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -6,9 +6,7 @@ part of 'user_registration_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson(
Map<String, dynamic> json) =>
_$UserRegistrationSheetImpl(
_$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson(Map<String, dynamic> json) => _$UserRegistrationSheetImpl(
firstName: json['first_name'] as String,
lastName: json['last_name'] as String,
email: json['email'] as String,
@@ -35,13 +33,10 @@ _$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson(
favoriteFoods: json['favorite_foods'] as String,
unfavoriteFoods: json['unfavorite_foods'] as String,
additionalInfo: json['additional_info'] as String,
activityCoefficient:
(json['activity_coefficient'] as num?)?.toDouble() ?? 1.2,
activityCoefficient: (json['activity_coefficient'] as num?)?.toDouble() ?? 1.2,
);
Map<String, dynamic> _$$UserRegistrationSheetImplToJson(
_$UserRegistrationSheetImpl instance) =>
<String, dynamic>{
Map<String, dynamic> _$$UserRegistrationSheetImplToJson(_$UserRegistrationSheetImpl instance) => <String, dynamic>{
'first_name': instance.firstName,
'last_name': instance.lastName,
'email': instance.email,

View File

@@ -21,15 +21,13 @@ mixin _$RegistrationState {
/// Create a copy of RegistrationState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$RegistrationStateCopyWith<RegistrationState> get copyWith =>
throw _privateConstructorUsedError;
$RegistrationStateCopyWith<RegistrationState> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $RegistrationStateCopyWith<$Res> {
factory $RegistrationStateCopyWith(
RegistrationState value, $Res Function(RegistrationState) then) =
_$RegistrationStateCopyWithImpl<$Res, RegistrationState>;
factory $RegistrationStateCopyWith(RegistrationState value, $Res Function(RegistrationState) then) = _$RegistrationStateCopyWithImpl<$Res, RegistrationState>;
@useResult
$Res call({UserRegistrationSheet sheet});
@@ -37,12 +35,12 @@ abstract class $RegistrationStateCopyWith<$Res> {
}
/// @nodoc
class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState>
implements $RegistrationStateCopyWith<$Res> {
class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState> implements $RegistrationStateCopyWith<$Res> {
_$RegistrationStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@@ -73,11 +71,10 @@ class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState>
}
/// @nodoc
abstract class _$$RegistrationStateImplCopyWith<$Res>
implements $RegistrationStateCopyWith<$Res> {
factory _$$RegistrationStateImplCopyWith(_$RegistrationStateImpl value,
$Res Function(_$RegistrationStateImpl) then) =
abstract class _$$RegistrationStateImplCopyWith<$Res> implements $RegistrationStateCopyWith<$Res> {
factory _$$RegistrationStateImplCopyWith(_$RegistrationStateImpl value, $Res Function(_$RegistrationStateImpl) then) =
__$$RegistrationStateImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({UserRegistrationSheet sheet});
@@ -87,12 +84,9 @@ abstract class _$$RegistrationStateImplCopyWith<$Res>
}
/// @nodoc
class __$$RegistrationStateImplCopyWithImpl<$Res>
extends _$RegistrationStateCopyWithImpl<$Res, _$RegistrationStateImpl>
class __$$RegistrationStateImplCopyWithImpl<$Res> extends _$RegistrationStateCopyWithImpl<$Res, _$RegistrationStateImpl>
implements _$$RegistrationStateImplCopyWith<$Res> {
__$$RegistrationStateImplCopyWithImpl(_$RegistrationStateImpl _value,
$Res Function(_$RegistrationStateImpl) _then)
: super(_value, _then);
__$$RegistrationStateImplCopyWithImpl(_$RegistrationStateImpl _value, $Res Function(_$RegistrationStateImpl) _then) : super(_value, _then);
/// Create a copy of RegistrationState
/// with the given fields replaced by the non-null parameter values.
@@ -126,9 +120,7 @@ class _$RegistrationStateImpl implements _RegistrationState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$RegistrationStateImpl &&
(identical(other.sheet, sheet) || other.sheet == sheet));
(other.runtimeType == runtimeType && other is _$RegistrationStateImpl && (identical(other.sheet, sheet) || other.sheet == sheet));
}
@override
@@ -139,14 +131,11 @@ class _$RegistrationStateImpl implements _RegistrationState {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith =>
__$$RegistrationStateImplCopyWithImpl<_$RegistrationStateImpl>(
this, _$identity);
_$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith => __$$RegistrationStateImplCopyWithImpl<_$RegistrationStateImpl>(this, _$identity);
}
abstract class _RegistrationState implements RegistrationState {
const factory _RegistrationState(
{required final UserRegistrationSheet sheet}) = _$RegistrationStateImpl;
const factory _RegistrationState({required final UserRegistrationSheet sheet}) = _$RegistrationStateImpl;
@override
UserRegistrationSheet get sheet;
@@ -155,6 +144,5 @@ abstract class _RegistrationState implements RegistrationState {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith =>
throw _privateConstructorUsedError;
_$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -346,7 +346,7 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
BuildContext context,
) {
final s = S.of(context);
List<String> errors = [];
if (chestCircumference.isEmpty | waistCircumference.isEmpty | hipCircumference.isEmpty) {

View File

@@ -22,8 +22,7 @@ class _RegistrationService implements RegistrationService {
final ParseErrorLogger? errorLogger;
@override
Future<Map<String, String>> register(
{required Map<String, dynamic> sheet}) async {
Future<Map<String, String>> register({required Map<String, dynamic> sheet}) async {
final _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _headers = <String, dynamic>{};
@@ -129,9 +128,7 @@ class _RegistrationService implements RegistrationService {
}
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

@@ -19,6 +19,7 @@ import 'package:intl/src/intl_helpers.dart';
import 'messages_en.dart' as messages_en;
typedef Future<dynamic> LibraryLoader();
Map<String, LibraryLoader> _deferredLibraries = {
'en': () => new SynchronousFuture(null),
};
@@ -34,9 +35,7 @@ MessageLookupByLibrary? _findExact(String localeName) {
/// User programs should call this before using [localeName] for messages.
Future<bool> initializeMessages(String localeName) {
var availableLocale = Intl.verifiedLocale(
localeName, (locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
var availableLocale = Intl.verifiedLocale(localeName, (locale) => _deferredLibraries[locale] != null, onFailure: (_) => null);
if (availableLocale == null) {
return new SynchronousFuture(false);
}
@@ -56,8 +55,7 @@ bool _messagesExistFor(String locale) {
}
MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
var actualLocale =
Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
if (actualLocale == null) return null;
return _findExact(actualLocale);
}

View File

@@ -21,151 +21,101 @@ class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'en';
final messages = _notInlinedMessages(_notInlinedMessages);
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
"Moscow": MessageLookupByLibrary.simpleMessage("Москва"),
"Russia": MessageLookupByLibrary.simpleMessage("Россия"),
"active": MessageLookupByLibrary.simpleMessage("Активен"),
"add_measure": MessageLookupByLibrary.simpleMessage("Добавить замер"),
"additional_information":
MessageLookupByLibrary.simpleMessage("Дополнительная информация"),
"additional_information": MessageLookupByLibrary.simpleMessage("Дополнительная информация"),
"admin": MessageLookupByLibrary.simpleMessage("Админ"),
"allergies_presence":
MessageLookupByLibrary.simpleMessage("Наличие аллергии"),
"allergies_presence": MessageLookupByLibrary.simpleMessage("Наличие аллергии"),
"archived": MessageLookupByLibrary.simpleMessage("В архиве"),
"authentificate": MessageLookupByLibrary.simpleMessage("Войти"),
"average_pressure": MessageLookupByLibrary.simpleMessage(
"Средние показатели давления:"),
"average_pressure": MessageLookupByLibrary.simpleMessage("Средние показатели давления:"),
"bodymass_chart": MessageLookupByLibrary.simpleMessage("График ИМТ"),
"chat": MessageLookupByLibrary.simpleMessage("Чат"),
"chest": MessageLookupByLibrary.simpleMessage("Грудь"),
"chest_circumference":
MessageLookupByLibrary.simpleMessage("Обхват груди"),
"circumference_empty": MessageLookupByLibrary.simpleMessage(
"Все замеры обязательны к заполнению"),
"circumference_is_not_a_number": MessageLookupByLibrary.simpleMessage(
"Все замеры должны быть числами"),
"circumferences_chart":
MessageLookupByLibrary.simpleMessage("График обхватов"),
"chest_circumference": MessageLookupByLibrary.simpleMessage("Обхват груди"),
"circumference_empty": MessageLookupByLibrary.simpleMessage("Все замеры обязательны к заполнению"),
"circumference_is_not_a_number": MessageLookupByLibrary.simpleMessage("Все замеры должны быть числами"),
"circumferences_chart": MessageLookupByLibrary.simpleMessage("График обхватов"),
"city": MessageLookupByLibrary.simpleMessage("Город"),
"city_of_living":
MessageLookupByLibrary.simpleMessage("Город проживания"),
"city_of_living": MessageLookupByLibrary.simpleMessage("Город проживания"),
"continueButton": MessageLookupByLibrary.simpleMessage("Продолжить"),
"country": MessageLookupByLibrary.simpleMessage("Страна"),
"date_of_birth": MessageLookupByLibrary.simpleMessage("Дата рождения"),
"diary": MessageLookupByLibrary.simpleMessage("Дневник"),
"do_you_have_hypertension_tendency":
MessageLookupByLibrary.simpleMessage("Есть ли у вас гипертония?"),
"do_you_have_hypotension_tendency":
MessageLookupByLibrary.simpleMessage("Есть ли у вас гипотония?"),
"do_you_take_pills": MessageLookupByLibrary.simpleMessage(
"Принимаете ли вы лекарства или бады?"),
"down_pressure":
MessageLookupByLibrary.simpleMessage("Нижние показатели давления:"),
"do_you_have_hypertension_tendency": MessageLookupByLibrary.simpleMessage("Есть ли у вас гипертония?"),
"do_you_have_hypotension_tendency": MessageLookupByLibrary.simpleMessage("Есть ли у вас гипотония?"),
"do_you_take_pills": MessageLookupByLibrary.simpleMessage("Принимаете ли вы лекарства или бады?"),
"down_pressure": MessageLookupByLibrary.simpleMessage("Нижние показатели давления:"),
"draft": MessageLookupByLibrary.simpleMessage("Черновик"),
"email": MessageLookupByLibrary.simpleMessage("Элетронная почта"),
"email_empty": MessageLookupByLibrary.simpleMessage(
"Необходимо ввести адрес электронной почты"),
"email_invalid": MessageLookupByLibrary.simpleMessage(
"Некорректный адрес электронной почты"),
"enter_additional_information": MessageLookupByLibrary.simpleMessage(
"Введите любую дополнительную информацию на своё усмотрение:"),
"enter_information":
MessageLookupByLibrary.simpleMessage("Введите информацию..."),
"email_empty": MessageLookupByLibrary.simpleMessage("Необходимо ввести адрес электронной почты"),
"email_invalid": MessageLookupByLibrary.simpleMessage("Некорректный адрес электронной почты"),
"enter_additional_information": MessageLookupByLibrary.simpleMessage("Введите любую дополнительную информацию на своё усмотрение:"),
"enter_information": MessageLookupByLibrary.simpleMessage("Введите информацию..."),
"exit": MessageLookupByLibrary.simpleMessage("Выйти"),
"favorite_foods":
MessageLookupByLibrary.simpleMessage("Любимые продукты"),
"favorite_unfavorite_foods": MessageLookupByLibrary.simpleMessage(
"Ваши любимые/нелюбимые продукты питания?"),
"favorite_foods": MessageLookupByLibrary.simpleMessage("Любимые продукты"),
"favorite_unfavorite_foods": MessageLookupByLibrary.simpleMessage("Ваши любимые/нелюбимые продукты питания?"),
"female": MessageLookupByLibrary.simpleMessage("Женский"),
"fill_in_information":
MessageLookupByLibrary.simpleMessage("Заполните информацию:"),
"fill_in_information": MessageLookupByLibrary.simpleMessage("Заполните информацию:"),
"finish": MessageLookupByLibrary.simpleMessage("Завершить"),
"first_name": MessageLookupByLibrary.simpleMessage("Имя"),
"first_name_empty": MessageLookupByLibrary.simpleMessage(
"Имя обязательно для заполнения"),
"first_name_short": MessageLookupByLibrary.simpleMessage(
"В имени должен быть минимум 1 символ"),
"first_name_empty": MessageLookupByLibrary.simpleMessage("Имя обязательно для заполнения"),
"first_name_short": MessageLookupByLibrary.simpleMessage("В имени должен быть минимум 1 символ"),
"gr": MessageLookupByLibrary.simpleMessage("гр"),
"grams": MessageLookupByLibrary.simpleMessage("гр"),
"height_measurements":
MessageLookupByLibrary.simpleMessage("Замер роста"),
"hip_circumference":
MessageLookupByLibrary.simpleMessage("Обхват бедер"),
"height_measurements": MessageLookupByLibrary.simpleMessage("Замер роста"),
"hip_circumference": MessageLookupByLibrary.simpleMessage("Обхват бедер"),
"hips": MessageLookupByLibrary.simpleMessage("Бедра"),
"in_progress": MessageLookupByLibrary.simpleMessage("В процессе"),
"initial_measurements":
MessageLookupByLibrary.simpleMessage("Первичные замеры"),
"initial_measurements": MessageLookupByLibrary.simpleMessage("Первичные замеры"),
"language": MessageLookupByLibrary.simpleMessage("Язык:"),
"last_name": MessageLookupByLibrary.simpleMessage("Фамилия"),
"last_name_empty": MessageLookupByLibrary.simpleMessage(
"Фамилия обязательна для заполнения"),
"last_name_short": MessageLookupByLibrary.simpleMessage(
"В фамилии должен быть минимум 6 символов"),
"last_name_empty": MessageLookupByLibrary.simpleMessage("Фамилия обязательна для заполнения"),
"last_name_short": MessageLookupByLibrary.simpleMessage("В фамилии должен быть минимум 6 символов"),
"lbl_english": MessageLookupByLibrary.simpleMessage("English"),
"loading": MessageLookupByLibrary.simpleMessage("Загрузка..."),
"male": MessageLookupByLibrary.simpleMessage("Мужской"),
"msg_network_err":
MessageLookupByLibrary.simpleMessage("Сетевая ошибка!"),
"msg_something_went_wrong":
MessageLookupByLibrary.simpleMessage("Что то пошло не так!"),
"msg_network_err": MessageLookupByLibrary.simpleMessage("Сетевая ошибка!"),
"msg_something_went_wrong": MessageLookupByLibrary.simpleMessage("Что то пошло не так!"),
"my_blog": MessageLookupByLibrary.simpleMessage("Мой блог"),
"my_settings": MessageLookupByLibrary.simpleMessage("Мои настройки"),
"name_empty": MessageLookupByLibrary.simpleMessage(
"Имя пользователя обязательно для заполнения"),
"name_short": MessageLookupByLibrary.simpleMessage(
"В имени пользователя должно быть минимум 6 символов"),
"name_empty": MessageLookupByLibrary.simpleMessage("Имя пользователя обязательно для заполнения"),
"name_short": MessageLookupByLibrary.simpleMessage("В имени пользователя должно быть минимум 6 символов"),
"no": MessageLookupByLibrary.simpleMessage("Нет"),
"no_account":
MessageLookupByLibrary.simpleMessage("У меня нет аккаунта"),
"no_account": MessageLookupByLibrary.simpleMessage("У меня нет аккаунта"),
"password": MessageLookupByLibrary.simpleMessage("Пароль"),
"password_confirmation":
MessageLookupByLibrary.simpleMessage("Подтвердите пароль"),
"password_confirmation_mismatch":
MessageLookupByLibrary.simpleMessage("Пароли не совпадают"),
"password_empty": MessageLookupByLibrary.simpleMessage(
"Пароль обязателен для заполнения"),
"password_short": MessageLookupByLibrary.simpleMessage(
"В пароле должно быть минимум 6 символов"),
"password_confirmation": MessageLookupByLibrary.simpleMessage("Подтвердите пароль"),
"password_confirmation_mismatch": MessageLookupByLibrary.simpleMessage("Пароли не совпадают"),
"password_empty": MessageLookupByLibrary.simpleMessage("Пароль обязателен для заполнения"),
"password_short": MessageLookupByLibrary.simpleMessage("В пароле должно быть минимум 6 символов"),
"pcs": MessageLookupByLibrary.simpleMessage("шт"),
"place_of_living":
MessageLookupByLibrary.simpleMessage("Место проживания"),
"plans_complete":
MessageLookupByLibrary.simpleMessage("Пройденные планы"),
"preferred_language":
MessageLookupByLibrary.simpleMessage("Предпочитаемый язык общения"),
"pressure_empty": MessageLookupByLibrary.simpleMessage(
"Все показатели давления обязательны к заполнению"),
"pressure_is_not_a_number": MessageLookupByLibrary.simpleMessage(
"Все показатели давления должны быть числами"),
"place_of_living": MessageLookupByLibrary.simpleMessage("Место проживания"),
"plans_complete": MessageLookupByLibrary.simpleMessage("Пройденные планы"),
"preferred_language": MessageLookupByLibrary.simpleMessage("Предпочитаемый язык общения"),
"pressure_empty": MessageLookupByLibrary.simpleMessage("Все показатели давления обязательны к заполнению"),
"pressure_is_not_a_number": MessageLookupByLibrary.simpleMessage("Все показатели давления должны быть числами"),
"profile": MessageLookupByLibrary.simpleMessage("Профиль"),
"save": MessageLookupByLibrary.simpleMessage("Сохранить"),
"skip": MessageLookupByLibrary.simpleMessage("Пропустить"),
"tell_your_schedule": MessageLookupByLibrary.simpleMessage(
"Расскажите в свободной форме о том как просыпаетесь, когда едите, когда ложитесь спать:"),
"unfavorite_foods":
MessageLookupByLibrary.simpleMessage("Нелюбимые продукты"),
"up_pressure": MessageLookupByLibrary.simpleMessage(
"Верхние показатели давления:"),
"user_authorization":
MessageLookupByLibrary.simpleMessage("Аутентификация"),
"user_registration":
MessageLookupByLibrary.simpleMessage("Регистрация пользователя"),
"tell_your_schedule": MessageLookupByLibrary.simpleMessage("Расскажите в свободной форме о том как просыпаетесь, когда едите, когда ложитесь спать:"),
"unfavorite_foods": MessageLookupByLibrary.simpleMessage("Нелюбимые продукты"),
"up_pressure": MessageLookupByLibrary.simpleMessage("Верхние показатели давления:"),
"user_authorization": MessageLookupByLibrary.simpleMessage("Аутентификация"),
"user_registration": MessageLookupByLibrary.simpleMessage("Регистрация пользователя"),
"username": MessageLookupByLibrary.simpleMessage("Имя пользователя"),
"waist": MessageLookupByLibrary.simpleMessage("Талия"),
"waist_circumference":
MessageLookupByLibrary.simpleMessage("Обхват талии"),
"waist_circumference": MessageLookupByLibrary.simpleMessage("Обхват талии"),
"weight": MessageLookupByLibrary.simpleMessage("Вес"),
"weight_chart": MessageLookupByLibrary.simpleMessage("График веса"),
"weight_measurements":
MessageLookupByLibrary.simpleMessage("Замер веса"),
"what_is_your_name":
MessageLookupByLibrary.simpleMessage("Как вас зовут?"),
"wrong_credentials": MessageLookupByLibrary.simpleMessage(
"Неверные данные пользователя"),
"your_blood_pressure":
MessageLookupByLibrary.simpleMessage("Ваше артериальное давление?"),
"your_favorite_sports":
MessageLookupByLibrary.simpleMessage("Ваши спортивные увлечения?"),
"weight_measurements": MessageLookupByLibrary.simpleMessage("Замер веса"),
"what_is_your_name": MessageLookupByLibrary.simpleMessage("Как вас зовут?"),
"wrong_credentials": MessageLookupByLibrary.simpleMessage("Неверные данные пользователя"),
"your_blood_pressure": MessageLookupByLibrary.simpleMessage("Ваше артериальное давление?"),
"your_favorite_sports": MessageLookupByLibrary.simpleMessage("Ваши спортивные увлечения?"),
"your_gender": MessageLookupByLibrary.simpleMessage("Ваш пол?"),
"your_height": MessageLookupByLibrary.simpleMessage("Ваш рост:"),
"your_schedule": MessageLookupByLibrary.simpleMessage("Ваш режим дня?"),

View File

@@ -18,17 +18,14 @@ class S {
static S? _current;
static S get current {
assert(_current != null,
'No instance of S was loaded. Try to initialize the S delegate before accessing S.current.');
assert(_current != null, 'No instance of S was loaded. Try to initialize the S delegate before accessing S.current.');
return _current!;
}
static const AppLocalizationDelegate delegate = AppLocalizationDelegate();
static Future<S> load(Locale locale) {
final name = (locale.countryCode?.isEmpty ?? false)
? locale.languageCode
: locale.toString();
final name = (locale.countryCode?.isEmpty ?? false) ? locale.languageCode : locale.toString();
final localeName = Intl.canonicalizedLocale(name);
return initializeMessages(localeName).then((_) {
Intl.defaultLocale = localeName;
@@ -41,8 +38,7 @@ class S {
static S of(BuildContext context) {
final instance = S.maybeOf(context);
assert(instance != null,
'No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates?');
assert(instance != null, 'No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates?');
return instance!;
}
@@ -1032,8 +1028,10 @@ class AppLocalizationDelegate extends LocalizationsDelegate<S> {
@override
bool isSupported(Locale locale) => _isSupported(locale);
@override
Future<S> load(Locale locale) => S.load(locale);
@override
bool shouldReload(AppLocalizationDelegate old) => false;

View File

@@ -11,8 +11,6 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:keyboard_dismisser/keyboard_dismisser.dart';
var globalMessengerKey = GlobalKey<ScaffoldMessengerState>();
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await di.init();
@@ -31,33 +29,6 @@ class MyApp extends StatelessWidget {
child: KeyboardDismisser(
child: MaterialApp.router(
theme: ThemeHelper().themeData(),
// theme: ThemeData.light().copyWith(
// colorScheme: ColorScheme.fromSeed(
// seedColor: appTheme.blueA400,
// brightness: Brightness.light,
// ),
// appBarTheme: AppBarTheme(
// systemOverlayStyle: SystemUiOverlayStyle.light.copyWith(
// statusBarIconBrightness: Brightness.dark,
// systemNavigationBarIconBrightness: Brightness.dark,
// systemNavigationBarColor: ThemeData.light().scaffoldBackgroundColor,
// ),
// ),
// ),
// darkTheme: ThemeData.dark().copyWith(
// colorScheme: ColorScheme.fromSeed(
// seedColor: appTheme.blueA400,
// brightness: Brightness.dark,
// ),
// appBarTheme: AppBarTheme(
// systemOverlayStyle: SystemUiOverlayStyle.dark.copyWith(
// statusBarIconBrightness: Brightness.light,
// systemNavigationBarIconBrightness: Brightness.light,
// systemNavigationBarColor: ThemeData.dark().scaffoldBackgroundColor,
// ),
// ),
// ),
themeMode: ThemeMode.system,
routerConfig: AppRouter.appRouter,
debugShowCheckedModeBanner: false,
localizationsDelegates: const [

View File

@@ -216,7 +216,7 @@ class _AuthScreenState extends State<AuthScreen> {
List<String> validateFields(String email, String password) {
final s = S.of(context);
List<String> errors = [];
if (!isEmail(email)) {

View File

@@ -11,7 +11,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
import 'package:http/http.dart' as http;
part 'diet_create_event.dart';part 'diet_create_state.dart';
part 'diet_create_event.dart';
part 'diet_create_state.dart';
/// A bloc that manages the state of a DietCreate according to the event that is dispatched to it.
class DietCreateBloc extends Bloc<DietCreateEvent, DietCreateState> {

View File

@@ -11,7 +11,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
import 'package:http/http.dart' as http;
part 'diet_edit_event.dart';part 'diet_edit_state.dart';
part 'diet_edit_event.dart';
part 'diet_edit_state.dart';
/// A bloc that manages the state of a DietEdit according to the event that is dispatched to it.
class DietEditBloc extends Bloc<DietEditEvent, DietEditState> {

View File

@@ -13,7 +13,8 @@ import 'package:go_router/go_router.dart';
import 'package:http/http.dart' as http;
import 'package:image_picker/image_picker.dart';
part 'diet_select_event.dart';part 'diet_select_state.dart';
part 'diet_select_event.dart';
part 'diet_select_state.dart';
/// A bloc that manages the state of a DietSelect according to the event that is dispatched to it.
class DietSelectBloc extends Bloc<DietSelectEvent, DietSelectState> {

View File

@@ -11,7 +11,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
import 'package:http/http.dart' as http;
part 'diet_show_event.dart';part 'diet_show_state.dart';
part 'diet_show_event.dart';
part 'diet_show_state.dart';
/// A bloc that manages the state of a Diet according to the event that is dispatched to it.
class DietBloc extends Bloc<DietEvent, DietState> {

View File

@@ -1,4 +1,5 @@
import 'dart:async';
import 'package:dio/dio.dart';
import 'package:eatvio_app/app_router.dart';
import 'package:eatvio_app/core/const.dart';

View File

@@ -11,10 +11,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
import 'package:http/http.dart' as http;
part 'blog_post_edit_event.dart';
part 'blog_post_edit_state.dart';
part 'blog_post_edit_event.dart';part 'blog_post_edit_state.dart';
/// A bloc that manages the state of a BlogPostEdit according to the event that is dispatched to it.
class BlogPostEditBloc extends Bloc<BlogPostEditEvent, BlogPostEditState> {

View File

@@ -1,7 +1,6 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:eatvio_app/core/const.dart';
import 'package:eatvio_app/theme/app_decoration.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

View File

@@ -3,7 +3,6 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:eatvio_app/core/const.dart';
import 'package:eatvio_app/core/utils/image_constant.dart';
import 'package:eatvio_app/old/feed/blog_post_screen/models/comment_model.dart';
import 'package:eatvio_app/theme/custom_text_style.dart';
import 'package:eatvio_app/theme/theme_helper.dart';

View File

@@ -12,7 +12,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
import 'package:http/http.dart' as http;
part 'glossary_screen_event.dart';part 'glossary_screen_state.dart';
part 'glossary_screen_event.dart';
part 'glossary_screen_state.dart';
/// A bloc that manages the state of a Glossary according to the event that is dispatched to it.
class GlossaryBloc extends Bloc<GlossaryEvent, GlossaryState> {

View File

@@ -11,7 +11,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
import 'package:http/http.dart' as http;
part 'plan_create_event.dart';part 'plan_create_state.dart';
part 'plan_create_event.dart';
part 'plan_create_state.dart';
/// A bloc that manages the state of a PlanCreate according to the event that is dispatched to it.
class PlanCreateBloc extends Bloc<PlanCreateEvent, PlanCreateState> {

View File

@@ -11,7 +11,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
import 'package:http/http.dart' as http;
part 'plan_edit_event.dart';part 'plan_edit_state.dart';
part 'plan_edit_event.dart';
part 'plan_edit_state.dart';
/// A bloc that manages the state of a PlanEdit according to the event that is dispatched to it.
class PlanEditBloc extends Bloc<PlanEditEvent, PlanEditState> {

View File

@@ -13,7 +13,8 @@ import 'package:go_router/go_router.dart';
import 'package:http/http.dart' as http;
import 'package:image_picker/image_picker.dart';
part 'plan_select_event.dart';part 'plan_select_state.dart';
part 'plan_select_event.dart';
part 'plan_select_state.dart';
/// A bloc that manages the state of a PlanSelect according to the event that is dispatched to it.
class PlanSelectBloc extends Bloc<PlanSelectEvent, PlanSelectState> {

View File

@@ -11,7 +11,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
import 'package:http/http.dart' as http;
part 'plan_show_event.dart';part 'plan_show_state.dart';
part 'plan_show_event.dart';
part 'plan_show_state.dart';
/// A bloc that manages the state of a Plan according to the event that is dispatched to it.
class PlanBloc extends Bloc<PlanEvent, PlanState> {