new backend 29-04-2026

This commit is contained in:
Hamza-Ayed
2026-04-30 01:42:57 +03:00
parent b92db3bb39
commit 4385ef5a99
20 changed files with 796 additions and 708 deletions

View File

@@ -296,17 +296,17 @@ class PhoneNumberScreen extends StatefulWidget {
}
class _PhoneNumberScreenState extends State<PhoneNumberScreen> {
final _phoneController = TextEditingController();
final _formKey = GlobalKey<FormState>();
bool _isLoading = false;
String _completePhone = '';
void _submit() async {
if (_formKey.currentState!.validate()) {
setState(() => _isLoading = true);
final rawPhone = _phoneController.text.trim().replaceFirst('+', '');
final rawPhone = _completePhone.replaceFirst('+', '');
Log.print('📱 _submit rawPhone: "$rawPhone" (from _completePhone: "$_completePhone")');
final success = await PhoneAuthHelper.sendOtp(rawPhone);
if (success && mounted) {
// Get.to(() => OtpVerificationScreen(phoneNumber: rawPhone));
await PhoneAuthHelper.verifyOtp(rawPhone);
}
if (mounted) setState(() => _isLoading = false);
@@ -351,7 +351,7 @@ class _PhoneNumberScreenState extends State<PhoneNumberScreen> {
),
initialCountryCode: 'SY',
onChanged: (phone) {
_phoneController.text = phone.completeNumber;
_completePhone = phone.completeNumber;
},
validator: (phone) {
if (phone == null || phone.number.isEmpty) {