Register Repo
This commit is contained in:
parent
c3263edb89
commit
207dda29df
33
lib/common/extension/date_extension.dart
Normal file
33
lib/common/extension/date_extension.dart
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
part of 'extension.dart';
|
||||||
|
|
||||||
|
extension DateTimeIndonesia on DateTime {
|
||||||
|
/// Format: 13 Agustus 2025
|
||||||
|
String get toDate {
|
||||||
|
return DateFormat('d MMMM yyyy', 'id_ID').format(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Format: 13 Agustus 2025 20:00
|
||||||
|
String get toDatetime {
|
||||||
|
return DateFormat('d MMMM yyyy HH:mm', 'id_ID').format(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Format: Rabu, 13 Agustus 2025
|
||||||
|
String get toDayDate {
|
||||||
|
return DateFormat('EEEE, d MMMM yyyy', 'id_ID').format(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Format: 13/08/2025
|
||||||
|
String get toShortDate {
|
||||||
|
return DateFormat('dd/MM/yyyy', 'id_ID').format(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Format: 13-08-2025
|
||||||
|
String get toServerDate {
|
||||||
|
return DateFormat('dd-MM-yyyy', 'id_ID').format(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Format jam: 14:30
|
||||||
|
String get toHourMinute {
|
||||||
|
return DateFormat('HH:mm', 'id_ID').format(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,9 @@
|
|||||||
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
import '../../domain/auth/auth.dart';
|
import '../../domain/auth/auth.dart';
|
||||||
|
|
||||||
|
part 'date_extension.dart';
|
||||||
|
|
||||||
extension StringExt on String {
|
extension StringExt on String {
|
||||||
CheckPhoneStatus toCheckPhoneStatus() {
|
CheckPhoneStatus toCheckPhoneStatus() {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
class ApiPath {
|
class ApiPath {
|
||||||
static String checkPhone = '/api/v1/customer-auth/check-phone';
|
static String checkPhone = '/api/v1/customer-auth/check-phone';
|
||||||
|
static String register = '/api/v1/customer-auth/register/start';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import '../../common/api/api_failure.dart';
|
|||||||
part 'auth.freezed.dart';
|
part 'auth.freezed.dart';
|
||||||
|
|
||||||
part 'entities/check_phone_entity.dart';
|
part 'entities/check_phone_entity.dart';
|
||||||
|
part 'entities/register_entity.dart';
|
||||||
part 'failures/auth_failure.dart';
|
part 'failures/auth_failure.dart';
|
||||||
part 'repositories/i_auth_repository.dart';
|
part 'repositories/i_auth_repository.dart';
|
||||||
|
|
||||||
|
|||||||
@ -192,6 +192,238 @@ abstract class _CheckPhone implements CheckPhone {
|
|||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$Register {
|
||||||
|
String get status => throw _privateConstructorUsedError;
|
||||||
|
String get message => throw _privateConstructorUsedError;
|
||||||
|
String get registrationToken => throw _privateConstructorUsedError;
|
||||||
|
String get otpToken => throw _privateConstructorUsedError;
|
||||||
|
int get expiresIn => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Create a copy of Register
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
$RegisterCopyWith<Register> get copyWith =>
|
||||||
|
throw _privateConstructorUsedError;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract class $RegisterCopyWith<$Res> {
|
||||||
|
factory $RegisterCopyWith(Register value, $Res Function(Register) then) =
|
||||||
|
_$RegisterCopyWithImpl<$Res, Register>;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
String status,
|
||||||
|
String message,
|
||||||
|
String registrationToken,
|
||||||
|
String otpToken,
|
||||||
|
int expiresIn,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class _$RegisterCopyWithImpl<$Res, $Val extends Register>
|
||||||
|
implements $RegisterCopyWith<$Res> {
|
||||||
|
_$RegisterCopyWithImpl(this._value, this._then);
|
||||||
|
|
||||||
|
// ignore: unused_field
|
||||||
|
final $Val _value;
|
||||||
|
// ignore: unused_field
|
||||||
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of Register
|
||||||
|
/// 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,
|
||||||
|
Object? otpToken = null,
|
||||||
|
Object? expiresIn = 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,
|
||||||
|
otpToken: null == otpToken
|
||||||
|
? _value.otpToken
|
||||||
|
: otpToken // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,
|
||||||
|
expiresIn: null == expiresIn
|
||||||
|
? _value.expiresIn
|
||||||
|
: expiresIn // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,
|
||||||
|
)
|
||||||
|
as $Val,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract class _$$RegisterImplCopyWith<$Res>
|
||||||
|
implements $RegisterCopyWith<$Res> {
|
||||||
|
factory _$$RegisterImplCopyWith(
|
||||||
|
_$RegisterImpl value,
|
||||||
|
$Res Function(_$RegisterImpl) then,
|
||||||
|
) = __$$RegisterImplCopyWithImpl<$Res>;
|
||||||
|
@override
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
String status,
|
||||||
|
String message,
|
||||||
|
String registrationToken,
|
||||||
|
String otpToken,
|
||||||
|
int expiresIn,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class __$$RegisterImplCopyWithImpl<$Res>
|
||||||
|
extends _$RegisterCopyWithImpl<$Res, _$RegisterImpl>
|
||||||
|
implements _$$RegisterImplCopyWith<$Res> {
|
||||||
|
__$$RegisterImplCopyWithImpl(
|
||||||
|
_$RegisterImpl _value,
|
||||||
|
$Res Function(_$RegisterImpl) _then,
|
||||||
|
) : super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of Register
|
||||||
|
/// 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,
|
||||||
|
Object? otpToken = null,
|
||||||
|
Object? expiresIn = null,
|
||||||
|
}) {
|
||||||
|
return _then(
|
||||||
|
_$RegisterImpl(
|
||||||
|
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,
|
||||||
|
otpToken: null == otpToken
|
||||||
|
? _value.otpToken
|
||||||
|
: otpToken // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,
|
||||||
|
expiresIn: null == expiresIn
|
||||||
|
? _value.expiresIn
|
||||||
|
: expiresIn // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
class _$RegisterImpl implements _Register {
|
||||||
|
const _$RegisterImpl({
|
||||||
|
required this.status,
|
||||||
|
required this.message,
|
||||||
|
required this.registrationToken,
|
||||||
|
required this.otpToken,
|
||||||
|
required this.expiresIn,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String status;
|
||||||
|
@override
|
||||||
|
final String message;
|
||||||
|
@override
|
||||||
|
final String registrationToken;
|
||||||
|
@override
|
||||||
|
final String otpToken;
|
||||||
|
@override
|
||||||
|
final int expiresIn;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'Register(status: $status, message: $message, registrationToken: $registrationToken, otpToken: $otpToken, expiresIn: $expiresIn)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) ||
|
||||||
|
(other.runtimeType == runtimeType &&
|
||||||
|
other is _$RegisterImpl &&
|
||||||
|
(identical(other.status, status) || other.status == status) &&
|
||||||
|
(identical(other.message, message) || other.message == message) &&
|
||||||
|
(identical(other.registrationToken, registrationToken) ||
|
||||||
|
other.registrationToken == registrationToken) &&
|
||||||
|
(identical(other.otpToken, otpToken) ||
|
||||||
|
other.otpToken == otpToken) &&
|
||||||
|
(identical(other.expiresIn, expiresIn) ||
|
||||||
|
other.expiresIn == expiresIn));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(
|
||||||
|
runtimeType,
|
||||||
|
status,
|
||||||
|
message,
|
||||||
|
registrationToken,
|
||||||
|
otpToken,
|
||||||
|
expiresIn,
|
||||||
|
);
|
||||||
|
|
||||||
|
/// Create a copy of Register
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$$RegisterImplCopyWith<_$RegisterImpl> get copyWith =>
|
||||||
|
__$$RegisterImplCopyWithImpl<_$RegisterImpl>(this, _$identity);
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class _Register implements Register {
|
||||||
|
const factory _Register({
|
||||||
|
required final String status,
|
||||||
|
required final String message,
|
||||||
|
required final String registrationToken,
|
||||||
|
required final String otpToken,
|
||||||
|
required final int expiresIn,
|
||||||
|
}) = _$RegisterImpl;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get status;
|
||||||
|
@override
|
||||||
|
String get message;
|
||||||
|
@override
|
||||||
|
String get registrationToken;
|
||||||
|
@override
|
||||||
|
String get otpToken;
|
||||||
|
@override
|
||||||
|
int get expiresIn;
|
||||||
|
|
||||||
|
/// Create a copy of Register
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
_$$RegisterImplCopyWith<_$RegisterImpl> get copyWith =>
|
||||||
|
throw _privateConstructorUsedError;
|
||||||
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$AuthFailure {
|
mixin _$AuthFailure {
|
||||||
@optionalTypeArgs
|
@optionalTypeArgs
|
||||||
|
|||||||
20
lib/domain/auth/entities/register_entity.dart
Normal file
20
lib/domain/auth/entities/register_entity.dart
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
part of '../auth.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
class Register with _$Register {
|
||||||
|
const factory Register({
|
||||||
|
required String status,
|
||||||
|
required String message,
|
||||||
|
required String registrationToken,
|
||||||
|
required String otpToken,
|
||||||
|
required int expiresIn,
|
||||||
|
}) = _Register;
|
||||||
|
|
||||||
|
factory Register.empty() => const Register(
|
||||||
|
status: '',
|
||||||
|
message: '',
|
||||||
|
registrationToken: '',
|
||||||
|
otpToken: '',
|
||||||
|
expiresIn: 0,
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -4,4 +4,10 @@ abstract class IAuthRepository {
|
|||||||
Future<Either<AuthFailure, CheckPhone>> checkPhone({
|
Future<Either<AuthFailure, CheckPhone>> checkPhone({
|
||||||
required String phoneNumber,
|
required String phoneNumber,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Future<Either<AuthFailure, Register>> register({
|
||||||
|
required String phoneNumber,
|
||||||
|
required String name,
|
||||||
|
required DateTime birthDate,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,3 +6,4 @@ part 'auth_dtos.freezed.dart';
|
|||||||
part 'auth_dtos.g.dart';
|
part 'auth_dtos.g.dart';
|
||||||
|
|
||||||
part 'dto/check_phone_dto.dart';
|
part 'dto/check_phone_dto.dart';
|
||||||
|
part 'dto/register_dto.dart';
|
||||||
|
|||||||
@ -408,3 +408,454 @@ abstract class _CheckPhoneDataDto implements CheckPhoneDataDto {
|
|||||||
_$$CheckPhoneDataDtoImplCopyWith<_$CheckPhoneDataDtoImpl> get copyWith =>
|
_$$CheckPhoneDataDtoImplCopyWith<_$CheckPhoneDataDtoImpl> get copyWith =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RegisterDto _$RegisterDtoFromJson(Map<String, dynamic> json) {
|
||||||
|
return _RegisterDto.fromJson(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$RegisterDto {
|
||||||
|
@JsonKey(name: 'status')
|
||||||
|
String? get status => throw _privateConstructorUsedError;
|
||||||
|
@JsonKey(name: 'message')
|
||||||
|
String? get message => throw _privateConstructorUsedError;
|
||||||
|
@JsonKey(name: 'data')
|
||||||
|
RegisterDataDto? get data => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this RegisterDto to a JSON map.
|
||||||
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Create a copy of RegisterDto
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
$RegisterDtoCopyWith<RegisterDto> get copyWith =>
|
||||||
|
throw _privateConstructorUsedError;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract class $RegisterDtoCopyWith<$Res> {
|
||||||
|
factory $RegisterDtoCopyWith(
|
||||||
|
RegisterDto value,
|
||||||
|
$Res Function(RegisterDto) then,
|
||||||
|
) = _$RegisterDtoCopyWithImpl<$Res, RegisterDto>;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
@JsonKey(name: 'status') String? status,
|
||||||
|
@JsonKey(name: 'message') String? message,
|
||||||
|
@JsonKey(name: 'data') RegisterDataDto? data,
|
||||||
|
});
|
||||||
|
|
||||||
|
$RegisterDataDtoCopyWith<$Res>? get data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class _$RegisterDtoCopyWithImpl<$Res, $Val extends RegisterDto>
|
||||||
|
implements $RegisterDtoCopyWith<$Res> {
|
||||||
|
_$RegisterDtoCopyWithImpl(this._value, this._then);
|
||||||
|
|
||||||
|
// ignore: unused_field
|
||||||
|
final $Val _value;
|
||||||
|
// ignore: unused_field
|
||||||
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of RegisterDto
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
@override
|
||||||
|
$Res call({
|
||||||
|
Object? status = freezed,
|
||||||
|
Object? message = freezed,
|
||||||
|
Object? data = freezed,
|
||||||
|
}) {
|
||||||
|
return _then(
|
||||||
|
_value.copyWith(
|
||||||
|
status: freezed == status
|
||||||
|
? _value.status
|
||||||
|
: status // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
|
message: freezed == message
|
||||||
|
? _value.message
|
||||||
|
: message // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
|
data: freezed == data
|
||||||
|
? _value.data
|
||||||
|
: data // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RegisterDataDto?,
|
||||||
|
)
|
||||||
|
as $Val,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create a copy of RegisterDto
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$RegisterDataDtoCopyWith<$Res>? get data {
|
||||||
|
if (_value.data == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $RegisterDataDtoCopyWith<$Res>(_value.data!, (value) {
|
||||||
|
return _then(_value.copyWith(data: value) as $Val);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract class _$$RegisterDtoImplCopyWith<$Res>
|
||||||
|
implements $RegisterDtoCopyWith<$Res> {
|
||||||
|
factory _$$RegisterDtoImplCopyWith(
|
||||||
|
_$RegisterDtoImpl value,
|
||||||
|
$Res Function(_$RegisterDtoImpl) then,
|
||||||
|
) = __$$RegisterDtoImplCopyWithImpl<$Res>;
|
||||||
|
@override
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
@JsonKey(name: 'status') String? status,
|
||||||
|
@JsonKey(name: 'message') String? message,
|
||||||
|
@JsonKey(name: 'data') RegisterDataDto? data,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
$RegisterDataDtoCopyWith<$Res>? get data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class __$$RegisterDtoImplCopyWithImpl<$Res>
|
||||||
|
extends _$RegisterDtoCopyWithImpl<$Res, _$RegisterDtoImpl>
|
||||||
|
implements _$$RegisterDtoImplCopyWith<$Res> {
|
||||||
|
__$$RegisterDtoImplCopyWithImpl(
|
||||||
|
_$RegisterDtoImpl _value,
|
||||||
|
$Res Function(_$RegisterDtoImpl) _then,
|
||||||
|
) : super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RegisterDto
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
@override
|
||||||
|
$Res call({
|
||||||
|
Object? status = freezed,
|
||||||
|
Object? message = freezed,
|
||||||
|
Object? data = freezed,
|
||||||
|
}) {
|
||||||
|
return _then(
|
||||||
|
_$RegisterDtoImpl(
|
||||||
|
status: freezed == status
|
||||||
|
? _value.status
|
||||||
|
: status // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
|
message: freezed == message
|
||||||
|
? _value.message
|
||||||
|
: message // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
|
data: freezed == data
|
||||||
|
? _value.data
|
||||||
|
: data // ignore: cast_nullable_to_non_nullable
|
||||||
|
as RegisterDataDto?,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
@JsonSerializable()
|
||||||
|
class _$RegisterDtoImpl extends _RegisterDto {
|
||||||
|
const _$RegisterDtoImpl({
|
||||||
|
@JsonKey(name: 'status') this.status,
|
||||||
|
@JsonKey(name: 'message') this.message,
|
||||||
|
@JsonKey(name: 'data') this.data,
|
||||||
|
}) : super._();
|
||||||
|
|
||||||
|
factory _$RegisterDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$$RegisterDtoImplFromJson(json);
|
||||||
|
|
||||||
|
@override
|
||||||
|
@JsonKey(name: 'status')
|
||||||
|
final String? status;
|
||||||
|
@override
|
||||||
|
@JsonKey(name: 'message')
|
||||||
|
final String? message;
|
||||||
|
@override
|
||||||
|
@JsonKey(name: 'data')
|
||||||
|
final RegisterDataDto? data;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'RegisterDto(status: $status, message: $message, data: $data)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) ||
|
||||||
|
(other.runtimeType == runtimeType &&
|
||||||
|
other is _$RegisterDtoImpl &&
|
||||||
|
(identical(other.status, status) || other.status == status) &&
|
||||||
|
(identical(other.message, message) || other.message == message) &&
|
||||||
|
(identical(other.data, data) || other.data == data));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType, status, message, data);
|
||||||
|
|
||||||
|
/// Create a copy of RegisterDto
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$$RegisterDtoImplCopyWith<_$RegisterDtoImpl> get copyWith =>
|
||||||
|
__$$RegisterDtoImplCopyWithImpl<_$RegisterDtoImpl>(this, _$identity);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
return _$$RegisterDtoImplToJson(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class _RegisterDto extends RegisterDto {
|
||||||
|
const factory _RegisterDto({
|
||||||
|
@JsonKey(name: 'status') final String? status,
|
||||||
|
@JsonKey(name: 'message') final String? message,
|
||||||
|
@JsonKey(name: 'data') final RegisterDataDto? data,
|
||||||
|
}) = _$RegisterDtoImpl;
|
||||||
|
const _RegisterDto._() : super._();
|
||||||
|
|
||||||
|
factory _RegisterDto.fromJson(Map<String, dynamic> json) =
|
||||||
|
_$RegisterDtoImpl.fromJson;
|
||||||
|
|
||||||
|
@override
|
||||||
|
@JsonKey(name: 'status')
|
||||||
|
String? get status;
|
||||||
|
@override
|
||||||
|
@JsonKey(name: 'message')
|
||||||
|
String? get message;
|
||||||
|
@override
|
||||||
|
@JsonKey(name: 'data')
|
||||||
|
RegisterDataDto? get data;
|
||||||
|
|
||||||
|
/// Create a copy of RegisterDto
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
_$$RegisterDtoImplCopyWith<_$RegisterDtoImpl> get copyWith =>
|
||||||
|
throw _privateConstructorUsedError;
|
||||||
|
}
|
||||||
|
|
||||||
|
RegisterDataDto _$RegisterDataDtoFromJson(Map<String, dynamic> json) {
|
||||||
|
return _RegisterDataDto.fromJson(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$RegisterDataDto {
|
||||||
|
@JsonKey(name: 'registration_token')
|
||||||
|
String? get registrationToken => throw _privateConstructorUsedError;
|
||||||
|
@JsonKey(name: 'otp_token')
|
||||||
|
String? get otpToken => throw _privateConstructorUsedError;
|
||||||
|
@JsonKey(name: 'expires_in')
|
||||||
|
int? get expiresIn => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Serializes this RegisterDataDto to a JSON map.
|
||||||
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||||
|
|
||||||
|
/// Create a copy of RegisterDataDto
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
$RegisterDataDtoCopyWith<RegisterDataDto> get copyWith =>
|
||||||
|
throw _privateConstructorUsedError;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract class $RegisterDataDtoCopyWith<$Res> {
|
||||||
|
factory $RegisterDataDtoCopyWith(
|
||||||
|
RegisterDataDto value,
|
||||||
|
$Res Function(RegisterDataDto) then,
|
||||||
|
) = _$RegisterDataDtoCopyWithImpl<$Res, RegisterDataDto>;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
@JsonKey(name: 'registration_token') String? registrationToken,
|
||||||
|
@JsonKey(name: 'otp_token') String? otpToken,
|
||||||
|
@JsonKey(name: 'expires_in') int? expiresIn,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class _$RegisterDataDtoCopyWithImpl<$Res, $Val extends RegisterDataDto>
|
||||||
|
implements $RegisterDataDtoCopyWith<$Res> {
|
||||||
|
_$RegisterDataDtoCopyWithImpl(this._value, this._then);
|
||||||
|
|
||||||
|
// ignore: unused_field
|
||||||
|
final $Val _value;
|
||||||
|
// ignore: unused_field
|
||||||
|
final $Res Function($Val) _then;
|
||||||
|
|
||||||
|
/// Create a copy of RegisterDataDto
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
@override
|
||||||
|
$Res call({
|
||||||
|
Object? registrationToken = freezed,
|
||||||
|
Object? otpToken = freezed,
|
||||||
|
Object? expiresIn = freezed,
|
||||||
|
}) {
|
||||||
|
return _then(
|
||||||
|
_value.copyWith(
|
||||||
|
registrationToken: freezed == registrationToken
|
||||||
|
? _value.registrationToken
|
||||||
|
: registrationToken // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
|
otpToken: freezed == otpToken
|
||||||
|
? _value.otpToken
|
||||||
|
: otpToken // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
|
expiresIn: freezed == expiresIn
|
||||||
|
? _value.expiresIn
|
||||||
|
: expiresIn // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int?,
|
||||||
|
)
|
||||||
|
as $Val,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract class _$$RegisterDataDtoImplCopyWith<$Res>
|
||||||
|
implements $RegisterDataDtoCopyWith<$Res> {
|
||||||
|
factory _$$RegisterDataDtoImplCopyWith(
|
||||||
|
_$RegisterDataDtoImpl value,
|
||||||
|
$Res Function(_$RegisterDataDtoImpl) then,
|
||||||
|
) = __$$RegisterDataDtoImplCopyWithImpl<$Res>;
|
||||||
|
@override
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
@JsonKey(name: 'registration_token') String? registrationToken,
|
||||||
|
@JsonKey(name: 'otp_token') String? otpToken,
|
||||||
|
@JsonKey(name: 'expires_in') int? expiresIn,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class __$$RegisterDataDtoImplCopyWithImpl<$Res>
|
||||||
|
extends _$RegisterDataDtoCopyWithImpl<$Res, _$RegisterDataDtoImpl>
|
||||||
|
implements _$$RegisterDataDtoImplCopyWith<$Res> {
|
||||||
|
__$$RegisterDataDtoImplCopyWithImpl(
|
||||||
|
_$RegisterDataDtoImpl _value,
|
||||||
|
$Res Function(_$RegisterDataDtoImpl) _then,
|
||||||
|
) : super(_value, _then);
|
||||||
|
|
||||||
|
/// Create a copy of RegisterDataDto
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
@override
|
||||||
|
$Res call({
|
||||||
|
Object? registrationToken = freezed,
|
||||||
|
Object? otpToken = freezed,
|
||||||
|
Object? expiresIn = freezed,
|
||||||
|
}) {
|
||||||
|
return _then(
|
||||||
|
_$RegisterDataDtoImpl(
|
||||||
|
registrationToken: freezed == registrationToken
|
||||||
|
? _value.registrationToken
|
||||||
|
: registrationToken // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
|
otpToken: freezed == otpToken
|
||||||
|
? _value.otpToken
|
||||||
|
: otpToken // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
|
expiresIn: freezed == expiresIn
|
||||||
|
? _value.expiresIn
|
||||||
|
: expiresIn // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int?,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
@JsonSerializable()
|
||||||
|
class _$RegisterDataDtoImpl implements _RegisterDataDto {
|
||||||
|
const _$RegisterDataDtoImpl({
|
||||||
|
@JsonKey(name: 'registration_token') this.registrationToken,
|
||||||
|
@JsonKey(name: 'otp_token') this.otpToken,
|
||||||
|
@JsonKey(name: 'expires_in') this.expiresIn,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory _$RegisterDataDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$$RegisterDataDtoImplFromJson(json);
|
||||||
|
|
||||||
|
@override
|
||||||
|
@JsonKey(name: 'registration_token')
|
||||||
|
final String? registrationToken;
|
||||||
|
@override
|
||||||
|
@JsonKey(name: 'otp_token')
|
||||||
|
final String? otpToken;
|
||||||
|
@override
|
||||||
|
@JsonKey(name: 'expires_in')
|
||||||
|
final int? expiresIn;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'RegisterDataDto(registrationToken: $registrationToken, otpToken: $otpToken, expiresIn: $expiresIn)';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) ||
|
||||||
|
(other.runtimeType == runtimeType &&
|
||||||
|
other is _$RegisterDataDtoImpl &&
|
||||||
|
(identical(other.registrationToken, registrationToken) ||
|
||||||
|
other.registrationToken == registrationToken) &&
|
||||||
|
(identical(other.otpToken, otpToken) ||
|
||||||
|
other.otpToken == otpToken) &&
|
||||||
|
(identical(other.expiresIn, expiresIn) ||
|
||||||
|
other.expiresIn == expiresIn));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
Object.hash(runtimeType, registrationToken, otpToken, expiresIn);
|
||||||
|
|
||||||
|
/// Create a copy of RegisterDataDto
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$$RegisterDataDtoImplCopyWith<_$RegisterDataDtoImpl> get copyWith =>
|
||||||
|
__$$RegisterDataDtoImplCopyWithImpl<_$RegisterDataDtoImpl>(
|
||||||
|
this,
|
||||||
|
_$identity,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
return _$$RegisterDataDtoImplToJson(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class _RegisterDataDto implements RegisterDataDto {
|
||||||
|
const factory _RegisterDataDto({
|
||||||
|
@JsonKey(name: 'registration_token') final String? registrationToken,
|
||||||
|
@JsonKey(name: 'otp_token') final String? otpToken,
|
||||||
|
@JsonKey(name: 'expires_in') final int? expiresIn,
|
||||||
|
}) = _$RegisterDataDtoImpl;
|
||||||
|
|
||||||
|
factory _RegisterDataDto.fromJson(Map<String, dynamic> json) =
|
||||||
|
_$RegisterDataDtoImpl.fromJson;
|
||||||
|
|
||||||
|
@override
|
||||||
|
@JsonKey(name: 'registration_token')
|
||||||
|
String? get registrationToken;
|
||||||
|
@override
|
||||||
|
@JsonKey(name: 'otp_token')
|
||||||
|
String? get otpToken;
|
||||||
|
@override
|
||||||
|
@JsonKey(name: 'expires_in')
|
||||||
|
int? get expiresIn;
|
||||||
|
|
||||||
|
/// Create a copy of RegisterDataDto
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
_$$RegisterDataDtoImplCopyWith<_$RegisterDataDtoImpl> get copyWith =>
|
||||||
|
throw _privateConstructorUsedError;
|
||||||
|
}
|
||||||
|
|||||||
@ -29,3 +29,35 @@ _$CheckPhoneDataDtoImpl _$$CheckPhoneDataDtoImplFromJson(
|
|||||||
Map<String, dynamic> _$$CheckPhoneDataDtoImplToJson(
|
Map<String, dynamic> _$$CheckPhoneDataDtoImplToJson(
|
||||||
_$CheckPhoneDataDtoImpl instance,
|
_$CheckPhoneDataDtoImpl instance,
|
||||||
) => <String, dynamic>{'phone_number': instance.phoneNumber};
|
) => <String, dynamic>{'phone_number': instance.phoneNumber};
|
||||||
|
|
||||||
|
_$RegisterDtoImpl _$$RegisterDtoImplFromJson(Map<String, dynamic> json) =>
|
||||||
|
_$RegisterDtoImpl(
|
||||||
|
status: json['status'] as String?,
|
||||||
|
message: json['message'] as String?,
|
||||||
|
data: json['data'] == null
|
||||||
|
? null
|
||||||
|
: RegisterDataDto.fromJson(json['data'] as Map<String, dynamic>),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$$RegisterDtoImplToJson(_$RegisterDtoImpl instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'status': instance.status,
|
||||||
|
'message': instance.message,
|
||||||
|
'data': instance.data,
|
||||||
|
};
|
||||||
|
|
||||||
|
_$RegisterDataDtoImpl _$$RegisterDataDtoImplFromJson(
|
||||||
|
Map<String, dynamic> json,
|
||||||
|
) => _$RegisterDataDtoImpl(
|
||||||
|
registrationToken: json['registration_token'] as String?,
|
||||||
|
otpToken: json['otp_token'] as String?,
|
||||||
|
expiresIn: (json['expires_in'] as num?)?.toInt(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$$RegisterDataDtoImplToJson(
|
||||||
|
_$RegisterDataDtoImpl instance,
|
||||||
|
) => <String, dynamic>{
|
||||||
|
'registration_token': instance.registrationToken,
|
||||||
|
'otp_token': instance.otpToken,
|
||||||
|
'expires_in': instance.expiresIn,
|
||||||
|
};
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import 'package:data_channel/data_channel.dart';
|
|||||||
|
|
||||||
import '../../../common/api/api_client.dart';
|
import '../../../common/api/api_client.dart';
|
||||||
import '../../../common/api/api_failure.dart';
|
import '../../../common/api/api_failure.dart';
|
||||||
|
import '../../../common/extension/extension.dart';
|
||||||
import '../../../common/url/api_path.dart';
|
import '../../../common/url/api_path.dart';
|
||||||
import '../../../domain/auth/auth.dart';
|
import '../../../domain/auth/auth.dart';
|
||||||
import '../auth_dtos.dart';
|
import '../auth_dtos.dart';
|
||||||
@ -50,4 +51,49 @@ class AuthRemoteDataProvider {
|
|||||||
return DC.error(AuthFailure.serverError(e));
|
return DC.error(AuthFailure.serverError(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<DC<AuthFailure, RegisterDto>> register({
|
||||||
|
required String phoneNumber,
|
||||||
|
required String name,
|
||||||
|
required DateTime birthDate,
|
||||||
|
}) async {
|
||||||
|
try {
|
||||||
|
final response = await _apiClient.post(
|
||||||
|
ApiPath.register,
|
||||||
|
data: {
|
||||||
|
'phone_number': phoneNumber,
|
||||||
|
'name': name,
|
||||||
|
'birth_date': birthDate.toServerDate,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
if (response.data['success'] == false) {
|
||||||
|
if ((response.data['errors'] as List).isNotEmpty) {
|
||||||
|
if (response.data['errors'][0]['code'] == "900") {
|
||||||
|
return DC.error(
|
||||||
|
AuthFailure.dynamicErrorMessage('No. Telepon Sudah Terdaftar'),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return DC.error(
|
||||||
|
AuthFailure.dynamicErrorMessage(
|
||||||
|
'Terjadi kesalahan coba lagi nanti',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return DC.error(
|
||||||
|
AuthFailure.dynamicErrorMessage(
|
||||||
|
'Terjadi kesalahan coba lagi nanti',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final dto = RegisterDto.fromJson(response.data['data']);
|
||||||
|
return DC.data(dto);
|
||||||
|
} on ApiFailure catch (e, s) {
|
||||||
|
log('register', name: _logName, error: e, stackTrace: s);
|
||||||
|
return DC.error(AuthFailure.serverError(e));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
36
lib/infrastructure/auth/dto/register_dto.dart
Normal file
36
lib/infrastructure/auth/dto/register_dto.dart
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
part of '../auth_dtos.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
class RegisterDto with _$RegisterDto {
|
||||||
|
const RegisterDto._();
|
||||||
|
|
||||||
|
const factory RegisterDto({
|
||||||
|
@JsonKey(name: 'status') String? status,
|
||||||
|
@JsonKey(name: 'message') String? message,
|
||||||
|
@JsonKey(name: 'data') RegisterDataDto? data,
|
||||||
|
}) = _RegisterDto;
|
||||||
|
|
||||||
|
factory RegisterDto.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$RegisterDtoFromJson(json);
|
||||||
|
|
||||||
|
/// mapping ke domain
|
||||||
|
Register toDomain() => Register(
|
||||||
|
status: status ?? '',
|
||||||
|
message: message ?? '',
|
||||||
|
registrationToken: data?.registrationToken ?? '',
|
||||||
|
otpToken: data?.otpToken ?? '',
|
||||||
|
expiresIn: data?.expiresIn ?? 0,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
class RegisterDataDto with _$RegisterDataDto {
|
||||||
|
const factory RegisterDataDto({
|
||||||
|
@JsonKey(name: 'registration_token') String? registrationToken,
|
||||||
|
@JsonKey(name: 'otp_token') String? otpToken,
|
||||||
|
@JsonKey(name: 'expires_in') int? expiresIn,
|
||||||
|
}) = _RegisterDataDto;
|
||||||
|
|
||||||
|
factory RegisterDataDto.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$RegisterDataDtoFromJson(json);
|
||||||
|
}
|
||||||
@ -35,4 +35,30 @@ class AuthRepository implements IAuthRepository {
|
|||||||
return left(const AuthFailure.unexpectedError());
|
return left(const AuthFailure.unexpectedError());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Either<AuthFailure, Register>> register({
|
||||||
|
required String phoneNumber,
|
||||||
|
required String name,
|
||||||
|
required DateTime birthDate,
|
||||||
|
}) async {
|
||||||
|
try {
|
||||||
|
final result = await _remoteDataProvider.register(
|
||||||
|
phoneNumber: phoneNumber,
|
||||||
|
name: name,
|
||||||
|
birthDate: birthDate,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (result.hasError) {
|
||||||
|
return left(result.error!);
|
||||||
|
}
|
||||||
|
|
||||||
|
final auth = result.data!.toDomain();
|
||||||
|
|
||||||
|
return right(auth);
|
||||||
|
} catch (e, s) {
|
||||||
|
log('checkPhoneError', name: _logName, error: e, stackTrace: s);
|
||||||
|
return left(const AuthFailure.unexpectedError());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,12 @@ import 'package:enaklo/common/di/di_connectivity.dart' as _i644;
|
|||||||
import 'package:enaklo/common/di/di_dio.dart' as _i842;
|
import 'package:enaklo/common/di/di_dio.dart' as _i842;
|
||||||
import 'package:enaklo/common/di/di_shared_preferences.dart' as _i672;
|
import 'package:enaklo/common/di/di_shared_preferences.dart' as _i672;
|
||||||
import 'package:enaklo/common/network/network_client.dart' as _i109;
|
import 'package:enaklo/common/network/network_client.dart' as _i109;
|
||||||
|
import 'package:enaklo/domain/auth/auth.dart' as _i995;
|
||||||
import 'package:enaklo/env.dart' as _i372;
|
import 'package:enaklo/env.dart' as _i372;
|
||||||
|
import 'package:enaklo/infrastructure/auth/datasources/remote_data_provider.dart'
|
||||||
|
as _i818;
|
||||||
|
import 'package:enaklo/infrastructure/auth/repositories/auth_repository.dart'
|
||||||
|
as _i879;
|
||||||
import 'package:enaklo/presentation/router/app_router.dart' as _i698;
|
import 'package:enaklo/presentation/router/app_router.dart' as _i698;
|
||||||
import 'package:get_it/get_it.dart' as _i174;
|
import 'package:get_it/get_it.dart' as _i174;
|
||||||
import 'package:injectable/injectable.dart' as _i526;
|
import 'package:injectable/injectable.dart' as _i526;
|
||||||
@ -52,6 +57,12 @@ extension GetItInjectableX on _i174.GetIt {
|
|||||||
gh.lazySingleton<_i842.ApiClient>(
|
gh.lazySingleton<_i842.ApiClient>(
|
||||||
() => _i842.ApiClient(gh<_i361.Dio>(), gh<_i372.Env>()),
|
() => _i842.ApiClient(gh<_i361.Dio>(), gh<_i372.Env>()),
|
||||||
);
|
);
|
||||||
|
gh.factory<_i818.AuthRemoteDataProvider>(
|
||||||
|
() => _i818.AuthRemoteDataProvider(gh<_i842.ApiClient>()),
|
||||||
|
);
|
||||||
|
gh.factory<_i995.IAuthRepository>(
|
||||||
|
() => _i879.AuthRepository(gh<_i818.AuthRemoteDataProvider>()),
|
||||||
|
);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user