verify repo

This commit is contained in:
efrilm
2025-09-18 06:38:50 +07:00
parent 13c55afe3c
commit c40f96fc88
16 changed files with 1547 additions and 1 deletions
+1
View File
@@ -7,6 +7,7 @@ part 'auth.freezed.dart';
part 'entities/check_phone_entity.dart';
part 'entities/register_entity.dart';
part 'entities/verify_entity.dart';
part 'failures/auth_failure.dart';
part 'repositories/i_auth_repository.dart';
+174
View File
@@ -424,6 +424,180 @@ abstract class _Register implements Register {
throw _privateConstructorUsedError;
}
/// @nodoc
mixin _$Verify {
String get status => throw _privateConstructorUsedError;
String get message => throw _privateConstructorUsedError;
String get registrationToken => throw _privateConstructorUsedError;
/// Create a copy of Verify
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$VerifyCopyWith<Verify> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $VerifyCopyWith<$Res> {
factory $VerifyCopyWith(Verify value, $Res Function(Verify) then) =
_$VerifyCopyWithImpl<$Res, Verify>;
@useResult
$Res call({String status, String message, String registrationToken});
}
/// @nodoc
class _$VerifyCopyWithImpl<$Res, $Val extends Verify>
implements $VerifyCopyWith<$Res> {
_$VerifyCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of Verify
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? status = null,
Object? message = null,
Object? registrationToken = null,
}) {
return _then(
_value.copyWith(
status: null == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String,
message: null == message
? _value.message
: message // ignore: cast_nullable_to_non_nullable
as String,
registrationToken: null == registrationToken
? _value.registrationToken
: registrationToken // ignore: cast_nullable_to_non_nullable
as String,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$VerifyImplCopyWith<$Res> implements $VerifyCopyWith<$Res> {
factory _$$VerifyImplCopyWith(
_$VerifyImpl value,
$Res Function(_$VerifyImpl) then,
) = __$$VerifyImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String status, String message, String registrationToken});
}
/// @nodoc
class __$$VerifyImplCopyWithImpl<$Res>
extends _$VerifyCopyWithImpl<$Res, _$VerifyImpl>
implements _$$VerifyImplCopyWith<$Res> {
__$$VerifyImplCopyWithImpl(
_$VerifyImpl _value,
$Res Function(_$VerifyImpl) _then,
) : super(_value, _then);
/// Create a copy of Verify
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? status = null,
Object? message = null,
Object? registrationToken = null,
}) {
return _then(
_$VerifyImpl(
status: null == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String,
message: null == message
? _value.message
: message // ignore: cast_nullable_to_non_nullable
as String,
registrationToken: null == registrationToken
? _value.registrationToken
: registrationToken // ignore: cast_nullable_to_non_nullable
as String,
),
);
}
}
/// @nodoc
class _$VerifyImpl implements _Verify {
const _$VerifyImpl({
required this.status,
required this.message,
required this.registrationToken,
});
@override
final String status;
@override
final String message;
@override
final String registrationToken;
@override
String toString() {
return 'Verify(status: $status, message: $message, registrationToken: $registrationToken)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$VerifyImpl &&
(identical(other.status, status) || other.status == status) &&
(identical(other.message, message) || other.message == message) &&
(identical(other.registrationToken, registrationToken) ||
other.registrationToken == registrationToken));
}
@override
int get hashCode =>
Object.hash(runtimeType, status, message, registrationToken);
/// Create a copy of Verify
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$VerifyImplCopyWith<_$VerifyImpl> get copyWith =>
__$$VerifyImplCopyWithImpl<_$VerifyImpl>(this, _$identity);
}
abstract class _Verify implements Verify {
const factory _Verify({
required final String status,
required final String message,
required final String registrationToken,
}) = _$VerifyImpl;
@override
String get status;
@override
String get message;
@override
String get registrationToken;
/// Create a copy of Verify
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$VerifyImplCopyWith<_$VerifyImpl> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
mixin _$AuthFailure {
@optionalTypeArgs
@@ -0,0 +1,13 @@
part of '../auth.dart';
@freezed
class Verify with _$Verify {
const factory Verify({
required String status,
required String message,
required String registrationToken,
}) = _Verify;
factory Verify.empty() =>
const Verify(status: '', message: '', registrationToken: '');
}
@@ -10,4 +10,9 @@ abstract class IAuthRepository {
required String name,
required DateTime birthDate,
});
Future<Either<AuthFailure, Verify>> verify({
required String registrationToken,
required String otpCode,
});
}