|
|
|
@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/locator.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Authentication/checkpatient_for_registration.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/login/confirm-login.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/login/confirm-login.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
|
|
|
|
@ -39,7 +40,7 @@ class _Login extends State<Login> {
|
|
|
|
final util = Utils();
|
|
|
|
final util = Utils();
|
|
|
|
final nationalIDorFile = TextEditingController();
|
|
|
|
final nationalIDorFile = TextEditingController();
|
|
|
|
final mobileNumberController = TextEditingController();
|
|
|
|
final mobileNumberController = TextEditingController();
|
|
|
|
final int loginType = LoginType.loginType;
|
|
|
|
int loginType = LoginType.loginType;
|
|
|
|
String mobileNo;
|
|
|
|
String mobileNo;
|
|
|
|
String countryCode = '966';
|
|
|
|
String countryCode = '966';
|
|
|
|
bool isButtonDisabled = true;
|
|
|
|
bool isButtonDisabled = true;
|
|
|
|
@ -61,10 +62,12 @@ class _Login extends State<Login> {
|
|
|
|
// getDeviceToken();
|
|
|
|
// getDeviceToken();
|
|
|
|
super.initState();
|
|
|
|
super.initState();
|
|
|
|
|
|
|
|
|
|
|
|
if (BASE_URL.contains("uat.")) {
|
|
|
|
// if (BASE_URL.contains("uat.")) {
|
|
|
|
nationalIDorFile.text = "2001273";
|
|
|
|
// nationalIDorFile.text = "2001273";
|
|
|
|
mobileNumberController.text = mobileNo = "0555416043";
|
|
|
|
// mobileNumberController.text = mobileNo = "0555416043";
|
|
|
|
}/* else {
|
|
|
|
// }
|
|
|
|
|
|
|
|
getRegisterData();
|
|
|
|
|
|
|
|
/* else {
|
|
|
|
nationalIDorFile.text = "3376044";
|
|
|
|
nationalIDorFile.text = "3376044";
|
|
|
|
mobileNumberController.text = mobileNo = "0555416575";
|
|
|
|
mobileNumberController.text = mobileNo = "0555416575";
|
|
|
|
}*/
|
|
|
|
}*/
|
|
|
|
@ -107,7 +110,11 @@ class _Login extends State<Login> {
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 20),
|
|
|
|
SizedBox(height: 20),
|
|
|
|
PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value),
|
|
|
|
PhoneNumberSelectorWidget(
|
|
|
|
|
|
|
|
onNumberChange: (value) => {mobileNo = value, validateForm()},
|
|
|
|
|
|
|
|
onCountryChange: (value) => countryCode = value,
|
|
|
|
|
|
|
|
mobileNo: this.mobileNo,
|
|
|
|
|
|
|
|
),
|
|
|
|
SizedBox(height: 12),
|
|
|
|
SizedBox(height: 12),
|
|
|
|
Directionality(
|
|
|
|
Directionality(
|
|
|
|
textDirection: TextDirection.ltr,
|
|
|
|
textDirection: TextDirection.ltr,
|
|
|
|
@ -375,9 +382,16 @@ class _Login extends State<Login> {
|
|
|
|
projectViewModel.platformBridge().registerHmgGeofences();
|
|
|
|
projectViewModel.platformBridge().registerHmgGeofences();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// showLoader(bool isTrue) {
|
|
|
|
getRegisterData() async {
|
|
|
|
// setState(() {
|
|
|
|
var registerData = await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN);
|
|
|
|
// isLoading = isTrue;
|
|
|
|
|
|
|
|
// });
|
|
|
|
if (registerData != null) {
|
|
|
|
// }
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
this.nationalIDorFile.text = registerData['PatientIdentificationID'].toString();
|
|
|
|
|
|
|
|
this.isButtonDisabled = false;
|
|
|
|
|
|
|
|
this.loginType = 1;
|
|
|
|
|
|
|
|
this.mobileNo = registerData['PatientMobileNumber'].toString();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|