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

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

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

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

Loading…
Cancel
Save