feat(settings): add settings screen, general info, font

This commit is contained in:
mso7nueh
2024-09-23 15:17:14 +03:00
parent d771feefe3
commit 2dcb677c7c
61 changed files with 2429 additions and 1131 deletions

View File

@@ -22,6 +22,12 @@ import 'package:eatvio_app/features/recipes/presentation/pages/about_recipes_scr
import 'package:eatvio_app/features/recipes/presentation/pages/recipe_create_screen.dart';
import 'package:eatvio_app/features/recipes/presentation/pages/recipe_edit_screen.dart';
import 'package:eatvio_app/features/registration/presentation/pages/registration_screen.dart';
import 'package:eatvio_app/features/settings/presentation/pages/general_info_screen.dart';
import 'package:eatvio_app/features/settings/presentation/pages/other_info_screen.dart';
import 'package:eatvio_app/features/settings/presentation/pages/physical_activity_screen.dart';
import 'package:eatvio_app/features/settings/presentation/pages/physical_form_screen.dart';
import 'package:eatvio_app/features/settings/presentation/pages/pressure_screen.dart';
import 'package:eatvio_app/features/settings/presentation/pages/settings_screen.dart';
import 'package:eatvio_app/old/auth/auth_screen/auth_screen.dart';
import 'package:eatvio_app/old/diets/diet_create_screen/diet_create_screen.dart';
import 'package:eatvio_app/old/diets/diet_select_screen/diet_select_screen.dart';
@@ -159,6 +165,38 @@ class AppRouter {
name: 'chatScreen',
builder: (context, state) => ChatScreen(chatId: state.extra as String),
),
GoRoute(
path: '/settings-screen',
name: 'settingsScreen',
builder: (context, state) => SettingsScreen(),
routes: [
GoRoute(
path: 'general-info-screen',
name: 'generalInfoScreen',
builder: (context, state) => GeneralInfoScreen(),
),
GoRoute(
path: 'other-info-screen',
name: 'otherInfoScreen',
builder: (context, state) => OtherInfoScreen(),
),
GoRoute(
path: 'physical-activity-screen',
name: 'physicalActivityScreen',
builder: (context, state) => PhysicalActivityScreen(),
),
GoRoute(
path: 'physical-form-screen',
name: 'physicalFormScreen',
builder: (context, state) => PhysicalFormScreen(),
),
GoRoute(
path: 'pressure-screen',
name: 'pressureScreen',
builder: (context, state) => PressureScreen(),
),
],
),
GoRoute(
path: '/my-settings-screen',
name: 'mySettingsScreen',

View File

@@ -24,7 +24,6 @@ mixin _$InitializationState {
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -71,17 +70,18 @@ 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,14 +91,18 @@ 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.
@@ -116,7 +120,9 @@ 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
@@ -203,14 +209,20 @@ 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
@@ -229,7 +241,9 @@ 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
@@ -316,17 +330,22 @@ 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
@@ -361,7 +380,9 @@ 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
@@ -372,8 +393,9 @@ 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
@@ -451,29 +473,37 @@ 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
@@ -510,7 +540,8 @@ 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
@@ -521,8 +552,9 @@ 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
@@ -600,12 +632,14 @@ 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,13 +22,10 @@ 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;
@@ -43,20 +40,23 @@ 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,17 +93,25 @@ class _$LinksCopyWithImpl<$Res, $Val extends Links> implements $LinksCopyWith<$R
/// @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.
@@ -145,7 +153,8 @@ 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")
@@ -178,14 +187,20 @@ 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() {
@@ -207,15 +222,12 @@ 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;
@@ -224,7 +236,8 @@ 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) {
@@ -235,25 +248,18 @@ 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;
@@ -268,8 +274,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,
@@ -283,12 +289,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;
@@ -345,8 +351,9 @@ class _$MetaCopyWithImpl<$Res, $Val extends Meta> implements $MetaCopyWith<$Res>
/// @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(
@@ -361,8 +368,11 @@ 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.
@@ -429,7 +439,8 @@ 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")
@@ -441,7 +452,6 @@ class _$MetaImpl implements _Meta {
@JsonKey(name: "last_page")
final int lastPage;
final List<Link> _links;
@override
@JsonKey(name: "links")
List<Link> get links {
@@ -473,9 +483,11 @@ 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) &&
@@ -485,15 +497,24 @@ 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() {
@@ -519,31 +540,24 @@ 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;
@@ -552,7 +566,8 @@ 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) {
@@ -563,10 +578,8 @@ 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;
@@ -581,19 +594,22 @@ 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;
@@ -625,16 +641,23 @@ class _$LinkCopyWithImpl<$Res, $Val extends Link> implements $LinkCopyWith<$Res>
/// @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.
@@ -665,9 +688,13 @@ class __$$LinkImplCopyWithImpl<$Res> extends _$LinkCopyWithImpl<$Res, _$LinkImpl
/// @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")
@@ -703,7 +730,8 @@ 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() {
@@ -714,19 +742,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;
@@ -735,5 +763,6 @@ 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,7 +13,8 @@ _$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,
@@ -24,14 +25,17 @@ _$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,
@@ -48,7 +52,8 @@ _$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,35 +17,33 @@ 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;
@@ -81,19 +79,23 @@ 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.
@@ -129,7 +131,8 @@ class __$$SelectionPopupModelImplCopyWithImpl<$Res> extends _$SelectionPopupMode
/// @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;
@@ -154,11 +157,13 @@ 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.
@@ -166,21 +171,23 @@ 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;
@@ -188,5 +195,6 @@ 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,7 +24,6 @@ mixin _$NewMessagesState {
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -71,16 +70,18 @@ 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;
@@ -90,14 +91,18 @@ class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState> implem
/// @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.
@@ -115,7 +120,8 @@ 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
@@ -202,14 +208,19 @@ 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.
@@ -227,7 +238,9 @@ 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
@@ -314,17 +327,22 @@ 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.
@@ -360,7 +378,8 @@ 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
@@ -371,8 +390,9 @@ 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
@@ -450,29 +470,35 @@ 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.
@@ -508,7 +534,8 @@ 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
@@ -519,8 +546,9 @@ 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
@@ -598,12 +626,14 @@ 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,16 +20,18 @@ 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;
@@ -37,7 +39,8 @@ 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(),
}) =>
@@ -71,17 +74,18 @@ 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;
@@ -91,14 +95,18 @@ class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState> im
/// @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.
@@ -116,7 +124,8 @@ 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
@@ -127,7 +136,9 @@ 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();
@@ -138,7 +149,8 @@ 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();
@@ -149,7 +161,8 @@ 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(),
}) {
@@ -203,14 +216,21 @@ 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.
@@ -228,7 +248,9 @@ 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
@@ -239,7 +261,9 @@ 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();
@@ -250,7 +274,8 @@ 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();
@@ -261,7 +286,8 @@ 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(),
}) {
@@ -315,17 +341,22 @@ 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
@@ -352,10 +383,12 @@ class __$$NotificationsStateLoadedImplCopyWithImpl<$Res> extends _$Notifications
/// @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;
@@ -376,27 +409,33 @@ 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);
@@ -407,7 +446,8 @@ 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);
@@ -418,7 +458,8 @@ 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(),
}) {
@@ -467,31 +508,39 @@ 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.
@@ -527,7 +576,8 @@ 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
@@ -538,15 +588,18 @@ 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);
@@ -557,7 +610,8 @@ 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);
@@ -568,7 +622,8 @@ 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(),
}) {
@@ -617,12 +672,14 @@ 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

@@ -21,9 +21,8 @@ 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.
@@ -32,24 +31,29 @@ 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;
@@ -67,7 +71,8 @@ class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel> implements $
? _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,
@@ -77,17 +82,26 @@ class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel> implements $
}
/// @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.
@@ -103,7 +117,8 @@ class __$$CalendarModelImplCopyWithImpl<$Res> extends _$CalendarModelCopyWithImp
? _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,
@@ -115,9 +130,13 @@ class __$$CalendarModelImplCopyWithImpl<$Res> extends _$CalendarModelCopyWithImp
/// @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;
@@ -137,21 +156,30 @@ 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() {
@@ -162,17 +190,19 @@ 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;
@@ -180,5 +210,6 @@ 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,14 +6,19 @@ 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,7 +24,6 @@ mixin _$CalendarState {
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -71,16 +70,18 @@ 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;
@@ -90,12 +91,18 @@ class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState> implements $
/// @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.
@@ -113,7 +120,8 @@ 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
@@ -200,14 +208,18 @@ 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.
@@ -225,7 +237,9 @@ 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
@@ -312,17 +326,20 @@ 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.
@@ -343,10 +360,11 @@ class __$$CalendarStateLoadedImplCopyWithImpl<$Res> extends _$CalendarStateCopyW
/// @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;
@@ -362,11 +380,15 @@ 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.
@@ -374,7 +396,8 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
@override
@pragma('vm:prefer-inline')
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith =>
__$$CalendarStateLoadedImplCopyWithImpl<_$CalendarStateLoadedImpl>(this, _$identity);
__$$CalendarStateLoadedImplCopyWithImpl<_$CalendarStateLoadedImpl>(
this, _$identity);
@override
@optionalTypeArgs
@@ -452,29 +475,35 @@ 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.
@@ -510,7 +539,8 @@ 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
@@ -522,7 +552,8 @@ class _$CalendarStateErrorImpl implements CalendarStateError {
@override
@pragma('vm:prefer-inline')
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith =>
__$$CalendarStateErrorImplCopyWithImpl<_$CalendarStateErrorImpl>(this, _$identity);
__$$CalendarStateErrorImplCopyWithImpl<_$CalendarStateErrorImpl>(
this, _$identity);
@override
@optionalTypeArgs
@@ -600,12 +631,14 @@ 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,7 +46,9 @@ 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;
@@ -55,7 +57,9 @@ 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,15 +21,11 @@ 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;
@@ -39,13 +35,15 @@ 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,
@@ -56,12 +54,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;
@@ -102,10 +100,11 @@ class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel> implem
}
/// @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(
@@ -117,9 +116,12 @@ abstract class _$$ChatMessageModelImplCopyWith<$Res> implements $ChatMessageMode
}
/// @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.
@@ -168,14 +170,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 {
@@ -205,21 +207,27 @@ 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() {
@@ -231,28 +239,26 @@ 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;
@@ -261,5 +267,6 @@ 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,7 +6,9 @@ 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>?,
@@ -14,7 +16,9 @@ _$ChatMessageModelImpl _$$ChatMessageModelImplFromJson(Map<String, dynamic> json
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,7 +22,6 @@ 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.
@@ -31,26 +30,30 @@ 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;
@@ -86,22 +89,28 @@ class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel> impl
}
/// @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.
@@ -127,12 +136,16 @@ class __$$ChatMessagesModelImplCopyWithImpl<$Res> extends _$ChatMessagesModelCop
/// @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 {
@@ -154,20 +167,24 @@ 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() {
@@ -178,15 +195,17 @@ 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;
@@ -194,5 +213,6 @@ 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,12 +6,18 @@ 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,24 +29,26 @@ 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;
@@ -67,17 +69,23 @@ class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel> implements $
}
/// @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.
@@ -98,9 +106,11 @@ class __$$ChatMetaModelImplCopyWithImpl<$Res> extends _$ChatMetaModelCopyWithImp
/// @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")
@@ -114,7 +124,10 @@ 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)
@@ -126,7 +139,8 @@ 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() {
@@ -137,9 +151,12 @@ 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")
@@ -149,5 +166,6 @@ 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,10 +6,12 @@ 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,10 +21,9 @@ 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.
@@ -33,26 +32,32 @@ 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;
@@ -86,27 +91,38 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel> implements $
@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.
@@ -138,10 +154,13 @@ class __$$ChatRoomModelImplCopyWithImpl<$Res> extends _$ChatRoomModelCopyWithImp
@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;
@@ -149,7 +168,6 @@ 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;
@@ -168,20 +186,23 @@ 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() {
@@ -194,18 +215,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;
@@ -213,5 +234,6 @@ 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,15 +6,19 @@ 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,25 +29,27 @@ 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;
@@ -68,19 +70,23 @@ class _$ChatRoomPreviewModelCopyWithImpl<$Res, $Val extends ChatRoomPreviewModel
}
/// @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.
@@ -101,12 +107,14 @@ class __$$ChatRoomPreviewModelImplCopyWithImpl<$Res> extends _$ChatRoomPreviewMo
/// @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 {
@@ -123,20 +131,26 @@ 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() {
@@ -147,9 +161,12 @@ 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")
@@ -159,7 +176,8 @@ 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) {
@@ -170,13 +188,10 @@ 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;
@@ -186,13 +201,14 @@ 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,
@@ -204,12 +220,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;
@@ -255,9 +271,11 @@ class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom> implements $ChatRoomCo
}
/// @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(
@@ -271,8 +289,12 @@ abstract class _$$ChatRoomImplCopyWith<$Res> implements $ChatRoomCopyWith<$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.
@@ -314,7 +336,8 @@ 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")
@@ -340,21 +363,25 @@ 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() {
@@ -371,20 +398,18 @@ 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;
@@ -393,7 +418,8 @@ 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) {
@@ -404,22 +430,16 @@ 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;
@@ -429,31 +449,34 @@ 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;
@@ -504,10 +527,11 @@ class _$LastMessageClassCopyWithImpl<$Res, $Val extends LastMessageClass> implem
}
/// @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(
@@ -515,15 +539,19 @@ abstract class _$$LastMessageClassImplCopyWith<$Res> implements $LastMessageClas
@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.
@@ -579,12 +607,14 @@ 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")
@@ -593,7 +623,6 @@ class _$LastMessageClassImpl implements _LastMessageClass {
@JsonKey(name: "data")
final String data;
final List<dynamic> _mediaData;
@override
@JsonKey(name: "media_data")
List<dynamic> get mediaData {
@@ -627,24 +656,39 @@ 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() {
@@ -656,40 +700,37 @@ 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;
@@ -698,7 +739,8 @@ 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) {
@@ -709,7 +751,6 @@ 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;
@@ -724,23 +765,24 @@ 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;
@@ -787,22 +829,28 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users> implements $UsersCopyWith<$R
/// @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.
@@ -828,9 +876,12 @@ class __$$UsersImplCopyWithImpl<$Res> extends _$UsersCopyWithImpl<$Res, _$UsersI
/// @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")
@@ -849,8 +900,10 @@ 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)
@@ -862,7 +915,8 @@ 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() {
@@ -874,14 +928,15 @@ 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;
@@ -890,7 +945,8 @@ 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) {
@@ -901,13 +957,10 @@ 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;
@@ -917,13 +970,14 @@ 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,
@@ -933,12 +987,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;
@@ -974,9 +1028,11 @@ class _$ChatUserCopyWithImpl<$Res, $Val extends ChatUser> implements $ChatUserCo
}
/// @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(
@@ -987,8 +1043,12 @@ abstract class _$$ChatUserImplCopyWith<$Res> implements $ChatUserCopyWith<$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.
@@ -1030,7 +1090,8 @@ 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")
@@ -1057,20 +1118,24 @@ 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() {
@@ -1084,23 +1149,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;
@@ -1109,5 +1174,6 @@ 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,29 +6,39 @@ 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>,
@@ -38,7 +48,9 @@ _$LastMessageClassImpl _$$LastMessageClassImplFromJson(Map<String, dynamic> json
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,
@@ -49,23 +61,28 @@ Map<String, dynamic> _$$LastMessageClassImplToJson(_$LastMessageClassImpl instan
};
_$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,22 +14,19 @@ 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;
@@ -39,14 +36,15 @@ 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,
@@ -57,12 +55,13 @@ 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;
@@ -103,10 +102,12 @@ class _$ChatRoomSettingsModelCopyWithImpl<$Res, $Val extends ChatRoomSettingsMod
}
/// @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(
@@ -118,9 +119,13 @@ abstract class _$$ChatRoomSettingsModelImplCopyWith<$Res> implements $ChatRoomSe
}
/// @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.
@@ -168,7 +173,8 @@ 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;
@@ -195,23 +201,28 @@ 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() {
@@ -223,28 +234,26 @@ 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;
@@ -253,5 +262,6 @@ 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,7 +6,9 @@ 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,
@@ -14,7 +16,9 @@ _$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson(Map<String, dyn
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,12 +21,9 @@ 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;
@@ -36,24 +33,30 @@ 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;
@@ -89,17 +92,27 @@ class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel> implements $
}
/// @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.
@@ -141,7 +154,8 @@ 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;
@@ -166,20 +180,24 @@ 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() {
@@ -191,23 +209,22 @@ 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;
@@ -216,5 +233,6 @@ 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,14 +6,16 @@ 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,13 +21,9 @@ 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;
@@ -37,25 +33,31 @@ 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;
@@ -96,19 +98,28 @@ class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel> im
}
/// @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.
@@ -150,9 +161,14 @@ class __$$WebsocketInfoModelImplCopyWithImpl<$Res> extends _$WebsocketInfoModelC
@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;
@@ -185,7 +201,8 @@ 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.
@@ -193,7 +210,8 @@ 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() {
@@ -205,26 +223,24 @@ 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;
@@ -233,5 +249,6 @@ 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,7 +6,9 @@ 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,
@@ -14,7 +16,9 @@ _$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson(Map<String, dynamic>
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,16 +20,19 @@ 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;
@@ -37,7 +40,9 @@ 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(),
}) =>
@@ -71,16 +76,18 @@ 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;
@@ -90,12 +97,18 @@ class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState> implements $
/// @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.
@@ -113,7 +126,8 @@ 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
@@ -124,7 +138,9 @@ 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();
@@ -135,7 +151,9 @@ 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();
@@ -146,7 +164,9 @@ 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(),
}) {
@@ -200,14 +220,18 @@ 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.
@@ -225,7 +249,9 @@ 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
@@ -236,7 +262,9 @@ 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();
@@ -247,7 +275,9 @@ 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();
@@ -258,7 +288,9 @@ 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(),
}) {
@@ -312,19 +344,26 @@ 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.
@@ -370,13 +409,16 @@ class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyW
/// @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;
@@ -399,14 +441,19 @@ 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.
@@ -414,14 +461,17 @@ 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);
@@ -432,7 +482,9 @@ 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);
@@ -443,7 +495,9 @@ 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(),
}) {
@@ -499,32 +553,33 @@ 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.
@@ -560,7 +615,8 @@ 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
@@ -572,14 +628,17 @@ 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);
@@ -590,7 +649,9 @@ 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);
@@ -601,7 +662,9 @@ 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(),
}) {
@@ -650,12 +713,14 @@ 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,7 +24,6 @@ mixin _$ChatSelectState {
required TResult Function(List<ChatRoom> chatRooms) loaded,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -71,16 +70,18 @@ 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;
@@ -90,13 +91,18 @@ class _$ChatSelectStateCopyWithImpl<$Res, $Val extends ChatSelectState> implemen
/// @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.
@@ -114,7 +120,8 @@ 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
@@ -201,14 +208,20 @@ 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.
@@ -226,7 +239,9 @@ 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
@@ -313,17 +328,20 @@ 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.
@@ -359,7 +377,8 @@ 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
@@ -370,8 +389,10 @@ 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
@@ -449,29 +470,35 @@ 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.
@@ -492,10 +519,10 @@ class __$$ChatSelectStateLoadedImplCopyWithImpl<$Res> extends _$ChatSelectStateC
/// @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;
@@ -511,19 +538,24 @@ 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
@@ -601,12 +633,14 @@ 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,7 +80,8 @@ 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;
@@ -198,7 +199,9 @@ 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

@@ -22,10 +22,8 @@ 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;
@@ -35,28 +33,32 @@ 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;
@@ -107,23 +109,31 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel> implements $Co
}
/// @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.
@@ -155,13 +165,15 @@ class __$$CommentModelImplCopyWithImpl<$Res> extends _$CommentModelCopyWithImpl<
@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 {
@@ -194,14 +206,16 @@ 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() {
@@ -217,16 +231,15 @@ 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;
@@ -235,7 +248,8 @@ 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) {
@@ -246,19 +260,14 @@ 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;
@@ -273,8 +282,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,
@@ -286,12 +295,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;
@@ -338,8 +347,9 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment> implements $CommentCopyW
/// @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(
@@ -352,8 +362,12 @@ 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.
@@ -404,11 +418,13 @@ 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")
@@ -423,11 +439,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);
}
@@ -447,23 +463,35 @@ 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() {
@@ -475,35 +503,33 @@ 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;
@@ -512,5 +538,6 @@ 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,28 +6,36 @@ 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

@@ -24,7 +24,6 @@ mixin _$CommentsState {
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
TResult? Function()? $default, {
@@ -71,16 +70,18 @@ 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;
@@ -90,12 +91,18 @@ class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState> implements $
/// @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.
@@ -113,7 +120,8 @@ 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
@@ -200,14 +208,18 @@ 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.
@@ -225,7 +237,9 @@ 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
@@ -312,9 +326,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});
@@ -322,9 +336,12 @@ 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.
@@ -390,7 +407,8 @@ class _$CommentsStateLoadedImpl implements CommentsStateLoaded {
@override
@pragma('vm:prefer-inline')
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith =>
__$$CommentsStateLoadedImplCopyWithImpl<_$CommentsStateLoadedImpl>(this, _$identity);
__$$CommentsStateLoadedImplCopyWithImpl<_$CommentsStateLoadedImpl>(
this, _$identity);
@override
@optionalTypeArgs
@@ -468,31 +486,36 @@ 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.
@@ -528,7 +551,8 @@ 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
@@ -540,7 +564,8 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
@override
@pragma('vm:prefer-inline')
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
__$$CommentsStateErrorImplCopyWithImpl<_$CommentsStateErrorImpl>(this, _$identity);
__$$CommentsStateErrorImplCopyWithImpl<_$CommentsStateErrorImpl>(
this, _$identity);
@override
@optionalTypeArgs
@@ -618,12 +643,14 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
}
abstract class CommentsStateError implements CommentsState {
const factory CommentsStateError({required final String errorMessage}) = _$CommentsStateErrorImpl;
const factory CommentsStateError({required final String errorMessage}) =
_$CommentsStateErrorImpl;
String get errorMessage;
/// Create a copy of CommentsState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@@ -24,7 +24,7 @@ class MenuScreen extends StatelessWidget {
_tile(
title: 'Настройки профиля',
leading: ImageConstant.icnProfileSettings,
onTap: () => GoRouter.of(context).push('/my-settings-screen'),
onTap: () => GoRouter.of(context).push('/settings-screen'),
),
_divider(context),
_tile(

View File

@@ -69,7 +69,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16),
padding: const EdgeInsets.all(16),
child: Row(
children: [
CircleAvatar(

View File

@@ -22,10 +22,8 @@ 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;
@@ -35,28 +33,32 @@ 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;
@@ -107,23 +109,31 @@ class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel> implements
}
/// @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.
@@ -155,13 +165,15 @@ class __$$RecipeTagModelImplCopyWithImpl<$Res> extends _$RecipeTagModelCopyWithI
@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 {
@@ -194,14 +206,17 @@ 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() {
@@ -217,16 +232,15 @@ 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;
@@ -235,7 +249,8 @@ 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) {
@@ -246,16 +261,12 @@ 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;
@@ -265,13 +276,14 @@ 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,
@@ -282,12 +294,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;
@@ -328,9 +340,11 @@ class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag> implements $RecipeTa
}
/// @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(
@@ -342,8 +356,12 @@ abstract class _$$RecipeTagImplCopyWith<$Res> implements $RecipeTagCopyWith<$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.
@@ -391,7 +409,8 @@ 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")
@@ -421,21 +440,26 @@ 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() {
@@ -447,30 +471,28 @@ 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;
@@ -479,5 +501,6 @@ 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,19 +6,25 @@ 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(),
@@ -26,7 +32,8 @@ _$RecipeTagImpl _$$RecipeTagImplFromJson(Map<String, dynamic> json) => _$RecipeT
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

@@ -21,7 +21,6 @@ LocationModel _$LocationModelFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$LocationModel {
List<String> get locations => throw _privateConstructorUsedError;
@JsonKey(name: 'response_body')
String get responseBody => throw _privateConstructorUsedError;
@@ -31,24 +30,28 @@ 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;
@@ -74,17 +77,25 @@ class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel> implements $
}
/// @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.
@@ -110,12 +121,15 @@ class __$$LocationModelImplCopyWithImpl<$Res> extends _$LocationModelCopyWithImp
/// @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;
@@ -137,20 +151,24 @@ 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() {
@@ -161,14 +179,16 @@ 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;
@@ -177,5 +197,6 @@ 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,12 +6,15 @@ 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,7 +14,8 @@ 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);
}
@@ -22,74 +23,48 @@ UserRegistrationSheet _$UserRegistrationSheetFromJson(Map<String, dynamic> json)
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;
@@ -99,14 +74,15 @@ 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,
@@ -139,12 +115,13 @@ 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;
@@ -295,10 +272,12 @@ class _$UserRegistrationSheetCopyWithImpl<$Res, $Val extends UserRegistrationShe
}
/// @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(
@@ -332,9 +311,13 @@ abstract class _$$UserRegistrationSheetImplCopyWith<$Res> implements $UserRegist
}
/// @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.
@@ -490,7 +473,8 @@ 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,
@@ -514,7 +498,8 @@ 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')
@@ -600,33 +585,54 @@ 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)
@@ -667,8 +673,9 @@ 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() {
@@ -684,7 +691,8 @@ 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,
@@ -693,119 +701,99 @@ 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;
@@ -814,5 +802,6 @@ 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,7 +6,9 @@ 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,
@@ -33,10 +35,13 @@ _$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson(Map<String, dyn
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,13 +21,15 @@ 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});
@@ -35,12 +37,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;
@@ -71,10 +73,11 @@ class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState> impl
}
/// @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});
@@ -84,9 +87,12 @@ abstract class _$$RegistrationStateImplCopyWith<$Res> implements $RegistrationSt
}
/// @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.
@@ -120,7 +126,9 @@ 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
@@ -131,11 +139,14 @@ 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;
@@ -144,5 +155,6 @@ 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

@@ -3,6 +3,7 @@ import 'package:eatvio_app/features/registration/models/user_registration_model.
import 'package:eatvio_app/features/registration/presentation/bloc/registration_cubit/registration_cubit.dart';
import 'package:eatvio_app/theme/theme_helper.dart';
import 'package:eatvio_app/widgets/custom_edit_text_form_field.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_typeahead/flutter_typeahead.dart';
@@ -153,7 +154,7 @@ class _CityOfLivingScreenState extends State<CityOfLivingScreen> {
Icons.near_me_rounded,
color: appTheme.blueA400,
)
: CircularProgressIndicator(),
: CupertinoActivityIndicator(),
),
),
],

