Files
prosappweb/lib/src/controllers/otp_controller.dart
T
2023-11-11 18:13:58 -05:00

14 lines
539 B
Dart

import 'package:get/get.dart';
import 'package:prosappco/src/authentication/authentication_repository.dart';
// import 'package:prosappco/src/presentation/screens/service.dart';
import 'package:prosappco/src/presentation/screens/map/service.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 ServiceScreen()) : Get.back();
}
}