|
|
|
|
@ -18,39 +18,45 @@ final _privateConstructorUsedError = UnsupportedError(
|
|
|
|
|
mixin _$GetProductsEvent {
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function() started,
|
|
|
|
|
required TResult Function() fetch,
|
|
|
|
|
required TResult Function() loadMore,
|
|
|
|
|
required TResult Function() refresh,
|
|
|
|
|
}) =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function()? started,
|
|
|
|
|
TResult? Function()? fetch,
|
|
|
|
|
TResult? Function()? loadMore,
|
|
|
|
|
TResult? Function()? refresh,
|
|
|
|
|
}) =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function()? started,
|
|
|
|
|
TResult Function()? fetch,
|
|
|
|
|
TResult Function()? loadMore,
|
|
|
|
|
TResult Function()? refresh,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult map<TResult extends Object?>({
|
|
|
|
|
required TResult Function(_Started value) started,
|
|
|
|
|
required TResult Function(_Fetch value) fetch,
|
|
|
|
|
required TResult Function(_LoadMore value) loadMore,
|
|
|
|
|
required TResult Function(_Refresh value) refresh,
|
|
|
|
|
}) =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(_Started value)? started,
|
|
|
|
|
TResult? Function(_Fetch value)? fetch,
|
|
|
|
|
TResult? Function(_LoadMore value)? loadMore,
|
|
|
|
|
TResult? Function(_Refresh value)? refresh,
|
|
|
|
|
}) =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeMap<TResult extends Object?>({
|
|
|
|
|
TResult Function(_Started value)? started,
|
|
|
|
|
TResult Function(_Fetch value)? fetch,
|
|
|
|
|
TResult Function(_LoadMore value)? loadMore,
|
|
|
|
|
TResult Function(_Refresh value)? refresh,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
@ -77,111 +83,6 @@ class _$GetProductsEventCopyWithImpl<$Res, $Val extends GetProductsEvent>
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class _$$StartedImplCopyWith<$Res> {
|
|
|
|
|
factory _$$StartedImplCopyWith(
|
|
|
|
|
_$StartedImpl value, $Res Function(_$StartedImpl) then) =
|
|
|
|
|
__$$StartedImplCopyWithImpl<$Res>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class __$$StartedImplCopyWithImpl<$Res>
|
|
|
|
|
extends _$GetProductsEventCopyWithImpl<$Res, _$StartedImpl>
|
|
|
|
|
implements _$$StartedImplCopyWith<$Res> {
|
|
|
|
|
__$$StartedImplCopyWithImpl(
|
|
|
|
|
_$StartedImpl _value, $Res Function(_$StartedImpl) _then)
|
|
|
|
|
: super(_value, _then);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of GetProductsEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
|
|
|
|
class _$StartedImpl implements _Started {
|
|
|
|
|
const _$StartedImpl();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'GetProductsEvent.started()';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) ||
|
|
|
|
|
(other.runtimeType == runtimeType && other is _$StartedImpl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function() started,
|
|
|
|
|
required TResult Function() fetch,
|
|
|
|
|
}) {
|
|
|
|
|
return started();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function()? started,
|
|
|
|
|
TResult? Function()? fetch,
|
|
|
|
|
}) {
|
|
|
|
|
return started?.call();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function()? started,
|
|
|
|
|
TResult Function()? fetch,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (started != null) {
|
|
|
|
|
return started();
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult map<TResult extends Object?>({
|
|
|
|
|
required TResult Function(_Started value) started,
|
|
|
|
|
required TResult Function(_Fetch value) fetch,
|
|
|
|
|
}) {
|
|
|
|
|
return started(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(_Started value)? started,
|
|
|
|
|
TResult? Function(_Fetch value)? fetch,
|
|
|
|
|
}) {
|
|
|
|
|
return started?.call(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeMap<TResult extends Object?>({
|
|
|
|
|
TResult Function(_Started value)? started,
|
|
|
|
|
TResult Function(_Fetch value)? fetch,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (started != null) {
|
|
|
|
|
return started(this);
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abstract class _Started implements GetProductsEvent {
|
|
|
|
|
const factory _Started() = _$StartedImpl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class _$$FetchImplCopyWith<$Res> {
|
|
|
|
|
factory _$$FetchImplCopyWith(
|
|
|
|
|
@ -223,8 +124,9 @@ class _$FetchImpl implements _Fetch {
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function() started,
|
|
|
|
|
required TResult Function() fetch,
|
|
|
|
|
required TResult Function() loadMore,
|
|
|
|
|
required TResult Function() refresh,
|
|
|
|
|
}) {
|
|
|
|
|
return fetch();
|
|
|
|
|
}
|
|
|
|
|
@ -232,8 +134,9 @@ class _$FetchImpl implements _Fetch {
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function()? started,
|
|
|
|
|
TResult? Function()? fetch,
|
|
|
|
|
TResult? Function()? loadMore,
|
|
|
|
|
TResult? Function()? refresh,
|
|
|
|
|
}) {
|
|
|
|
|
return fetch?.call();
|
|
|
|
|
}
|
|
|
|
|
@ -241,8 +144,9 @@ class _$FetchImpl implements _Fetch {
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function()? started,
|
|
|
|
|
TResult Function()? fetch,
|
|
|
|
|
TResult Function()? loadMore,
|
|
|
|
|
TResult Function()? refresh,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (fetch != null) {
|
|
|
|
|
@ -254,8 +158,9 @@ class _$FetchImpl implements _Fetch {
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult map<TResult extends Object?>({
|
|
|
|
|
required TResult Function(_Started value) started,
|
|
|
|
|
required TResult Function(_Fetch value) fetch,
|
|
|
|
|
required TResult Function(_LoadMore value) loadMore,
|
|
|
|
|
required TResult Function(_Refresh value) refresh,
|
|
|
|
|
}) {
|
|
|
|
|
return fetch(this);
|
|
|
|
|
}
|
|
|
|
|
@ -263,8 +168,9 @@ class _$FetchImpl implements _Fetch {
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(_Started value)? started,
|
|
|
|
|
TResult? Function(_Fetch value)? fetch,
|
|
|
|
|
TResult? Function(_LoadMore value)? loadMore,
|
|
|
|
|
TResult? Function(_Refresh value)? refresh,
|
|
|
|
|
}) {
|
|
|
|
|
return fetch?.call(this);
|
|
|
|
|
}
|
|
|
|
|
@ -272,8 +178,9 @@ class _$FetchImpl implements _Fetch {
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeMap<TResult extends Object?>({
|
|
|
|
|
TResult Function(_Started value)? started,
|
|
|
|
|
TResult Function(_Fetch value)? fetch,
|
|
|
|
|
TResult Function(_LoadMore value)? loadMore,
|
|
|
|
|
TResult Function(_Refresh value)? refresh,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (fetch != null) {
|
|
|
|
|
@ -287,13 +194,237 @@ abstract class _Fetch implements GetProductsEvent {
|
|
|
|
|
const factory _Fetch() = _$FetchImpl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class _$$LoadMoreImplCopyWith<$Res> {
|
|
|
|
|
factory _$$LoadMoreImplCopyWith(
|
|
|
|
|
_$LoadMoreImpl value, $Res Function(_$LoadMoreImpl) then) =
|
|
|
|
|
__$$LoadMoreImplCopyWithImpl<$Res>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class __$$LoadMoreImplCopyWithImpl<$Res>
|
|
|
|
|
extends _$GetProductsEventCopyWithImpl<$Res, _$LoadMoreImpl>
|
|
|
|
|
implements _$$LoadMoreImplCopyWith<$Res> {
|
|
|
|
|
__$$LoadMoreImplCopyWithImpl(
|
|
|
|
|
_$LoadMoreImpl _value, $Res Function(_$LoadMoreImpl) _then)
|
|
|
|
|
: super(_value, _then);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of GetProductsEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
|
|
|
|
class _$LoadMoreImpl implements _LoadMore {
|
|
|
|
|
const _$LoadMoreImpl();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'GetProductsEvent.loadMore()';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) ||
|
|
|
|
|
(other.runtimeType == runtimeType && other is _$LoadMoreImpl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function() fetch,
|
|
|
|
|
required TResult Function() loadMore,
|
|
|
|
|
required TResult Function() refresh,
|
|
|
|
|
}) {
|
|
|
|
|
return loadMore();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function()? fetch,
|
|
|
|
|
TResult? Function()? loadMore,
|
|
|
|
|
TResult? Function()? refresh,
|
|
|
|
|
}) {
|
|
|
|
|
return loadMore?.call();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function()? fetch,
|
|
|
|
|
TResult Function()? loadMore,
|
|
|
|
|
TResult Function()? refresh,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (loadMore != null) {
|
|
|
|
|
return loadMore();
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult map<TResult extends Object?>({
|
|
|
|
|
required TResult Function(_Fetch value) fetch,
|
|
|
|
|
required TResult Function(_LoadMore value) loadMore,
|
|
|
|
|
required TResult Function(_Refresh value) refresh,
|
|
|
|
|
}) {
|
|
|
|
|
return loadMore(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(_Fetch value)? fetch,
|
|
|
|
|
TResult? Function(_LoadMore value)? loadMore,
|
|
|
|
|
TResult? Function(_Refresh value)? refresh,
|
|
|
|
|
}) {
|
|
|
|
|
return loadMore?.call(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeMap<TResult extends Object?>({
|
|
|
|
|
TResult Function(_Fetch value)? fetch,
|
|
|
|
|
TResult Function(_LoadMore value)? loadMore,
|
|
|
|
|
TResult Function(_Refresh value)? refresh,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (loadMore != null) {
|
|
|
|
|
return loadMore(this);
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abstract class _LoadMore implements GetProductsEvent {
|
|
|
|
|
const factory _LoadMore() = _$LoadMoreImpl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class _$$RefreshImplCopyWith<$Res> {
|
|
|
|
|
factory _$$RefreshImplCopyWith(
|
|
|
|
|
_$RefreshImpl value, $Res Function(_$RefreshImpl) then) =
|
|
|
|
|
__$$RefreshImplCopyWithImpl<$Res>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class __$$RefreshImplCopyWithImpl<$Res>
|
|
|
|
|
extends _$GetProductsEventCopyWithImpl<$Res, _$RefreshImpl>
|
|
|
|
|
implements _$$RefreshImplCopyWith<$Res> {
|
|
|
|
|
__$$RefreshImplCopyWithImpl(
|
|
|
|
|
_$RefreshImpl _value, $Res Function(_$RefreshImpl) _then)
|
|
|
|
|
: super(_value, _then);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of GetProductsEvent
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
|
|
|
|
class _$RefreshImpl implements _Refresh {
|
|
|
|
|
const _$RefreshImpl();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'GetProductsEvent.refresh()';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) ||
|
|
|
|
|
(other.runtimeType == runtimeType && other is _$RefreshImpl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function() fetch,
|
|
|
|
|
required TResult Function() loadMore,
|
|
|
|
|
required TResult Function() refresh,
|
|
|
|
|
}) {
|
|
|
|
|
return refresh();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function()? fetch,
|
|
|
|
|
TResult? Function()? loadMore,
|
|
|
|
|
TResult? Function()? refresh,
|
|
|
|
|
}) {
|
|
|
|
|
return refresh?.call();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function()? fetch,
|
|
|
|
|
TResult Function()? loadMore,
|
|
|
|
|
TResult Function()? refresh,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (refresh != null) {
|
|
|
|
|
return refresh();
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult map<TResult extends Object?>({
|
|
|
|
|
required TResult Function(_Fetch value) fetch,
|
|
|
|
|
required TResult Function(_LoadMore value) loadMore,
|
|
|
|
|
required TResult Function(_Refresh value) refresh,
|
|
|
|
|
}) {
|
|
|
|
|
return refresh(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function(_Fetch value)? fetch,
|
|
|
|
|
TResult? Function(_LoadMore value)? loadMore,
|
|
|
|
|
TResult? Function(_Refresh value)? refresh,
|
|
|
|
|
}) {
|
|
|
|
|
return refresh?.call(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult maybeMap<TResult extends Object?>({
|
|
|
|
|
TResult Function(_Fetch value)? fetch,
|
|
|
|
|
TResult Function(_LoadMore value)? loadMore,
|
|
|
|
|
TResult Function(_Refresh value)? refresh,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (refresh != null) {
|
|
|
|
|
return refresh(this);
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abstract class _Refresh implements GetProductsEvent {
|
|
|
|
|
const factory _Refresh() = _$RefreshImpl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
mixin _$GetProductsState {
|
|
|
|
|
@optionalTypeArgs
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function() initial,
|
|
|
|
|
required TResult Function() loading,
|
|
|
|
|
required TResult Function(List<Product> products) success,
|
|
|
|
|
required TResult Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)
|
|
|
|
|
success,
|
|
|
|
|
required TResult Function(String message) error,
|
|
|
|
|
}) =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
@ -301,7 +432,9 @@ mixin _$GetProductsState {
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function()? initial,
|
|
|
|
|
TResult? Function()? loading,
|
|
|
|
|
TResult? Function(List<Product> products)? success,
|
|
|
|
|
TResult? Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)?
|
|
|
|
|
success,
|
|
|
|
|
TResult? Function(String message)? error,
|
|
|
|
|
}) =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
@ -309,7 +442,9 @@ mixin _$GetProductsState {
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function()? initial,
|
|
|
|
|
TResult Function()? loading,
|
|
|
|
|
TResult Function(List<Product> products)? success,
|
|
|
|
|
TResult Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)?
|
|
|
|
|
success,
|
|
|
|
|
TResult Function(String message)? error,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) =>
|
|
|
|
|
@ -405,7 +540,9 @@ class _$InitialImpl implements _Initial {
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function() initial,
|
|
|
|
|
required TResult Function() loading,
|
|
|
|
|
required TResult Function(List<Product> products) success,
|
|
|
|
|
required TResult Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)
|
|
|
|
|
success,
|
|
|
|
|
required TResult Function(String message) error,
|
|
|
|
|
}) {
|
|
|
|
|
return initial();
|
|
|
|
|
@ -416,7 +553,9 @@ class _$InitialImpl implements _Initial {
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function()? initial,
|
|
|
|
|
TResult? Function()? loading,
|
|
|
|
|
TResult? Function(List<Product> products)? success,
|
|
|
|
|
TResult? Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)?
|
|
|
|
|
success,
|
|
|
|
|
TResult? Function(String message)? error,
|
|
|
|
|
}) {
|
|
|
|
|
return initial?.call();
|
|
|
|
|
@ -427,7 +566,9 @@ class _$InitialImpl implements _Initial {
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function()? initial,
|
|
|
|
|
TResult Function()? loading,
|
|
|
|
|
TResult Function(List<Product> products)? success,
|
|
|
|
|
TResult Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)?
|
|
|
|
|
success,
|
|
|
|
|
TResult Function(String message)? error,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
@ -522,7 +663,9 @@ class _$LoadingImpl implements _Loading {
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function() initial,
|
|
|
|
|
required TResult Function() loading,
|
|
|
|
|
required TResult Function(List<Product> products) success,
|
|
|
|
|
required TResult Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)
|
|
|
|
|
success,
|
|
|
|
|
required TResult Function(String message) error,
|
|
|
|
|
}) {
|
|
|
|
|
return loading();
|
|
|
|
|
@ -533,7 +676,9 @@ class _$LoadingImpl implements _Loading {
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function()? initial,
|
|
|
|
|
TResult? Function()? loading,
|
|
|
|
|
TResult? Function(List<Product> products)? success,
|
|
|
|
|
TResult? Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)?
|
|
|
|
|
success,
|
|
|
|
|
TResult? Function(String message)? error,
|
|
|
|
|
}) {
|
|
|
|
|
return loading?.call();
|
|
|
|
|
@ -544,7 +689,9 @@ class _$LoadingImpl implements _Loading {
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function()? initial,
|
|
|
|
|
TResult Function()? loading,
|
|
|
|
|
TResult Function(List<Product> products)? success,
|
|
|
|
|
TResult Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)?
|
|
|
|
|
success,
|
|
|
|
|
TResult Function(String message)? error,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
@ -602,7 +749,11 @@ abstract class _$$SuccessImplCopyWith<$Res> {
|
|
|
|
|
_$SuccessImpl value, $Res Function(_$SuccessImpl) then) =
|
|
|
|
|
__$$SuccessImplCopyWithImpl<$Res>;
|
|
|
|
|
@useResult
|
|
|
|
|
$Res call({List<Product> products});
|
|
|
|
|
$Res call(
|
|
|
|
|
{List<Product> products,
|
|
|
|
|
bool hasReachedMax,
|
|
|
|
|
int currentPage,
|
|
|
|
|
bool isLoadingMore});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
@ -619,12 +770,27 @@ class __$$SuccessImplCopyWithImpl<$Res>
|
|
|
|
|
@override
|
|
|
|
|
$Res call({
|
|
|
|
|
Object? products = null,
|
|
|
|
|
Object? hasReachedMax = null,
|
|
|
|
|
Object? currentPage = null,
|
|
|
|
|
Object? isLoadingMore = null,
|
|
|
|
|
}) {
|
|
|
|
|
return _then(_$SuccessImpl(
|
|
|
|
|
null == products
|
|
|
|
|
products: null == products
|
|
|
|
|
? _value._products
|
|
|
|
|
: products // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as List<Product>,
|
|
|
|
|
hasReachedMax: null == hasReachedMax
|
|
|
|
|
? _value.hasReachedMax
|
|
|
|
|
: hasReachedMax // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as bool,
|
|
|
|
|
currentPage: null == currentPage
|
|
|
|
|
? _value.currentPage
|
|
|
|
|
: currentPage // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as int,
|
|
|
|
|
isLoadingMore: null == isLoadingMore
|
|
|
|
|
? _value.isLoadingMore
|
|
|
|
|
: isLoadingMore // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as bool,
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -632,7 +798,12 @@ class __$$SuccessImplCopyWithImpl<$Res>
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
|
|
|
|
class _$SuccessImpl implements _Success {
|
|
|
|
|
const _$SuccessImpl(final List<Product> products) : _products = products;
|
|
|
|
|
const _$SuccessImpl(
|
|
|
|
|
{required final List<Product> products,
|
|
|
|
|
required this.hasReachedMax,
|
|
|
|
|
required this.currentPage,
|
|
|
|
|
required this.isLoadingMore})
|
|
|
|
|
: _products = products;
|
|
|
|
|
|
|
|
|
|
final List<Product> _products;
|
|
|
|
|
@override
|
|
|
|
|
@ -642,9 +813,16 @@ class _$SuccessImpl implements _Success {
|
|
|
|
|
return EqualUnmodifiableListView(_products);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
final bool hasReachedMax;
|
|
|
|
|
@override
|
|
|
|
|
final int currentPage;
|
|
|
|
|
@override
|
|
|
|
|
final bool isLoadingMore;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'GetProductsState.success(products: $products)';
|
|
|
|
|
return 'GetProductsState.success(products: $products, hasReachedMax: $hasReachedMax, currentPage: $currentPage, isLoadingMore: $isLoadingMore)';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@ -652,12 +830,22 @@ class _$SuccessImpl implements _Success {
|
|
|
|
|
return identical(this, other) ||
|
|
|
|
|
(other.runtimeType == runtimeType &&
|
|
|
|
|
other is _$SuccessImpl &&
|
|
|
|
|
const DeepCollectionEquality().equals(other._products, _products));
|
|
|
|
|
const DeepCollectionEquality().equals(other._products, _products) &&
|
|
|
|
|
(identical(other.hasReachedMax, hasReachedMax) ||
|
|
|
|
|
other.hasReachedMax == hasReachedMax) &&
|
|
|
|
|
(identical(other.currentPage, currentPage) ||
|
|
|
|
|
other.currentPage == currentPage) &&
|
|
|
|
|
(identical(other.isLoadingMore, isLoadingMore) ||
|
|
|
|
|
other.isLoadingMore == isLoadingMore));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode =>
|
|
|
|
|
Object.hash(runtimeType, const DeepCollectionEquality().hash(_products));
|
|
|
|
|
int get hashCode => Object.hash(
|
|
|
|
|
runtimeType,
|
|
|
|
|
const DeepCollectionEquality().hash(_products),
|
|
|
|
|
hasReachedMax,
|
|
|
|
|
currentPage,
|
|
|
|
|
isLoadingMore);
|
|
|
|
|
|
|
|
|
|
/// Create a copy of GetProductsState
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@ -672,10 +860,12 @@ class _$SuccessImpl implements _Success {
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function() initial,
|
|
|
|
|
required TResult Function() loading,
|
|
|
|
|
required TResult Function(List<Product> products) success,
|
|
|
|
|
required TResult Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)
|
|
|
|
|
success,
|
|
|
|
|
required TResult Function(String message) error,
|
|
|
|
|
}) {
|
|
|
|
|
return success(products);
|
|
|
|
|
return success(products, hasReachedMax, currentPage, isLoadingMore);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@ -683,10 +873,12 @@ class _$SuccessImpl implements _Success {
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function()? initial,
|
|
|
|
|
TResult? Function()? loading,
|
|
|
|
|
TResult? Function(List<Product> products)? success,
|
|
|
|
|
TResult? Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)?
|
|
|
|
|
success,
|
|
|
|
|
TResult? Function(String message)? error,
|
|
|
|
|
}) {
|
|
|
|
|
return success?.call(products);
|
|
|
|
|
return success?.call(products, hasReachedMax, currentPage, isLoadingMore);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@ -694,12 +886,14 @@ class _$SuccessImpl implements _Success {
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function()? initial,
|
|
|
|
|
TResult Function()? loading,
|
|
|
|
|
TResult Function(List<Product> products)? success,
|
|
|
|
|
TResult Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)?
|
|
|
|
|
success,
|
|
|
|
|
TResult Function(String message)? error,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
if (success != null) {
|
|
|
|
|
return success(products);
|
|
|
|
|
return success(products, hasReachedMax, currentPage, isLoadingMore);
|
|
|
|
|
}
|
|
|
|
|
return orElse();
|
|
|
|
|
}
|
|
|
|
|
@ -743,9 +937,16 @@ class _$SuccessImpl implements _Success {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abstract class _Success implements GetProductsState {
|
|
|
|
|
const factory _Success(final List<Product> products) = _$SuccessImpl;
|
|
|
|
|
const factory _Success(
|
|
|
|
|
{required final List<Product> products,
|
|
|
|
|
required final bool hasReachedMax,
|
|
|
|
|
required final int currentPage,
|
|
|
|
|
required final bool isLoadingMore}) = _$SuccessImpl;
|
|
|
|
|
|
|
|
|
|
List<Product> get products;
|
|
|
|
|
bool get hasReachedMax;
|
|
|
|
|
int get currentPage;
|
|
|
|
|
bool get isLoadingMore;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of GetProductsState
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@ -824,7 +1025,9 @@ class _$ErrorImpl implements _Error {
|
|
|
|
|
TResult when<TResult extends Object?>({
|
|
|
|
|
required TResult Function() initial,
|
|
|
|
|
required TResult Function() loading,
|
|
|
|
|
required TResult Function(List<Product> products) success,
|
|
|
|
|
required TResult Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)
|
|
|
|
|
success,
|
|
|
|
|
required TResult Function(String message) error,
|
|
|
|
|
}) {
|
|
|
|
|
return error(message);
|
|
|
|
|
@ -835,7 +1038,9 @@ class _$ErrorImpl implements _Error {
|
|
|
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
|
|
|
TResult? Function()? initial,
|
|
|
|
|
TResult? Function()? loading,
|
|
|
|
|
TResult? Function(List<Product> products)? success,
|
|
|
|
|
TResult? Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)?
|
|
|
|
|
success,
|
|
|
|
|
TResult? Function(String message)? error,
|
|
|
|
|
}) {
|
|
|
|
|
return error?.call(message);
|
|
|
|
|
@ -846,7 +1051,9 @@ class _$ErrorImpl implements _Error {
|
|
|
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
|
|
|
TResult Function()? initial,
|
|
|
|
|
TResult Function()? loading,
|
|
|
|
|
TResult Function(List<Product> products)? success,
|
|
|
|
|
TResult Function(List<Product> products, bool hasReachedMax,
|
|
|
|
|
int currentPage, bool isLoadingMore)?
|
|
|
|
|
success,
|
|
|
|
|
TResult Function(String message)? error,
|
|
|
|
|
required TResult orElse(),
|
|
|
|
|
}) {
|
|
|
|
|
|