View File

@@ -35,6 +35,7 @@ class _DateOfBirthScreenState extends State<DateOfBirthScreen> {
@override
Widget build(BuildContext context) {
final s = S.of(context);
return SingleChildScrollView(
padding: EdgeInsets.only(bottom: 80, top: 16, left: 16, right: 16),
child: Column(
@@ -86,15 +87,11 @@ class _DateOfBirthScreenState extends State<DateOfBirthScreen> {
context: context,
builder: (BuildContext context) => Container(
height: 216,
padding: const EdgeInsets.only(top: 6.0),
// The Bottom margin is provided to align the popup above the system
// navigation bar.
padding: const EdgeInsets.only(top: 6),
margin: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
// Provide a background color for the popup.
color: CupertinoColors.systemBackground.resolveFrom(context),
// Use a SafeArea widget to avoid system overlaps.
child: SafeArea(
top: false,
child: child,

View File

@@ -58,7 +58,7 @@ class _NameScreenState extends State<NameScreen> {
final registrationCubit = context.read<RegistrationCubit>();
registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(lastName: newValue));
},
)
),
],
),
);

View File

@@ -100,7 +100,7 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
},
label: Text(
'Продолжить',
style: theme.textTheme.titleSmall,
style: theme.textTheme.titleSmall!.copyWith(color: Colors.white),
),
),
),

