check phone repo
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:dartz/dartz.dart';
|
||||
|
||||
import '../../common/api/api_failure.dart';
|
||||
|
||||
part 'auth.freezed.dart';
|
||||
|
||||
part 'entities/check_phone_entity.dart';
|
||||
part 'failures/auth_failure.dart';
|
||||
part 'repositories/i_auth_repository.dart';
|
||||
|
||||
enum CheckPhoneStatus { notRegistered, passwordRequired, unknown }
|
||||
|
||||
extension CheckPhoneStatusX on CheckPhoneStatus {
|
||||
String toStringType() => switch (this) {
|
||||
CheckPhoneStatus.notRegistered => 'NOT_REGISTERED',
|
||||
CheckPhoneStatus.passwordRequired => 'PASSWORD_REQUIRED',
|
||||
CheckPhoneStatus.unknown => '',
|
||||
};
|
||||
|
||||
bool get isNotRegistered => this == CheckPhoneStatus.notRegistered;
|
||||
bool get isPasswordRequired => this == CheckPhoneStatus.passwordRequired;
|
||||
}
|
||||
Reference in New Issue
Block a user