merge-requests/301/head
Sultan Khan 4 years ago
parent 2e0b8ddd57
commit 400f8e25f6

@ -13,3 +13,4 @@ final DASHBOARD_DATA = 'dashboard-data';
final OTP_TYPE = 'otp-type';
final LAST_LOGIN_USER = 'last-login-user';
final PASSWORD = 'password';
final CLINIC_NAME = 'clinic-name';

@ -58,6 +58,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
DoctorProfileModel profile;
bool isExpanded = false;
String isInpatient = "";
var clinicName = [];
void didChangeDependencies() async {
super.didChangeDependencies();
if (_isInit) {
@ -72,7 +73,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
.listen((IosNotificationSettings settings) {
print("Settings registered: $settings");
});
clinicName = await sharedPref.getObj(CLINIC_NAME);
print(clinicName);
_firebaseMessaging.getToken().then((String token) async {
if (token != '') {
DEVICE_TOKEN = token;
@ -721,10 +723,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Column(
children: <Widget>[
AppText(
model.dashboardItemsList.length > 0
? getPatientCount(
model.dashboardItemsList[6])
: "",
clinicName.length.toString(),
fontSize: SizeConfig.textMultiplier * 6,
color: Colors.white,
),

@ -486,7 +486,11 @@ class _VerificationMethodsState extends State<VerificationMethods> {
case 3:
return InkWell(
onTap: () => {
authenticateUser(3, BiometricType.fingerprint.index, authProv)
if (checkIfBiometricAvailable(BiometricType.fingerprint))
{
authenticateUser(
3, BiometricType.fingerprint.index, authProv)
}
},
child: RoundedContainer(
backgroundColor:
@ -518,8 +522,11 @@ class _VerificationMethodsState extends State<VerificationMethods> {
break;
case 4:
return InkWell(
onTap: () =>
{authenticateUser(4, BiometricType.face.index, authProv)},
onTap: () {
if (checkIfBiometricAvailable(BiometricType.face)) {
authenticateUser(4, BiometricType.face.index, authProv);
}
},
child: RoundedContainer(
backgroundColor: checkIfBiometricAvailable(BiometricType.face)
? Colors.white
@ -739,7 +746,9 @@ class _VerificationMethodsState extends State<VerificationMethods> {
sharedPref.setString(TOKEN, res['AuthenticationTokenID']);
if (res['List_DoctorProfile'] != null) {
loginProcessCompleted(res['List_DoctorProfile'][0], authProv);
sharedPref.setObj(CLINIC_NAME, res['List_DoctorsClinic']);
} else {
sharedPref.setObj(CLINIC_NAME, res['List_DoctorsClinic']);
ClinicModel clinic =
ClinicModel.fromJson(res['List_DoctorsClinic'][0]);
getDocProfiles(clinic, authProv);

Loading…
Cancel
Save