View File

@@ -22,7 +22,8 @@ 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>{};
@@ -128,7 +129,9 @@ 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

@@ -0,0 +1,83 @@
import 'package:eatvio_app/generated/l10n.dart';
import 'package:eatvio_app/theme/theme_helper.dart';
import 'package:eatvio_app/widgets/custom_edit_text_form_field.dart';
import 'package:flutter/material.dart';
class GeneralInfoScreen extends StatefulWidget {
const GeneralInfoScreen({super.key});
@override
State<GeneralInfoScreen> createState() => _GeneralInfoScreenState();
}
class _GeneralInfoScreenState extends State<GeneralInfoScreen> {
final firstNameController = TextEditingController();
final lastNameController = TextEditingController();
@override
Widget build(BuildContext context) {
final s = S.of(context);
return Scaffold(
appBar: AppBar(
title: Text('Общая информация'),
),
bottomSheet: _saveButton(),
body: SingleChildScrollView(
physics: const BouncingScrollPhysics(),
padding: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(s.first_name),
SizedBox(height: 4),
CustomTextFormField(
controller: firstNameController,
textInputAction: TextInputAction.next,
hintText: 'Введите имя',
onChanged: (newValue) {},
),
SizedBox(height: 16),
Text(s.last_name),
SizedBox(height: 4),
CustomTextFormField(
controller: lastNameController,
textInputAction: TextInputAction.done,
hintText: 'Введите фамилию',
onChanged: (newValue) {},
),
],
),
),
);
}
_saveButton() {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 4),
child: InkWell(
onTap: () {},
borderRadius: BorderRadius.circular(12),
child: Ink(
height: 52,
width: MediaQuery.of(context).size.width - 16,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: appTheme.blueA400,
),
child: Center(
child: Text(
'Сохранить',
style: TextStyle(
color: Colors.white,
height: 1,
fontWeight: FontWeight.w600,
fontSize: 18,
),
),
),
),
),
);
}
}

