- Wallet EnakPoint & EnakCoin: beranda, riwayat, saldo kedaluwarsa, kode bayar, tukar EnakCoin, transfer - PIN (buat, ganti, lupa), outlet, riwayat order, game spin - Halaman community, webview, coming soon, dan ikon menu beranda baru - Redesign Reward Saya: kartu tiket, filter chip, detail kode + QR - Hapus customer point loader, menu, dan checkout lama - Base URL ke enaklo-pos-api.altru.id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
525 lines
15 KiB
Dart
525 lines
15 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// coverage:ignore-file
|
|
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
|
// 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 'outlet_loader_bloc.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// dart format off
|
|
T _$identity<T>(T value) => value;
|
|
/// @nodoc
|
|
mixin _$OutletLoaderEvent {
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is OutletLoaderEvent);
|
|
}
|
|
|
|
|
|
@override
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'OutletLoaderEvent()';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
class $OutletLoaderEventCopyWith<$Res> {
|
|
$OutletLoaderEventCopyWith(OutletLoaderEvent _, $Res Function(OutletLoaderEvent) __);
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [OutletLoaderEvent].
|
|
extension OutletLoaderEventPatterns on OutletLoaderEvent {
|
|
/// A variant of `map` that fallback to returning `orElse`.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case _:
|
|
/// return orElse();
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( _Fetched value)? fetched,TResult Function( _Cleared value)? cleared,required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _Fetched() when fetched != null:
|
|
return fetched(_that);case _Cleared() when cleared != null:
|
|
return cleared(_that);case _:
|
|
return orElse();
|
|
|
|
}
|
|
}
|
|
/// A `switch`-like method, using callbacks.
|
|
///
|
|
/// Callbacks receives the raw object, upcasted.
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case final Subclass2 value:
|
|
/// return ...;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( _Fetched value) fetched,required TResult Function( _Cleared value) cleared,}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _Fetched():
|
|
return fetched(_that);case _Cleared():
|
|
return cleared(_that);case _:
|
|
throw StateError('Unexpected subclass');
|
|
|
|
}
|
|
}
|
|
/// A variant of `map` that fallback to returning `null`.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case _:
|
|
/// return null;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( _Fetched value)? fetched,TResult? Function( _Cleared value)? cleared,}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _Fetched() when fetched != null:
|
|
return fetched(_that);case _Cleared() when cleared != null:
|
|
return cleared(_that);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
/// A variant of `when` that fallback to an `orElse` callback.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case _:
|
|
/// return orElse();
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? fetched,TResult Function()? cleared,required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _Fetched() when fetched != null:
|
|
return fetched();case _Cleared() when cleared != null:
|
|
return cleared();case _:
|
|
return orElse();
|
|
|
|
}
|
|
}
|
|
/// A `switch`-like method, using callbacks.
|
|
///
|
|
/// As opposed to `map`, this offers destructuring.
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case Subclass2(:final field2):
|
|
/// return ...;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() fetched,required TResult Function() cleared,}) {final _that = this;
|
|
switch (_that) {
|
|
case _Fetched():
|
|
return fetched();case _Cleared():
|
|
return cleared();case _:
|
|
throw StateError('Unexpected subclass');
|
|
|
|
}
|
|
}
|
|
/// A variant of `when` that fallback to returning `null`
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case _:
|
|
/// return null;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function()? fetched,TResult? Function()? cleared,}) {final _that = this;
|
|
switch (_that) {
|
|
case _Fetched() when fetched != null:
|
|
return fetched();case _Cleared() when cleared != null:
|
|
return cleared();case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
|
|
class _Fetched implements OutletLoaderEvent {
|
|
const _Fetched();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Fetched);
|
|
}
|
|
|
|
|
|
@override
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'OutletLoaderEvent.fetched()';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
class _Cleared implements OutletLoaderEvent {
|
|
const _Cleared();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Cleared);
|
|
}
|
|
|
|
|
|
@override
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'OutletLoaderEvent.cleared()';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
mixin _$OutletLoaderState {
|
|
|
|
List<Outlet> get outlets; Option<WalletFailure> get failureOption; bool get isFetching; bool get hasLoaded;
|
|
/// Create a copy of OutletLoaderState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$OutletLoaderStateCopyWith<OutletLoaderState> get copyWith => _$OutletLoaderStateCopyWithImpl<OutletLoaderState>(this as OutletLoaderState, _$identity);
|
|
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
final _this = this as OutletLoaderState;
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is OutletLoaderState&&const DeepCollectionEquality().equals(other.outlets, _this.outlets)&&(identical(other.failureOption, _this.failureOption) || other.failureOption == _this.failureOption)&&(identical(other.isFetching, _this.isFetching) || other.isFetching == _this.isFetching)&&(identical(other.hasLoaded, _this.hasLoaded) || other.hasLoaded == _this.hasLoaded));
|
|
}
|
|
|
|
|
|
@override
|
|
int get hashCode {
|
|
final _this = this as OutletLoaderState;
|
|
return Object.hash(runtimeType,const DeepCollectionEquality().hash(_this.outlets),_this.failureOption,_this.isFetching,_this.hasLoaded);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
final _this = this as OutletLoaderState;
|
|
return 'OutletLoaderState(outlets: ${_this.outlets}, failureOption: ${_this.failureOption}, isFetching: ${_this.isFetching}, hasLoaded: ${_this.hasLoaded})';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $OutletLoaderStateCopyWith<$Res> {
|
|
factory $OutletLoaderStateCopyWith(OutletLoaderState value, $Res Function(OutletLoaderState) _then) = _$OutletLoaderStateCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
List<Outlet> outlets, Option<WalletFailure> failureOption, bool isFetching, bool hasLoaded
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$OutletLoaderStateCopyWithImpl<$Res>
|
|
implements $OutletLoaderStateCopyWith<$Res> {
|
|
_$OutletLoaderStateCopyWithImpl(this._self, this._then);
|
|
|
|
final OutletLoaderState _self;
|
|
final $Res Function(OutletLoaderState) _then;
|
|
|
|
/// Create a copy of OutletLoaderState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? outlets = null,Object? failureOption = null,Object? isFetching = null,Object? hasLoaded = null,}) {
|
|
return _then(OutletLoaderState(
|
|
outlets: null == outlets ? _self.outlets : outlets // ignore: cast_nullable_to_non_nullable
|
|
as List<Outlet>,failureOption: null == failureOption ? _self.failureOption : failureOption // ignore: cast_nullable_to_non_nullable
|
|
as Option<WalletFailure>,isFetching: null == isFetching ? _self.isFetching : isFetching // ignore: cast_nullable_to_non_nullable
|
|
as bool,hasLoaded: null == hasLoaded ? _self.hasLoaded : hasLoaded // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [OutletLoaderState].
|
|
extension OutletLoaderStatePatterns on OutletLoaderState {
|
|
/// A variant of `map` that fallback to returning `orElse`.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case _:
|
|
/// return orElse();
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _OutletLoaderState value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _OutletLoaderState() when $default != null:
|
|
return $default(_that);case _:
|
|
return orElse();
|
|
|
|
}
|
|
}
|
|
/// A `switch`-like method, using callbacks.
|
|
///
|
|
/// Callbacks receives the raw object, upcasted.
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case final Subclass2 value:
|
|
/// return ...;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _OutletLoaderState value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _OutletLoaderState():
|
|
return $default(_that);case _:
|
|
throw StateError('Unexpected subclass');
|
|
|
|
}
|
|
}
|
|
/// A variant of `map` that fallback to returning `null`.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case _:
|
|
/// return null;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _OutletLoaderState value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _OutletLoaderState() when $default != null:
|
|
return $default(_that);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
/// A variant of `when` that fallback to an `orElse` callback.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case _:
|
|
/// return orElse();
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<Outlet> outlets, Option<WalletFailure> failureOption, bool isFetching, bool hasLoaded)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _OutletLoaderState() when $default != null:
|
|
return $default(_that.outlets,_that.failureOption,_that.isFetching,_that.hasLoaded);case _:
|
|
return orElse();
|
|
|
|
}
|
|
}
|
|
/// A `switch`-like method, using callbacks.
|
|
///
|
|
/// As opposed to `map`, this offers destructuring.
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case Subclass2(:final field2):
|
|
/// return ...;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<Outlet> outlets, Option<WalletFailure> failureOption, bool isFetching, bool hasLoaded) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _OutletLoaderState():
|
|
return $default(_that.outlets,_that.failureOption,_that.isFetching,_that.hasLoaded);case _:
|
|
throw StateError('Unexpected subclass');
|
|
|
|
}
|
|
}
|
|
/// A variant of `when` that fallback to returning `null`
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case _:
|
|
/// return null;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<Outlet> outlets, Option<WalletFailure> failureOption, bool isFetching, bool hasLoaded)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _OutletLoaderState() when $default != null:
|
|
return $default(_that.outlets,_that.failureOption,_that.isFetching,_that.hasLoaded);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
|
|
class _OutletLoaderState implements OutletLoaderState {
|
|
const _OutletLoaderState({required List<Outlet> outlets, required this.failureOption, this.isFetching = false, this.hasLoaded = false}): _outlets = outlets;
|
|
|
|
|
|
final List<Outlet> _outlets;
|
|
@override List<Outlet> get outlets {
|
|
if (_outlets is EqualUnmodifiableListView) return _outlets;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_outlets);
|
|
}
|
|
|
|
@override final Option<WalletFailure> failureOption;
|
|
@override@JsonKey() final bool isFetching;
|
|
@override@JsonKey() final bool hasLoaded;
|
|
|
|
/// Create a copy of OutletLoaderState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$OutletLoaderStateCopyWith<_OutletLoaderState> get copyWith => __$OutletLoaderStateCopyWithImpl<_OutletLoaderState>(this, _$identity);
|
|
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _OutletLoaderState&&const DeepCollectionEquality().equals(other.outlets, _outlets)&&(identical(other.failureOption, failureOption) || other.failureOption == failureOption)&&(identical(other.isFetching, isFetching) || other.isFetching == isFetching)&&(identical(other.hasLoaded, hasLoaded) || other.hasLoaded == hasLoaded));
|
|
}
|
|
|
|
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(runtimeType,const DeepCollectionEquality().hash(_outlets),failureOption,isFetching,hasLoaded);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'OutletLoaderState(outlets: $outlets, failureOption: $failureOption, isFetching: $isFetching, hasLoaded: $hasLoaded)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$OutletLoaderStateCopyWith<$Res> implements $OutletLoaderStateCopyWith<$Res> {
|
|
factory _$OutletLoaderStateCopyWith(_OutletLoaderState value, $Res Function(_OutletLoaderState) _then) = __$OutletLoaderStateCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
List<Outlet> outlets, Option<WalletFailure> failureOption, bool isFetching, bool hasLoaded
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$OutletLoaderStateCopyWithImpl<$Res>
|
|
implements _$OutletLoaderStateCopyWith<$Res> {
|
|
__$OutletLoaderStateCopyWithImpl(this._self, this._then);
|
|
|
|
final _OutletLoaderState _self;
|
|
final $Res Function(_OutletLoaderState) _then;
|
|
|
|
/// Create a copy of OutletLoaderState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? outlets = null,Object? failureOption = null,Object? isFetching = null,Object? hasLoaded = null,}) {
|
|
return _then(_OutletLoaderState(
|
|
outlets: null == outlets ? _self._outlets : outlets // ignore: cast_nullable_to_non_nullable
|
|
as List<Outlet>,failureOption: null == failureOption ? _self.failureOption : failureOption // ignore: cast_nullable_to_non_nullable
|
|
as Option<WalletFailure>,isFetching: null == isFetching ? _self.isFetching : isFetching // ignore: cast_nullable_to_non_nullable
|
|
as bool,hasLoaded: null == hasLoaded ? _self.hasLoaded : hasLoaded // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
// dart format on
|