barcode_scanner/lib/pages/profile/profile_page_model.freezed.dart
mandreshope b1a4005235 feat: Adds user image field and profile page
Adds an `image` field to the user data structure to support profile pictures.

Introduces a new profile page and sets up navigation from the home screen.

Changes the product list page provider to auto dispose for improved resource management.
2025-07-04 12:17:13 +03:00

182 lines
5.8 KiB
Dart

// dart format width=80
// 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 'profile_page_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ProfilePageState implements DiagnosticableTreeMixin {
UserStruct? get user; bool get loading;
/// Create a copy of ProfilePageState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ProfilePageStateCopyWith<ProfilePageState> get copyWith => _$ProfilePageStateCopyWithImpl<ProfilePageState>(this as ProfilePageState, _$identity);
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'ProfilePageState'))
..add(DiagnosticsProperty('user', user))..add(DiagnosticsProperty('loading', loading));
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ProfilePageState&&(identical(other.user, user) || other.user == user)&&(identical(other.loading, loading) || other.loading == loading));
}
@override
int get hashCode => Object.hash(runtimeType,user,loading);
@override
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
return 'ProfilePageState(user: $user, loading: $loading)';
}
}
/// @nodoc
abstract mixin class $ProfilePageStateCopyWith<$Res> {
factory $ProfilePageStateCopyWith(ProfilePageState value, $Res Function(ProfilePageState) _then) = _$ProfilePageStateCopyWithImpl;
@useResult
$Res call({
UserStruct? user, bool loading
});
$UserStructCopyWith<$Res>? get user;
}
/// @nodoc
class _$ProfilePageStateCopyWithImpl<$Res>
implements $ProfilePageStateCopyWith<$Res> {
_$ProfilePageStateCopyWithImpl(this._self, this._then);
final ProfilePageState _self;
final $Res Function(ProfilePageState) _then;
/// Create a copy of ProfilePageState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? user = freezed,Object? loading = null,}) {
return _then(_self.copyWith(
user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
as UserStruct?,loading: null == loading ? _self.loading : loading // ignore: cast_nullable_to_non_nullable
as bool,
));
}
/// Create a copy of ProfilePageState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserStructCopyWith<$Res>? get user {
if (_self.user == null) {
return null;
}
return $UserStructCopyWith<$Res>(_self.user!, (value) {
return _then(_self.copyWith(user: value));
});
}
}
/// @nodoc
class _ProfilePageState with DiagnosticableTreeMixin implements ProfilePageState {
const _ProfilePageState({this.user, this.loading = false});
@override final UserStruct? user;
@override@JsonKey() final bool loading;
/// Create a copy of ProfilePageState
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ProfilePageStateCopyWith<_ProfilePageState> get copyWith => __$ProfilePageStateCopyWithImpl<_ProfilePageState>(this, _$identity);
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'ProfilePageState'))
..add(DiagnosticsProperty('user', user))..add(DiagnosticsProperty('loading', loading));
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProfilePageState&&(identical(other.user, user) || other.user == user)&&(identical(other.loading, loading) || other.loading == loading));
}
@override
int get hashCode => Object.hash(runtimeType,user,loading);
@override
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
return 'ProfilePageState(user: $user, loading: $loading)';
}
}
/// @nodoc
abstract mixin class _$ProfilePageStateCopyWith<$Res> implements $ProfilePageStateCopyWith<$Res> {
factory _$ProfilePageStateCopyWith(_ProfilePageState value, $Res Function(_ProfilePageState) _then) = __$ProfilePageStateCopyWithImpl;
@override @useResult
$Res call({
UserStruct? user, bool loading
});
@override $UserStructCopyWith<$Res>? get user;
}
/// @nodoc
class __$ProfilePageStateCopyWithImpl<$Res>
implements _$ProfilePageStateCopyWith<$Res> {
__$ProfilePageStateCopyWithImpl(this._self, this._then);
final _ProfilePageState _self;
final $Res Function(_ProfilePageState) _then;
/// Create a copy of ProfilePageState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? user = freezed,Object? loading = null,}) {
return _then(_ProfilePageState(
user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
as UserStruct?,loading: null == loading ? _self.loading : loading // ignore: cast_nullable_to_non_nullable
as bool,
));
}
/// Create a copy of ProfilePageState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserStructCopyWith<$Res>? get user {
if (_self.user == null) {
return null;
}
return $UserStructCopyWith<$Res>(_self.user!, (value) {
return _then(_self.copyWith(user: value));
});
}
}
// dart format on