View File

@@ -0,0 +1,15 @@
import 'package:flutter/cupertino.dart';
class OtherInfoScreen extends StatefulWidget {
const OtherInfoScreen({super.key});
@override
State<OtherInfoScreen> createState() => _OtherInfoScreenState();
}
class _OtherInfoScreenState extends State<OtherInfoScreen> {
@override
Widget build(BuildContext context) {
return const Placeholder();
}
}

View File

@@ -0,0 +1,15 @@
import 'package:flutter/cupertino.dart';
class PhysicalActivityScreen extends StatefulWidget {
const PhysicalActivityScreen({super.key});
@override
State<PhysicalActivityScreen> createState() => _PhysicalActivityScreenState();
}
class _PhysicalActivityScreenState extends State<PhysicalActivityScreen> {
@override
Widget build(BuildContext context) {
return const Placeholder();
}
}

View File

@@ -0,0 +1,15 @@
import 'package:flutter/cupertino.dart';
class PhysicalFormScreen extends StatefulWidget {
const PhysicalFormScreen({super.key});
@override
State<PhysicalFormScreen> createState() => _PhysicalFormScreenState();
}
class _PhysicalFormScreenState extends State<PhysicalFormScreen> {
@override
Widget build(BuildContext context) {
return const Placeholder();
}
}

