feat: refactor code

This commit is contained in:
2026-06-17 12:57:28 +03:30
parent e9f294fa19
commit 519752b478
106 changed files with 3459 additions and 2309 deletions
@@ -0,0 +1,20 @@
import 'package:dio/dio.dart';
import '../../../../../core/locator/locator.dart';
import '../../../../../core/network/api_provider_imp.dart';
/// تماس‌های خامِ HTTP مربوط به احراز هویت (خروجی Response).
class AuthApiProvider {
ApiProviderImp get _api => locator<ApiProviderImp>();
Future<Response> loginOtp(String mobile) =>
_api.post('/auth/login-otp', body: {'mobile': mobile});
Future<Response> checkOtp(String mobile, String token) =>
_api.post('/auth/check-otp', body: {'mobile': mobile, 'token': token});
Future<Response> updateProfile(String firstName, String avatar) =>
_api.post('/profile', body: {'first_name': firstName, 'avatar': avatar});
Future<Response> me() => _api.get('/me');
}