|
|
|
|
@ -1,3 +1,5 @@
|
|
|
|
|
import 'dart:convert';
|
|
|
|
|
|
|
|
|
|
import 'package:barcode_scan2/barcode_scan2.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/config/config.dart';
|
|
|
|
|
@ -42,6 +44,7 @@ import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
|
|
|
|
|
|
// import 'package:flutter_amazonpaymentservices/environment_type.dart';
|
|
|
|
|
// import 'package:flutter_amazonpaymentservices/flutter_amazonpaymentservices.dart';
|
|
|
|
|
|
|
|
|
|
@ -332,7 +335,12 @@ class _AppDrawerState extends State<AppDrawer> {
|
|
|
|
|
InkWell(
|
|
|
|
|
child: DrawerItem(TranslationBase.of(context).arabicChange,
|
|
|
|
|
Padding(child: Image.asset('assets/images/lang.png'), padding: EdgeInsets.only(left: 3, right: 3, top: 3, bottom: projectProvider!.isArabic ? 3 : 0)),
|
|
|
|
|
isImageIcon: true, bottomLine: false, letterSpacing: -0.84, fontSize: 14, fontHeight: projectProvider!.isArabic ? 1 : 0.8, projectProvider: projectProvider),
|
|
|
|
|
isImageIcon: true,
|
|
|
|
|
bottomLine: false,
|
|
|
|
|
letterSpacing: -0.84,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontHeight: projectProvider!.isArabic ? 1 : 0.8,
|
|
|
|
|
projectProvider: projectProvider),
|
|
|
|
|
onTap: () {
|
|
|
|
|
sharedPref.remove(APPOINTMENT_HISTORY_MEDICAL);
|
|
|
|
|
sharedPref.remove(CLINICS_LIST);
|
|
|
|
|
@ -657,9 +665,10 @@ class _AppDrawerState extends State<AppDrawer> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switchUser(user, context) {
|
|
|
|
|
GetAllSharedRecordsByStatusList switchUser = GetAllSharedRecordsByStatusList.fromJson(jsonDecode(jsonEncode(user)));
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
sharedPref.remove(BLOOD_TYPE);
|
|
|
|
|
this.familyFileProvider.silentLoggin(user is AuthenticatedUser ? null : user, mainUser: user is AuthenticatedUser).then((value) {
|
|
|
|
|
this.familyFileProvider.silentLoggin(switchUser, mainUser: user is AuthenticatedUser).then((value) {
|
|
|
|
|
// GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
// Navigator.of(context).pop();
|
|
|
|
|
loginAfter(value, context, user is AuthenticatedUser);
|
|
|
|
|
@ -691,7 +700,7 @@ class _AppDrawerState extends State<AppDrawer> {
|
|
|
|
|
// result.list.cRSVerificationStatus = result['CRSVerificationStatus'];
|
|
|
|
|
this.sharedPref.setString(APP_LANGUAGE, currentLang);
|
|
|
|
|
this.sharedPref.setString(BLOOD_TYPE, bloodType);
|
|
|
|
|
this.sharedPref.setInt(LAST_LOGIN, loginType);
|
|
|
|
|
this.sharedPref.setInt(LAST_LOGIN, loginType ?? 1);
|
|
|
|
|
await this.sharedPref.setObject(MAIN_USER, mainUser);
|
|
|
|
|
await this.sharedPref.setObject(USER_PROFILE, result.list);
|
|
|
|
|
await this.sharedPref.setObject(FAMILY_FILE, familyFile);
|
|
|
|
|
|