View File

@@ -0,0 +1,15 @@
import 'package:flutter/cupertino.dart';
class PressureScreen extends StatefulWidget {
const PressureScreen({super.key});
@override
State<PressureScreen> createState() => _PressureScreenState();
}
class _PressureScreenState extends State<PressureScreen> {
@override
Widget build(BuildContext context) {
return const Placeholder();
}
}

View File

@@ -0,0 +1,409 @@
import 'package:eatvio_app/data/models/selectionPopupModel/selection_popup_model.dart';
import 'package:eatvio_app/theme/theme_helper.dart';
import 'package:eatvio_app/widgets/custom_drop_down.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
class SettingsScreen extends StatefulWidget {
const SettingsScreen({super.key});
@override
State<SettingsScreen> createState() => _SettingsScreenState();
}
class _SettingsScreenState extends State<SettingsScreen> {
bool updatesNotificationsSwitchState = true;
bool fillDiaryNotificationsSwitchState = true;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFFF0F2F5),
appBar: AppBar(
title: Text('Настройки'),
),
body: SingleChildScrollView(
physics: const BouncingScrollPhysics(),
child: Column(
children: [
const SizedBox(height: 16),
_selectLanguageDropDown(),
const SizedBox(height: 20),
_additionalInfo(),
const SizedBox(height: 12),
_notifications(),
const SizedBox(height: 12),
_aboutEatvio(),
const SizedBox(height: 16),
_becomeConsultantButton(),
const SizedBox(height: 8),
_deleteAccountButton(),
const SizedBox(height: 16),
],
),
),
);
}
_selectLanguageDropDown() {
final items = [SelectionPopupModel(title: 'Русский', id: 0, isSelected: true, value: 'Русский')];
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Text(
'Язык',
style: TextStyle(
fontSize: 16,
height: 1,
color: Colors.grey,
),
),
),
const SizedBox(height: 8),
_actionsGroup(
CustomDropDown(
items: items,
value: items[0],
autofocus: false,
),
),
],
);
}
_additionalInfo() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Text(
'Дополнительаная информация',
style: TextStyle(
fontSize: 16,
height: 1,
color: Colors.grey,
fontFamily: 'Mulish',
),
),
),
const SizedBox(height: 8),
_actionsGroup(
Column(
children: [
const SizedBox(height: 8),
GestureDetector(
onTap: () => GoRouter.of(context).pushNamed('generalInfoScreen'),
child: Row(
children: [
Text(
'Общая информация',
style: TextStyle(
color: Colors.black,
),
),
const Spacer(),
Icon(
Icons.keyboard_arrow_right_rounded,
color: Colors.grey.shade400,
),
],
),
),
_divider(context),
GestureDetector(
onTap: () => GoRouter.of(context).pushNamed('physicalFormScreen'),
child: Row(
children: [
Text(
'Физическая форма',
style: TextStyle(
color: Colors.black,
),
),
const Spacer(),
Icon(
Icons.keyboard_arrow_right_rounded,
color: Colors.grey.shade400,
),
],
),
),
_divider(context),
GestureDetector(
onTap: () => GoRouter.of(context).pushNamed('pressureScreen'),
child: Row(
children: [
Text(
'Давление',
style: TextStyle(
color: Colors.black,
),
),
const Spacer(),
Icon(
Icons.keyboard_arrow_right_rounded,
color: Colors.grey.shade400,
),
],
),
),
_divider(context),
GestureDetector(
onTap: () => GoRouter.of(context).pushNamed('otherInfoScreen'),
child: Row(
children: [
Text(
'Прочая информация',
style: TextStyle(
color: Colors.black,
),
),
const Spacer(),
Icon(
Icons.keyboard_arrow_right_rounded,
color: Colors.grey.shade400,
),
],
),
),
_divider(context),
GestureDetector(
onTap: () => GoRouter.of(context).pushNamed('physicalActivityScreen'),
child: Row(
children: [
Text(
'Физическая нагрузка',
style: TextStyle(
color: Colors.black,
),
),
const Spacer(),
Icon(
Icons.keyboard_arrow_right_rounded,
color: Colors.grey.shade400,
),
],
),
),
const SizedBox(height: 8),
],
),
),
],
);
}
_notifications() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 8),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Text(
'Уведомления',
style: TextStyle(
fontSize: 16,
height: 1,
color: Colors.grey,
),
),
),
const SizedBox(height: 8),
_actionsGroup(
Column(
children: [
Row(
children: [
Text(
'Уведомление о новых обновлениях',
style: TextStyle(
color: Colors.black,
),
),
const Spacer(),
CupertinoSwitch(
value: updatesNotificationsSwitchState,
activeColor: appTheme.blueA400,
onChanged: (newValue) {
setState(() {
updatesNotificationsSwitchState = newValue;
});
},
),
],
),
_divider(context),
Row(
children: [
Text(
'Напоминание о заполнении дневника',
style: TextStyle(
color: Colors.black,
),
),
const Spacer(),
CupertinoSwitch(
value: fillDiaryNotificationsSwitchState,
activeColor: appTheme.blueA400,
onChanged: (newValue) {
setState(() {
fillDiaryNotificationsSwitchState = newValue;
});
},
),
],
),
],
),
),
const SizedBox(height: 8),
],
);
}
_aboutEatvio() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Text(
'О Eatvio',
style: TextStyle(
fontSize: 16,
height: 1,
color: Colors.grey,
),
),
),
const SizedBox(height: 8),
_actionsGroup(
Column(
children: [
const SizedBox(height: 8),
Row(
children: [
Text(
'О компании',
style: TextStyle(
color: Colors.black,
),
),
const Spacer(),
Icon(
Icons.keyboard_arrow_right_rounded,
color: Colors.grey.shade400,
),
],
),
_divider(context),
Row(
children: [
Text(
'Пользовательское соглашение',
style: TextStyle(
color: Colors.black,
),
),
const Spacer(),
Icon(
Icons.keyboard_arrow_right_rounded,
color: Colors.grey.shade400,
),
],
),
const SizedBox(height: 8),
],
),
),
],
);
}
_becomeConsultantButton() {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 8),
child: InkWell(
onTap: () {},
borderRadius: BorderRadius.circular(12),
child: Ink(
height: 52,
width: MediaQuery.of(context).size.width - 16,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: appTheme.blueA400,
),
child: Center(
child: Text(
'Стать консультантом',
style: TextStyle(
color: Colors.white,
height: 1,
fontWeight: FontWeight.w600,
fontSize: 18,
),
),
),
),
),
);
}
_deleteAccountButton() {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 8),
child: InkWell(
onTap: () {},
borderRadius: BorderRadius.circular(12),
child: Ink(
height: 52,
width: MediaQuery.of(context).size.width - 16,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.black.withOpacity(0.1),
),
child: Center(
child: Text(
'Удалить аккаунт',
style: TextStyle(
color: Colors.black,
height: 1,
fontWeight: FontWeight.w600,
fontSize: 18,
),
),
),
),
),
);
}
_actionsGroup(Widget child) {
return Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 8),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
),
child: child,
);
}
_divider(BuildContext context) {
return Container(
margin: EdgeInsets.symmetric(vertical: 12),
height: 0.4,
width: MediaQuery.of(context).size.width - 16,
decoration: BoxDecoration(
color: Colors.black26,
borderRadius: BorderRadius.circular(16),
),
);
}
}

