feat: customer page
This commit is contained in:
@@ -0,0 +1,653 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'customer_loader_bloc.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
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',
|
||||
);
|
||||
|
||||
/// @nodoc
|
||||
mixin _$CustomerLoaderEvent {
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function(String search) searchChanged,
|
||||
required TResult Function(bool isRefresh) fetched,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function(String search)? searchChanged,
|
||||
TResult? Function(bool isRefresh)? fetched,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function(String search)? searchChanged,
|
||||
TResult Function(bool isRefresh)? fetched,
|
||||
required TResult orElse(),
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(_SearchChanged value) searchChanged,
|
||||
required TResult Function(_Fetched value) fetched,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(_SearchChanged value)? searchChanged,
|
||||
TResult? Function(_Fetched value)? fetched,
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(_SearchChanged value)? searchChanged,
|
||||
TResult Function(_Fetched value)? fetched,
|
||||
required TResult orElse(),
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CustomerLoaderEventCopyWith<$Res> {
|
||||
factory $CustomerLoaderEventCopyWith(
|
||||
CustomerLoaderEvent value,
|
||||
$Res Function(CustomerLoaderEvent) then,
|
||||
) = _$CustomerLoaderEventCopyWithImpl<$Res, CustomerLoaderEvent>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CustomerLoaderEventCopyWithImpl<$Res, $Val extends CustomerLoaderEvent>
|
||||
implements $CustomerLoaderEventCopyWith<$Res> {
|
||||
_$CustomerLoaderEventCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of CustomerLoaderEvent
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SearchChangedImplCopyWith<$Res> {
|
||||
factory _$$SearchChangedImplCopyWith(
|
||||
_$SearchChangedImpl value,
|
||||
$Res Function(_$SearchChangedImpl) then,
|
||||
) = __$$SearchChangedImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String search});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SearchChangedImplCopyWithImpl<$Res>
|
||||
extends _$CustomerLoaderEventCopyWithImpl<$Res, _$SearchChangedImpl>
|
||||
implements _$$SearchChangedImplCopyWith<$Res> {
|
||||
__$$SearchChangedImplCopyWithImpl(
|
||||
_$SearchChangedImpl _value,
|
||||
$Res Function(_$SearchChangedImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of CustomerLoaderEvent
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? search = null}) {
|
||||
return _then(
|
||||
_$SearchChangedImpl(
|
||||
null == search
|
||||
? _value.search
|
||||
: search // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$SearchChangedImpl implements _SearchChanged {
|
||||
const _$SearchChangedImpl(this.search);
|
||||
|
||||
@override
|
||||
final String search;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CustomerLoaderEvent.searchChanged(search: $search)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$SearchChangedImpl &&
|
||||
(identical(other.search, search) || other.search == search));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, search);
|
||||
|
||||
/// Create a copy of CustomerLoaderEvent
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SearchChangedImplCopyWith<_$SearchChangedImpl> get copyWith =>
|
||||
__$$SearchChangedImplCopyWithImpl<_$SearchChangedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function(String search) searchChanged,
|
||||
required TResult Function(bool isRefresh) fetched,
|
||||
}) {
|
||||
return searchChanged(search);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function(String search)? searchChanged,
|
||||
TResult? Function(bool isRefresh)? fetched,
|
||||
}) {
|
||||
return searchChanged?.call(search);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function(String search)? searchChanged,
|
||||
TResult Function(bool isRefresh)? fetched,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (searchChanged != null) {
|
||||
return searchChanged(search);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(_SearchChanged value) searchChanged,
|
||||
required TResult Function(_Fetched value) fetched,
|
||||
}) {
|
||||
return searchChanged(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(_SearchChanged value)? searchChanged,
|
||||
TResult? Function(_Fetched value)? fetched,
|
||||
}) {
|
||||
return searchChanged?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(_SearchChanged value)? searchChanged,
|
||||
TResult Function(_Fetched value)? fetched,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (searchChanged != null) {
|
||||
return searchChanged(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _SearchChanged implements CustomerLoaderEvent {
|
||||
const factory _SearchChanged(final String search) = _$SearchChangedImpl;
|
||||
|
||||
String get search;
|
||||
|
||||
/// Create a copy of CustomerLoaderEvent
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$SearchChangedImplCopyWith<_$SearchChangedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FetchedImplCopyWith<$Res> {
|
||||
factory _$$FetchedImplCopyWith(
|
||||
_$FetchedImpl value,
|
||||
$Res Function(_$FetchedImpl) then,
|
||||
) = __$$FetchedImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({bool isRefresh});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FetchedImplCopyWithImpl<$Res>
|
||||
extends _$CustomerLoaderEventCopyWithImpl<$Res, _$FetchedImpl>
|
||||
implements _$$FetchedImplCopyWith<$Res> {
|
||||
__$$FetchedImplCopyWithImpl(
|
||||
_$FetchedImpl _value,
|
||||
$Res Function(_$FetchedImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of CustomerLoaderEvent
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? isRefresh = null}) {
|
||||
return _then(
|
||||
_$FetchedImpl(
|
||||
isRefresh: null == isRefresh
|
||||
? _value.isRefresh
|
||||
: isRefresh // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$FetchedImpl implements _Fetched {
|
||||
const _$FetchedImpl({this.isRefresh = false});
|
||||
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool isRefresh;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CustomerLoaderEvent.fetched(isRefresh: $isRefresh)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FetchedImpl &&
|
||||
(identical(other.isRefresh, isRefresh) ||
|
||||
other.isRefresh == isRefresh));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, isRefresh);
|
||||
|
||||
/// Create a copy of CustomerLoaderEvent
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FetchedImplCopyWith<_$FetchedImpl> get copyWith =>
|
||||
__$$FetchedImplCopyWithImpl<_$FetchedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function(String search) searchChanged,
|
||||
required TResult Function(bool isRefresh) fetched,
|
||||
}) {
|
||||
return fetched(isRefresh);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function(String search)? searchChanged,
|
||||
TResult? Function(bool isRefresh)? fetched,
|
||||
}) {
|
||||
return fetched?.call(isRefresh);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function(String search)? searchChanged,
|
||||
TResult Function(bool isRefresh)? fetched,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (fetched != null) {
|
||||
return fetched(isRefresh);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(_SearchChanged value) searchChanged,
|
||||
required TResult Function(_Fetched value) fetched,
|
||||
}) {
|
||||
return fetched(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(_SearchChanged value)? searchChanged,
|
||||
TResult? Function(_Fetched value)? fetched,
|
||||
}) {
|
||||
return fetched?.call(this);
|
||||
}
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(_SearchChanged value)? searchChanged,
|
||||
TResult Function(_Fetched value)? fetched,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (fetched != null) {
|
||||
return fetched(this);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Fetched implements CustomerLoaderEvent {
|
||||
const factory _Fetched({final bool isRefresh}) = _$FetchedImpl;
|
||||
|
||||
bool get isRefresh;
|
||||
|
||||
/// Create a copy of CustomerLoaderEvent
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$FetchedImplCopyWith<_$FetchedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$CustomerLoaderState {
|
||||
List<Customer> get customers => throw _privateConstructorUsedError;
|
||||
Option<CustomerFailure> get failureOptionCustomer =>
|
||||
throw _privateConstructorUsedError;
|
||||
String? get categoryId => throw _privateConstructorUsedError;
|
||||
String? get search => throw _privateConstructorUsedError;
|
||||
bool get isFetching => throw _privateConstructorUsedError;
|
||||
bool get hasReachedMax => throw _privateConstructorUsedError;
|
||||
int get page => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of CustomerLoaderState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$CustomerLoaderStateCopyWith<CustomerLoaderState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CustomerLoaderStateCopyWith<$Res> {
|
||||
factory $CustomerLoaderStateCopyWith(
|
||||
CustomerLoaderState value,
|
||||
$Res Function(CustomerLoaderState) then,
|
||||
) = _$CustomerLoaderStateCopyWithImpl<$Res, CustomerLoaderState>;
|
||||
@useResult
|
||||
$Res call({
|
||||
List<Customer> customers,
|
||||
Option<CustomerFailure> failureOptionCustomer,
|
||||
String? categoryId,
|
||||
String? search,
|
||||
bool isFetching,
|
||||
bool hasReachedMax,
|
||||
int page,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CustomerLoaderStateCopyWithImpl<$Res, $Val extends CustomerLoaderState>
|
||||
implements $CustomerLoaderStateCopyWith<$Res> {
|
||||
_$CustomerLoaderStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of CustomerLoaderState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? customers = null,
|
||||
Object? failureOptionCustomer = null,
|
||||
Object? categoryId = freezed,
|
||||
Object? search = freezed,
|
||||
Object? isFetching = null,
|
||||
Object? hasReachedMax = null,
|
||||
Object? page = null,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
customers: null == customers
|
||||
? _value.customers
|
||||
: customers // ignore: cast_nullable_to_non_nullable
|
||||
as List<Customer>,
|
||||
failureOptionCustomer: null == failureOptionCustomer
|
||||
? _value.failureOptionCustomer
|
||||
: failureOptionCustomer // ignore: cast_nullable_to_non_nullable
|
||||
as Option<CustomerFailure>,
|
||||
categoryId: freezed == categoryId
|
||||
? _value.categoryId
|
||||
: categoryId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
search: freezed == search
|
||||
? _value.search
|
||||
: search // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
isFetching: null == isFetching
|
||||
? _value.isFetching
|
||||
: isFetching // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
hasReachedMax: null == hasReachedMax
|
||||
? _value.hasReachedMax
|
||||
: hasReachedMax // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
page: null == page
|
||||
? _value.page
|
||||
: page // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CustomerLoaderStateImplCopyWith<$Res>
|
||||
implements $CustomerLoaderStateCopyWith<$Res> {
|
||||
factory _$$CustomerLoaderStateImplCopyWith(
|
||||
_$CustomerLoaderStateImpl value,
|
||||
$Res Function(_$CustomerLoaderStateImpl) then,
|
||||
) = __$$CustomerLoaderStateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
List<Customer> customers,
|
||||
Option<CustomerFailure> failureOptionCustomer,
|
||||
String? categoryId,
|
||||
String? search,
|
||||
bool isFetching,
|
||||
bool hasReachedMax,
|
||||
int page,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CustomerLoaderStateImplCopyWithImpl<$Res>
|
||||
extends _$CustomerLoaderStateCopyWithImpl<$Res, _$CustomerLoaderStateImpl>
|
||||
implements _$$CustomerLoaderStateImplCopyWith<$Res> {
|
||||
__$$CustomerLoaderStateImplCopyWithImpl(
|
||||
_$CustomerLoaderStateImpl _value,
|
||||
$Res Function(_$CustomerLoaderStateImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of CustomerLoaderState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? customers = null,
|
||||
Object? failureOptionCustomer = null,
|
||||
Object? categoryId = freezed,
|
||||
Object? search = freezed,
|
||||
Object? isFetching = null,
|
||||
Object? hasReachedMax = null,
|
||||
Object? page = null,
|
||||
}) {
|
||||
return _then(
|
||||
_$CustomerLoaderStateImpl(
|
||||
customers: null == customers
|
||||
? _value._customers
|
||||
: customers // ignore: cast_nullable_to_non_nullable
|
||||
as List<Customer>,
|
||||
failureOptionCustomer: null == failureOptionCustomer
|
||||
? _value.failureOptionCustomer
|
||||
: failureOptionCustomer // ignore: cast_nullable_to_non_nullable
|
||||
as Option<CustomerFailure>,
|
||||
categoryId: freezed == categoryId
|
||||
? _value.categoryId
|
||||
: categoryId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
search: freezed == search
|
||||
? _value.search
|
||||
: search // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
isFetching: null == isFetching
|
||||
? _value.isFetching
|
||||
: isFetching // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
hasReachedMax: null == hasReachedMax
|
||||
? _value.hasReachedMax
|
||||
: hasReachedMax // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
page: null == page
|
||||
? _value.page
|
||||
: page // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$CustomerLoaderStateImpl implements _CustomerLoaderState {
|
||||
const _$CustomerLoaderStateImpl({
|
||||
required final List<Customer> customers,
|
||||
required this.failureOptionCustomer,
|
||||
this.categoryId,
|
||||
this.search,
|
||||
this.isFetching = false,
|
||||
this.hasReachedMax = false,
|
||||
this.page = 1,
|
||||
}) : _customers = customers;
|
||||
|
||||
final List<Customer> _customers;
|
||||
@override
|
||||
List<Customer> get customers {
|
||||
if (_customers is EqualUnmodifiableListView) return _customers;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_customers);
|
||||
}
|
||||
|
||||
@override
|
||||
final Option<CustomerFailure> failureOptionCustomer;
|
||||
@override
|
||||
final String? categoryId;
|
||||
@override
|
||||
final String? search;
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool isFetching;
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool hasReachedMax;
|
||||
@override
|
||||
@JsonKey()
|
||||
final int page;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CustomerLoaderState(customers: $customers, failureOptionCustomer: $failureOptionCustomer, categoryId: $categoryId, search: $search, isFetching: $isFetching, hasReachedMax: $hasReachedMax, page: $page)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CustomerLoaderStateImpl &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._customers,
|
||||
_customers,
|
||||
) &&
|
||||
(identical(other.failureOptionCustomer, failureOptionCustomer) ||
|
||||
other.failureOptionCustomer == failureOptionCustomer) &&
|
||||
(identical(other.categoryId, categoryId) ||
|
||||
other.categoryId == categoryId) &&
|
||||
(identical(other.search, search) || other.search == search) &&
|
||||
(identical(other.isFetching, isFetching) ||
|
||||
other.isFetching == isFetching) &&
|
||||
(identical(other.hasReachedMax, hasReachedMax) ||
|
||||
other.hasReachedMax == hasReachedMax) &&
|
||||
(identical(other.page, page) || other.page == page));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_customers),
|
||||
failureOptionCustomer,
|
||||
categoryId,
|
||||
search,
|
||||
isFetching,
|
||||
hasReachedMax,
|
||||
page,
|
||||
);
|
||||
|
||||
/// Create a copy of CustomerLoaderState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CustomerLoaderStateImplCopyWith<_$CustomerLoaderStateImpl> get copyWith =>
|
||||
__$$CustomerLoaderStateImplCopyWithImpl<_$CustomerLoaderStateImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
}
|
||||
|
||||
abstract class _CustomerLoaderState implements CustomerLoaderState {
|
||||
const factory _CustomerLoaderState({
|
||||
required final List<Customer> customers,
|
||||
required final Option<CustomerFailure> failureOptionCustomer,
|
||||
final String? categoryId,
|
||||
final String? search,
|
||||
final bool isFetching,
|
||||
final bool hasReachedMax,
|
||||
final int page,
|
||||
}) = _$CustomerLoaderStateImpl;
|
||||
|
||||
@override
|
||||
List<Customer> get customers;
|
||||
@override
|
||||
Option<CustomerFailure> get failureOptionCustomer;
|
||||
@override
|
||||
String? get categoryId;
|
||||
@override
|
||||
String? get search;
|
||||
@override
|
||||
bool get isFetching;
|
||||
@override
|
||||
bool get hasReachedMax;
|
||||
@override
|
||||
int get page;
|
||||
|
||||
/// Create a copy of CustomerLoaderState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CustomerLoaderStateImplCopyWith<_$CustomerLoaderStateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
Reference in New Issue
Block a user