update
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
import 'package:flutter/foundation.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';
|
||||
import 'package:prosappco/src/presentation/screens/service_web.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();
|
||||
await isVerified
|
||||
? kIsWeb
|
||||
? Get.offAll(const ServiceWebScreen())
|
||||
: Get.to(const ServiceScreen())
|
||||
: Get.back();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user