autentificacion por celular
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:prosappco/src/authentication/authentication_repository.dart';
|
||||
import 'package:prosappco/src/screens/welcome.dart';
|
||||
|
||||
class OTPController extends GetxController {
|
||||
static OTPController get instance => Get.find();
|
||||
|
||||
Future<void> verifyOTP(String otp) async {
|
||||
var isVerified = AuthenticationRepository.instance.verifyOTP(otp);
|
||||
await isVerified ? Get.offAll(const WelcomeScreen()) : Get.back();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:prosappco/src/authentication/authentication_repository.dart';
|
||||
|
||||
class PhoneAuthController extends GetxController {
|
||||
static PhoneAuthController get instance => Get.find();
|
||||
|
||||
final phoneNo = TextEditingController();
|
||||
|
||||
void phoneAuthentication(String phoneNo) {
|
||||
AuthenticationRepository.instance.phoneAuthentication(phoneNo);
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import 'package:prosappco/src/authentication/authentication_repository.dart';
|
||||
class RegisterController extends GetxController {
|
||||
static RegisterController get instance => Get.find();
|
||||
|
||||
// textField controllers to get data from textfields
|
||||
final name = TextEditingController();
|
||||
final email = TextEditingController();
|
||||
final password = TextEditingController();
|
||||
|
||||
Reference in New Issue
Block a user