View File

@@ -19,7 +19,6 @@ 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),
};
@@ -35,7 +34,9 @@ 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);
}
@@ -55,7 +56,8 @@ 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,101 +21,152 @@ 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("Первичные замеры"),
"language": 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("Сохранить"),
"settings": 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,14 +18,17 @@ 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;
@@ -38,7 +41,8 @@ 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!;
}
@@ -876,10 +880,10 @@ class S {
);
}
/// `Язык:`
/// `Язык`
String get language {
return Intl.message(
'Язык:',
'Язык',
name: 'language',
desc: '',
args: [],
@@ -936,6 +940,16 @@ class S {
);
}
/// `Настройки`
String get settings {
return Intl.message(
'Настройки',
name: 'settings',
desc: '',
args: [],
);
}
/// `Профиль`
String get profile {
return Intl.message(
@@ -1028,10 +1042,8 @@ 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

@@ -82,12 +82,13 @@
"archived": "В архиве",
"draft": "Черновик",
"my_blog": "Мой блог",
"language": "Язык:",
"language": "Язык",
"in_progress": "В процессе",
"add_measure": "Добавить замер",
"weight": "Вес",
"plans_complete": "Пройденные планы",
"my_settings": "Мои настройки",
"settings": "Настройки",
"profile": "Профиль",
"chat": "Чат",
"admin": "Админ",

View File

@@ -141,7 +141,7 @@ class _AuthScreenState extends State<AuthScreen> {
onPressed: onTapAuth(state, context),
label: Text(
'Войти',
style: theme.textTheme.titleSmall,
style: theme.textTheme.titleSmall!.copyWith(color: Colors.white),
),
),
);

View File

@@ -26,6 +26,7 @@ class MyProfileBloc extends Bloc<MyProfileEvent, MyProfileState> {
MyProfileInitialEvent event,
Emitter<MyProfileState> emit,
) async {
print('1');
try {
if (!await TokenStorage.haveTokenInStorage()) {
AppRouter.navigatorKey.currentContext?.goNamed('authScreen');
@@ -36,6 +37,7 @@ class MyProfileBloc extends Bloc<MyProfileEvent, MyProfileState> {
'Authorization': 'Bearer ${await TokenStorage.getTokenFromStorage()}',
},
);
print('2');
if (response.statusCode == 200) {
final data = jsonDecode(response.body);
if (data is Map<String, dynamic> &&

View File

@@ -42,49 +42,7 @@ class ThemeHelper {
var colorScheme = _supportedColorScheme[_appTheme] ?? ColorSchemes.primaryColorScheme;
return ThemeData(
textTheme: GoogleFonts.mulishTextTheme().copyWith(
bodyLarge: TextStyle(
color: appTheme.blueGray400,
fontSize: 18,
fontWeight: FontWeight.w400,
),
headlineSmall: TextStyle(
color: colorScheme.primary,
fontWeight: FontWeight.w600,
fontSize: 24,
),
titleMedium: TextStyle(
color: colorScheme.primary,
fontWeight: FontWeight.w700,
fontSize: 18,
),
titleSmall: TextStyle(
color: colorScheme.onPrimary,
fontWeight: FontWeight.w700,
fontSize: 15,
),
bodyMedium: TextStyle(
color: appTheme.blueGray400,
fontWeight: FontWeight.w400,
fontSize: 14,
),
bodySmall: TextStyle(
color: appTheme.gray500,
fontWeight: FontWeight.w400,
fontSize: 10,
),
labelLarge: TextStyle(
color: appTheme.blueGray800,
fontWeight: FontWeight.w600,
fontSize: 12,
),
),
pageTransitionsTheme: PageTransitionsTheme(
builders: {
TargetPlatform.android: CupertinoPageTransitionsBuilder(),
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
},
),
textTheme: GoogleFonts.mulishTextTheme(),
visualDensity: VisualDensity.standard,
colorScheme: colorScheme,
scaffoldBackgroundColor: colorScheme.onPrimary,
@@ -107,7 +65,7 @@ class ThemeHelper {
width: 1,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15),
borderRadius: BorderRadius.circular(12),
),
visualDensity: const VisualDensity(
vertical: -4,

View File

@@ -39,7 +39,7 @@ dependencies:
badges: ^3.1.2
google_fonts: ^6.2.1
location: ^6.0.2
syncfusion_flutter_charts: ^26.2.14
syncfusion_flutter_charts: ^27.1.48
table_calendar: ^3.1.2
flutter_keyboard_visibility: ^6.0.0
share_plus: ^10.0.2