feat : auth for new module

This commit is contained in:
MrM
2025-06-03 22:52:33 +03:30
parent 2b4c019c55
commit 880ef4c175
4 changed files with 428 additions and 0 deletions

View File

@@ -0,0 +1,157 @@
// 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 'user_info_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$UserInfoModel {
bool? get isUser; String? get address; String? get backend; String? get apiKey;
/// Create a copy of UserInfoModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$UserInfoModelCopyWith<UserInfoModel> get copyWith => _$UserInfoModelCopyWithImpl<UserInfoModel>(this as UserInfoModel, _$identity);
/// Serializes this UserInfoModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is UserInfoModel&&(identical(other.isUser, isUser) || other.isUser == isUser)&&(identical(other.address, address) || other.address == address)&&(identical(other.backend, backend) || other.backend == backend)&&(identical(other.apiKey, apiKey) || other.apiKey == apiKey));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,isUser,address,backend,apiKey);
@override
String toString() {
return 'UserInfoModel(isUser: $isUser, address: $address, backend: $backend, apiKey: $apiKey)';
}
}
/// @nodoc
abstract mixin class $UserInfoModelCopyWith<$Res> {
factory $UserInfoModelCopyWith(UserInfoModel value, $Res Function(UserInfoModel) _then) = _$UserInfoModelCopyWithImpl;
@useResult
$Res call({
bool? isUser, String? address, String? backend, String? apiKey
});
}
/// @nodoc
class _$UserInfoModelCopyWithImpl<$Res>
implements $UserInfoModelCopyWith<$Res> {
_$UserInfoModelCopyWithImpl(this._self, this._then);
final UserInfoModel _self;
final $Res Function(UserInfoModel) _then;
/// Create a copy of UserInfoModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? isUser = freezed,Object? address = freezed,Object? backend = freezed,Object? apiKey = freezed,}) {
return _then(_self.copyWith(
isUser: freezed == isUser ? _self.isUser : isUser // ignore: cast_nullable_to_non_nullable
as bool?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
as String?,backend: freezed == backend ? _self.backend : backend // ignore: cast_nullable_to_non_nullable
as String?,apiKey: freezed == apiKey ? _self.apiKey : apiKey // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _UserInfoModel implements UserInfoModel {
const _UserInfoModel({this.isUser, this.address, this.backend, this.apiKey});
factory _UserInfoModel.fromJson(Map<String, dynamic> json) => _$UserInfoModelFromJson(json);
@override final bool? isUser;
@override final String? address;
@override final String? backend;
@override final String? apiKey;
/// Create a copy of UserInfoModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$UserInfoModelCopyWith<_UserInfoModel> get copyWith => __$UserInfoModelCopyWithImpl<_UserInfoModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$UserInfoModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UserInfoModel&&(identical(other.isUser, isUser) || other.isUser == isUser)&&(identical(other.address, address) || other.address == address)&&(identical(other.backend, backend) || other.backend == backend)&&(identical(other.apiKey, apiKey) || other.apiKey == apiKey));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,isUser,address,backend,apiKey);
@override
String toString() {
return 'UserInfoModel(isUser: $isUser, address: $address, backend: $backend, apiKey: $apiKey)';
}
}
/// @nodoc
abstract mixin class _$UserInfoModelCopyWith<$Res> implements $UserInfoModelCopyWith<$Res> {
factory _$UserInfoModelCopyWith(_UserInfoModel value, $Res Function(_UserInfoModel) _then) = __$UserInfoModelCopyWithImpl;
@override @useResult
$Res call({
bool? isUser, String? address, String? backend, String? apiKey
});
}
/// @nodoc
class __$UserInfoModelCopyWithImpl<$Res>
implements _$UserInfoModelCopyWith<$Res> {
__$UserInfoModelCopyWithImpl(this._self, this._then);
final _UserInfoModel _self;
final $Res Function(_UserInfoModel) _then;
/// Create a copy of UserInfoModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? isUser = freezed,Object? address = freezed,Object? backend = freezed,Object? apiKey = freezed,}) {
return _then(_UserInfoModel(
isUser: freezed == isUser ? _self.isUser : isUser // ignore: cast_nullable_to_non_nullable
as bool?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
as String?,backend: freezed == backend ? _self.backend : backend // ignore: cast_nullable_to_non_nullable
as String?,apiKey: freezed == apiKey ? _self.apiKey : apiKey // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,23 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'user_info_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_UserInfoModel _$UserInfoModelFromJson(Map<String, dynamic> json) =>
_UserInfoModel(
isUser: json['is_user'] as bool?,
address: json['address'] as String?,
backend: json['backend'] as String?,
apiKey: json['api_key'] as String?,
);
Map<String, dynamic> _$UserInfoModelToJson(_UserInfoModel instance) =>
<String, dynamic>{
'is_user': instance.isUser,
'address': instance.address,
'backend': instance.backend,
'api_key': instance.apiKey,
};