From 0388d22cc10a2f8e93d1b9dd4690f65f4bebdf0b Mon Sep 17 00:00:00 2001 From: jahongireshonqulov Date: Fri, 31 Oct 2025 12:29:33 +0500 Subject: [PATCH] feat: splash page done --- .../splash_bloc/splash_bloc.freezed.dart | 463 ++++++++++++++++++ 1 file changed, 463 insertions(+) create mode 100644 lib/feature/onboarding/presentation/blocs/splash_bloc/splash_bloc.freezed.dart diff --git a/lib/feature/onboarding/presentation/blocs/splash_bloc/splash_bloc.freezed.dart b/lib/feature/onboarding/presentation/blocs/splash_bloc/splash_bloc.freezed.dart new file mode 100644 index 0000000..2b3f223 --- /dev/null +++ b/lib/feature/onboarding/presentation/blocs/splash_bloc/splash_bloc.freezed.dart @@ -0,0 +1,463 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'splash_bloc.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; +/// @nodoc +mixin _$SplashEvent { + + + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is SplashEvent); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'SplashEvent()'; +} + + +} + +/// @nodoc +class $SplashEventCopyWith<$Res> { +$SplashEventCopyWith(SplashEvent _, $Res Function(SplashEvent) __); +} + + +/// Adds pattern-matching-related methods to [SplashEvent]. +extension SplashEventPatterns on SplashEvent { +/// 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 Function( _Started value)? started,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Started() when started != null: +return started(_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({required TResult Function( _Started value) started,}){ +final _that = this; +switch (_that) { +case _Started(): +return started(_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? Function( _Started value)? started,}){ +final _that = this; +switch (_that) { +case _Started() when started != null: +return started(_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 Function()? started,required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Started() when started != null: +return started();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({required TResult Function() started,}) {final _that = this; +switch (_that) { +case _Started(): +return started();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? Function()? started,}) {final _that = this; +switch (_that) { +case _Started() when started != null: +return started();case _: + return null; + +} +} + +} + +/// @nodoc + + +class _Started implements SplashEvent { + const _Started(); + + + + + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Started); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'SplashEvent.started()'; +} + + +} + + + + +/// @nodoc +mixin _$SplashState { + + RequestStatus get status; +/// Create a copy of SplashState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$SplashStateCopyWith get copyWith => _$SplashStateCopyWithImpl(this as SplashState, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is SplashState&&(identical(other.status, status) || other.status == status)); +} + + +@override +int get hashCode => Object.hash(runtimeType,status); + +@override +String toString() { + return 'SplashState(status: $status)'; +} + + +} + +/// @nodoc +abstract mixin class $SplashStateCopyWith<$Res> { + factory $SplashStateCopyWith(SplashState value, $Res Function(SplashState) _then) = _$SplashStateCopyWithImpl; +@useResult +$Res call({ + RequestStatus status +}); + + + + +} +/// @nodoc +class _$SplashStateCopyWithImpl<$Res> + implements $SplashStateCopyWith<$Res> { + _$SplashStateCopyWithImpl(this._self, this._then); + + final SplashState _self; + final $Res Function(SplashState) _then; + +/// Create a copy of SplashState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? status = null,}) { + return _then(_self.copyWith( +status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable +as RequestStatus, + )); +} + +} + + +/// Adds pattern-matching-related methods to [SplashState]. +extension SplashStatePatterns on SplashState { +/// 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 Function( _SplashState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _SplashState() 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 Function( _SplashState value) $default,){ +final _that = this; +switch (_that) { +case _SplashState(): +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? Function( _SplashState value)? $default,){ +final _that = this; +switch (_that) { +case _SplashState() 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 Function( RequestStatus status)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _SplashState() when $default != null: +return $default(_that.status);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 Function( RequestStatus status) $default,) {final _that = this; +switch (_that) { +case _SplashState(): +return $default(_that.status);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? Function( RequestStatus status)? $default,) {final _that = this; +switch (_that) { +case _SplashState() when $default != null: +return $default(_that.status);case _: + return null; + +} +} + +} + +/// @nodoc + + +class _SplashState implements SplashState { + const _SplashState({this.status = RequestStatus.initial}); + + +@override@JsonKey() final RequestStatus status; + +/// Create a copy of SplashState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$SplashStateCopyWith<_SplashState> get copyWith => __$SplashStateCopyWithImpl<_SplashState>(this, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _SplashState&&(identical(other.status, status) || other.status == status)); +} + + +@override +int get hashCode => Object.hash(runtimeType,status); + +@override +String toString() { + return 'SplashState(status: $status)'; +} + + +} + +/// @nodoc +abstract mixin class _$SplashStateCopyWith<$Res> implements $SplashStateCopyWith<$Res> { + factory _$SplashStateCopyWith(_SplashState value, $Res Function(_SplashState) _then) = __$SplashStateCopyWithImpl; +@override @useResult +$Res call({ + RequestStatus status +}); + + + + +} +/// @nodoc +class __$SplashStateCopyWithImpl<$Res> + implements _$SplashStateCopyWith<$Res> { + __$SplashStateCopyWithImpl(this._self, this._then); + + final _SplashState _self; + final $Res Function(_SplashState) _then; + +/// Create a copy of SplashState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? status = null,}) { + return _then(_SplashState( +status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable +as RequestStatus, + )); +} + + +} + +// dart format on