feat : profile and map

This commit is contained in:
2025-07-28 15:57:30 +03:30
parent 6057976b46
commit d9724f681c
67 changed files with 2835 additions and 444 deletions

View File

@@ -0,0 +1,17 @@
import 'package:rasadyar_inspection/data/model/response/auth/auth_response_model.dart';
import 'package:rasadyar_inspection/data/model/response/captcha/captcha_response_model.dart';
abstract class AuthRepository {
Future<AuthResponseModel?> login({required Map<String, dynamic> authRequest});
Future<CaptchaResponseModel?> captcha();
Future<void> logout();
Future<bool> hasAuthenticated();
Future<AuthResponseModel?> loginWithRefreshToken({required Map<String, dynamic> authRequest});
}

View File

@@ -0,0 +1,37 @@
import 'package:rasadyar_inspection/data/data_source/remote/auth/auth_remote.dart';
import 'package:rasadyar_inspection/data/model/response/auth/auth_response_model.dart';
import 'package:rasadyar_inspection/data/model/response/captcha/captcha_response_model.dart';
import 'auth_repository.dart';
class AuthRepositoryImpl implements AuthRepository {
final AuthRemote authRemote;
AuthRepositoryImpl(this.authRemote);
@override
Future<AuthResponseModel?> login({required Map<String, dynamic> authRequest}) async =>
await authRemote.login(authRequest: authRequest);
@override
Future<CaptchaResponseModel?> captcha() async {
return await authRemote.captcha();
}
@override
Future<AuthResponseModel?> loginWithRefreshToken({
required Map<String, dynamic> authRequest,
}) async {
return await authRemote.loginWithRefreshToken(authRequest: authRequest);
}
@override
Future<void> logout() async {
await authRemote.logout();
}
@override
Future<bool> hasAuthenticated() async {
return await authRemote.hasAuthenticated();
}
}