bug fixes

merge-update-with-lab-changes
Sultan Khan 5 years ago
parent 21ccf1ef86
commit e28209d4e8

@ -1044,5 +1044,9 @@ const Map localizedValues = {
"Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file.", "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file.",
"ar": "ar":
"هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي." "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي."
},
"update-succ": {
"en": "Successfully updated profile",
"ar": "تم تحديث البيانات بنجاح"
} }
}; };

@ -52,6 +52,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
var notificationCount = ''; var notificationCount = '';
var themeNotifier; var themeNotifier;
///inject the user data ///inject the user data
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
@ -140,18 +141,17 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_firebaseMessaging.setAutoInitEnabled(true); _firebaseMessaging.setAutoInitEnabled(true);
locationUtils = locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context); new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance WidgetsBinding.instance
.addPostFrameCallback((_) => locationUtils.getCurrentLocation()); .addPostFrameCallback((_) => locationUtils.getCurrentLocation());
if (Platform.isIOS) { if (Platform.isIOS) {
_firebaseMessaging.requestNotificationPermissions(); _firebaseMessaging.requestNotificationPermissions();
} }
_firebaseMessaging.getToken().then((String token) async { _firebaseMessaging.getToken().then((String token) async {
sharedPref.setString(PUSH_TOKEN, token); sharedPref.setString(PUSH_TOKEN, token);
if (token != null && await sharedPref.getObject(USER_PROFILE) ==null) { if (token != null && await sharedPref.getObject(USER_PROFILE) == null) {
DEVICE_TOKEN = token; DEVICE_TOKEN = token;
checkUserStatus(token); checkUserStatus(token);
} }
@ -159,122 +159,124 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}); });
//
// //_firebase Background message handler
Future.delayed(Duration.zero, () => setTheme()); Future.delayed(Duration.zero, () => setTheme());
//_firebase Background message handler //_firebase Background message handler
// _firebaseMessaging.configure( // _firebaseMessaging.configure(
// onMessage: (Map<String, dynamic> message) async { // // onMessage: (Map<String, dynamic> message) async {
// showDialog("onMessage: $message"); // // showDialog("onMessage: $message");
// print("onMessage: $message"); // // print("onMessage: $message");
// print(message); // // print(message);
// print(message['name']); // // print(message['name']);
// print(message['appointmentdate']); // // print(message['appointmentdate']);
// // //
// if (Platform.isIOS) { // // if (Platform.isIOS) {
// if (message['is_call'] == "true") { // // if (message['is_call'] == "true") {
// var route = ModalRoute.of(context); // // var route = ModalRoute.of(context);
// // //
// if (route != null) { // // if (route != null) {
// print(route.settings.name); // // print(route.settings.name);
// } // // }
// // //
// Map<String, dynamic> myMap = new Map<String, dynamic>.from(message); // // Map<String, dynamic> myMap = new Map<String, dynamic>.from(message);
// print(myMap); // // print(myMap);
// LandingPage.isOpenCallPage = true; // // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // // if (!isPageNavigated) {
// isPageNavigated = true; // // isPageNavigated = true;
// Navigator.push( // // Navigator.push(
// context, // // context,
// MaterialPageRoute( // // MaterialPageRoute(
// builder: (context) => IncomingCall( // // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // // .then((value) {
// isPageNavigated = false; // // isPageNavigated = false;
// }); // // });
// } // // }
// } else { // // } else {
// print("Is Call Not Found iOS"); // // print("Is Call Not Found iOS");
// } // // }
// } else { // // } else {
// print("Is Call Not Found iOS"); // // print("Is Call Not Found iOS");
// } // // }
// // //
// if (Platform.isAndroid) { // // if (Platform.isAndroid) {
// if (message['data'].containsKey("is_call")) { // // if (message['data'].containsKey("is_call")) {
// var route = ModalRoute.of(context); // // var route = ModalRoute.of(context);
// // //
// if (route != null) { // // if (route != null) {
// print(route.settings.name); // // print(route.settings.name);
// } // // }
// // //
// Map<String, dynamic> myMap = // // Map<String, dynamic> myMap =
// new Map<String, dynamic>.from(message['data']); // // new Map<String, dynamic>.from(message['data']);
// print(myMap); // // print(myMap);
// LandingPage.isOpenCallPage = true; // // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // // if (!isPageNavigated) {
// isPageNavigated = true; // // isPageNavigated = true;
// Navigator.push( // // Navigator.push(
// context, // // context,
// MaterialPageRoute( // // MaterialPageRoute(
// builder: (context) => IncomingCall( // // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // // .then((value) {
// isPageNavigated = false; // // isPageNavigated = false;
// }); // // });
// } // // }
// } else { // // } else {
// print("Is Call Not Found Android"); // // print("Is Call Not Found Android");
// } // // }
// } else { // // } else {
// print("Is Call Not Found Android"); // // print("Is Call Not Found Android");
// } // // }
// }, // // },
// onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler, // // onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
// onLaunch: (Map<String, dynamic> message) async { // // onLaunch: (Map<String, dynamic> message) async {
// print("onLaunch: $message"); // // print("onLaunch: $message");
// showDialog("onLaunch: $message"); // // showDialog("onLaunch: $message");
// }, // // },
// onResume: (Map<String, dynamic> message) async { // // onResume: (Map<String, dynamic> message) async {
// print("onResume: $message"); // // print("onResume: $message");
// print(message); // // print(message);
// print(message['name']); // // print(message['name']);
// print(message['appointmentdate']); // // print(message['appointmentdate']);
// // //
// showDialog("onResume: $message"); // // showDialog("onResume: $message");
// // //
// if (Platform.isIOS) { // // if (Platform.isIOS) {
// if (message['is_call'] == "true") { // // if (message['is_call'] == "true") {
// var route = ModalRoute.of(context); // // var route = ModalRoute.of(context);
// // //
// if (route != null) { // // if (route != null) {
// print(route.settings.name); // // print(route.settings.name);
// } // // }
// // //
// Map<String, dynamic> myMap = // // Map<String, dynamic> myMap =
// new Map<String, dynamic>.from(message); // // new Map<String, dynamic>.from(message);
// print(myMap); // // print(myMap);
// LandingPage.isOpenCallPage = true; // // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // // if (!isPageNavigated) {
// isPageNavigated = true; // // isPageNavigated = true;
// Navigator.push( // // Navigator.push(
// context, // // context,
// MaterialPageRoute( // // MaterialPageRoute(
// builder: (context) => IncomingCall( // // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // // .then((value) {
// isPageNavigated = false; // // isPageNavigated = false;
// }); // // });
// } // // }
// } else { // // } else {
// print("Is Call Not Found iOS"); // // print("Is Call Not Found iOS");
// } // // }
// } else { // // } else {
// print("Is Call Not Found iOS"); // // print("Is Call Not Found iOS");
// } // // }
// }, // // },
// ); // );
} }
showDialogs(String message) { showDialogs(String message) {
@ -390,7 +392,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
notificationCount, notificationCount,
style: new TextStyle( style: new TextStyle(
color: Colors.white, color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 9, fontSize: projectViewModel.isArabic ? 8 : 9,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -405,16 +407,18 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
IconButton( IconButton(
//iconSize: 70, //iconSize: 70,
icon: Icon( icon: Icon(
projectViewModel.isLogin ? Icons.settings : Icons.login, projectViewModel.isLogin && projectViewModel.user != null
? Icons.settings
: Icons.login,
color: Colors.white, color: Colors.white,
), ),
onPressed: () { onPressed: () {
if (projectViewModel.isLogin) if (projectViewModel.isLogin && projectViewModel.user != null)
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
SETTINGS, SETTINGS,
); );
else else
login(); login();
}, //do something, }, //do something,
) )
], ],
@ -428,7 +432,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
children: [ children: [
HomePage( HomePage(
goToMyProfile: () { goToMyProfile: () {
_changeCurrentTab(1); // _changeCurrentTab(1);
}, },
), ),
MedicalProfilePage(), MedicalProfilePage(),
@ -464,50 +468,51 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
case 2: case 2:
return TranslationBase.of(context).bookAppo; return TranslationBase.of(context).bookAppo;
case 3: case 3:
return TranslationBase.of(context).myFamily;
case 4:
return TranslationBase.of(context).services; return TranslationBase.of(context).services;
case 4:
return TranslationBase.of(context).bookAppo;
} }
} }
setTheme() async{
// setTheme() async {
// defaultTheme = //
// ThemeData( // defaultTheme =
// fontFamily:projectViewModel.isArabic ? 'Cairo' : 'WorkSans', // ThemeData(
// primarySwatch: Colors.blue, // fontFamily:projectViewModel.isArabic ? 'Cairo' : 'WorkSans',
// visualDensity: VisualDensity.adaptivePlatformDensity, // primarySwatch: Colors.blue,
// brightness: Brightness.light, // visualDensity: VisualDensity.adaptivePlatformDensity,
// pageTransitionsTheme: const PageTransitionsTheme( // brightness: Brightness.light,
// builders: { // pageTransitionsTheme: const PageTransitionsTheme(
// TargetPlatform.android: ZoomPageTransitionsBuilder(), // builders: {
// TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), // TargetPlatform.android: ZoomPageTransitionsBuilder(),
// }, // TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
// ), // },
// hintColor: Colors.grey[400], // ),
// disabledColor: Colors.grey[300], // hintColor: Colors.grey[400],
// errorColor: Color.fromRGBO(235, 80, 60, 1.0), // disabledColor: Colors.grey[300],
// scaffoldBackgroundColor: Color(0xffEEEEEE), // errorColor: Color.fromRGBO(235, 80, 60, 1.0),
// textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), // scaffoldBackgroundColor: Color(0xffEEEEEE),
// textSelectionHandleColor: Colors.grey, // textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
// canvasColor: Colors.white, // textSelectionHandleColor: Colors.grey,
// backgroundColor: Colors.white, // canvasColor: Colors.white,
// highlightColor: Colors.grey[100].withOpacity(0.4), // backgroundColor: Colors.white,
// splashColor: Colors.transparent, // highlightColor: Colors.grey[100].withOpacity(0.4),
// primaryColor: Color(0xff40ACC9), // splashColor: Colors.transparent,
// bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)), // primaryColor: Color(0xff40ACC9),
// cursorColor: Colors.grey, // bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)),
// cardColor: Colors.white, // cursorColor: Colors.grey,
// iconTheme: IconThemeData(), // cardColor: Colors.white,
// appBarTheme: AppBarTheme( // iconTheme: IconThemeData(),
// color: Color(0xff40ACC9), // appBarTheme: AppBarTheme(
// brightness: Brightness.dark, // color: Color(0xff40ACC9),
// elevation: 10.0, // brightness: Brightness.dark,
// actionsIconTheme: IconThemeData( // elevation: 10.0,
// color: Color(0xff40ACC9), // actionsIconTheme: IconThemeData(
// ), // color: Color(0xff40ACC9),
// ), // ),
// ); // ),
// themeNotifier.setTheme(defaultTheme); // );
// themeNotifier.setTheme(defaultTheme);
} }
void checkUserStatus(token) async { void checkUserStatus(token) async {
authService authService
@ -522,8 +527,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
.then((res) => {print(res)}); .then((res) => {print(res)});
authService.getDashboard().then((value) => { authService.getDashboard().then((value) => {
setState(() { setState(() {
notificationCount = value['List_PatientDashboard'] notificationCount = value['List_PatientDashboard'][0]
[0]['UnreadPatientNotificationCount'].toString(); ['UnreadPatientNotificationCount']
.toString();
}) })
}); });
} }
@ -555,6 +561,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_changeCurrentTab(2); _changeCurrentTab(2);
} }
} }
login() async { login() async {
var data = await sharedPref.getObject(IMEI_USER_DATA); var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN); sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);

@ -9,9 +9,9 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class ProfileSettings extends StatefulWidget { class ProfileSettings extends StatefulWidget {
@override @override
_ProfileSettings createState() => _ProfileSettings(); _ProfileSettings createState() => _ProfileSettings();
} }
@ -32,10 +32,10 @@ class _ProfileSettings extends State<ProfileSettings>
}); });
super.initState(); super.initState();
} }
Widget build(BuildContext context) {
Widget build(BuildContext context) {
return BaseView<DashboardViewModel>( return BaseView<DashboardViewModel>(
onModelReady: (model) =>{}, onModelReady: (model) => {},
builder: (_, model, wi) => Container( builder: (_, model, wi) => Container(
child: child:
ListView(scrollDirection: Axis.vertical, children: <Widget>[ ListView(scrollDirection: Axis.vertical, children: <Widget>[
@ -82,7 +82,6 @@ class _ProfileSettings extends State<ProfileSettings>
setState(() { setState(() {
language = value; language = value;
}); });
}, },
) )
], ],
@ -102,7 +101,6 @@ class _ProfileSettings extends State<ProfileSettings>
setState(() { setState(() {
language = value; language = value;
}); });
}, },
) )
], ],
@ -164,7 +162,7 @@ class _ProfileSettings extends State<ProfileSettings>
children: [ children: [
AppText(TranslationBase.of(context).email), AppText(TranslationBase.of(context).email),
TextField( TextField(
controller: emailController, controller: emailController,
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: Icon(Icons.edit), suffixIcon: Icon(Icons.edit),
)) ))
@ -179,7 +177,7 @@ class _ProfileSettings extends State<ProfileSettings>
children: [ children: [
AppText(TranslationBase.of(context).emergencyName), AppText(TranslationBase.of(context).emergencyName),
TextField( TextField(
controller: emergencyContactName, controller: emergencyContactName,
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: Icon(Icons.edit), suffixIcon: Icon(Icons.edit),
)) ))
@ -209,7 +207,7 @@ class _ProfileSettings extends State<ProfileSettings>
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).submit, TranslationBase.of(context).submit,
() { () {
saveSettings(); saveSettings();
}, },
)), )),
], ],
@ -217,14 +215,15 @@ class _ProfileSettings extends State<ProfileSettings>
]))); ])));
} }
getSettings(context){ getSettings(context) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
authService.getSettings().then((result)=>{ authService.getSettings().then((result) => {
GifLoaderDialogUtils.hideDialog(context), GifLoaderDialogUtils.hideDialog(context),
setValue(result["PateintInfoForUpdateList"][0]) setValue(result["PateintInfoForUpdateList"][0])
}); });
} }
setValue(value){
setValue(value) {
setState(() { setState(() {
this.language = int.parse(value["PreferredLanguage"]); this.language = int.parse(value["PreferredLanguage"]);
this.emailAlert = value["IsEmailAlertRequired"]; this.emailAlert = value["IsEmailAlertRequired"];
@ -233,20 +232,21 @@ class _ProfileSettings extends State<ProfileSettings>
this.emergencyContact.text = value["EmergencyContactNo"]; this.emergencyContact.text = value["EmergencyContactNo"];
this.emergencyContactName.text = value["EmergencyContactName"]; this.emergencyContactName.text = value["EmergencyContactName"];
}); });
} }
saveSettings(){
saveSettings() {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
Map<String, dynamic> request = {}; Map<String, dynamic> request = {};
request["EmailAddress"] =this.emailController.text; request["EmailAddress"] = this.emailController.text;
request["EmergencyContactName"] = this.emergencyContactName.text; request["EmergencyContactName"] = this.emergencyContactName.text;
request["EmergencyContactNo"] = this.emergencyContact.text; request["EmergencyContactNo"] = this.emergencyContact.text;
request["IsEmailAlertRequired"] = this.emailAlert; request["IsEmailAlertRequired"] = this.emailAlert;
request["IsSMSAlertRequired"] = this.smsAlert; request["IsSMSAlertRequired"] = this.smsAlert;
request["PreferredLanguage"] = this.language.toString(); request["PreferredLanguage"] = this.language.toString();
authService.saveSettings(request).then((result)=>{ authService.saveSettings(request).then((result) => {
print(result), AppToast.showSuccessToast(
GifLoaderDialogUtils.hideDialog(context) message: TranslationBase.of(context).profileUpdate),
}); GifLoaderDialogUtils.hideDialog(context)
});
} }
} }

@ -148,7 +148,7 @@ class TranslationBase {
String get idNo => localizedValues['national-id'][locale.languageCode]; String get idNo => localizedValues['national-id'][locale.languageCode];
String get fileNo => localizedValues['fileNo'][locale.languageCode]; String get fileNo => localizedValues['fileNo'][locale.languageCode];
String get fileno => localizedValues['fileno'][locale.languageCode]; String get fileno => localizedValues['fileno'][locale.languageCode];
String get forgotPassword => String get forgotPassword =>
localizedValues['forgotFileNo'][locale.languageCode]; localizedValues['forgotFileNo'][locale.languageCode];
@ -791,7 +791,8 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get modes => localizedValues['modes'][locale.languageCode]; String get modes => localizedValues['modes'][locale.languageCode];
String get vibration => localizedValues['vibration'][locale.languageCode]; String get vibration => localizedValues['vibration'][locale.languageCode];
String get blindMode => localizedValues['blind-modes'][locale.languageCode]; String get blindMode => localizedValues['blind-modes'][locale.languageCode];
String get invertTheme => localizedValues['invert-theme'][locale.languageCode]; String get invertTheme =>
localizedValues['invert-theme'][locale.languageCode];
String get offTheme => localizedValues['off-theme'][locale.languageCode]; String get offTheme => localizedValues['off-theme'][locale.languageCode];
String get dimTheme => localizedValues['dim-theme'][locale.languageCode]; String get dimTheme => localizedValues['dim-theme'][locale.languageCode];
String get bwTheme => localizedValues['bw-theme'][locale.languageCode]; String get bwTheme => localizedValues['bw-theme'][locale.languageCode];
@ -805,8 +806,7 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
localizedValues['accessibility'][locale.languageCode]; localizedValues['accessibility'][locale.languageCode];
String get selectClinic => String get selectClinic =>
localizedValues['selectClinic'][locale.languageCode]; localizedValues['selectClinic'][locale.languageCode];
String get reviews => String get reviews => localizedValues['reviews'][locale.languageCode];
localizedValues['reviews'][locale.languageCode];
String get orderStatus => localizedValues['orderStatus'][locale.languageCode]; String get orderStatus => localizedValues['orderStatus'][locale.languageCode];
String get cancelOrder => localizedValues['CancelOrder'][locale.languageCode]; String get cancelOrder => localizedValues['CancelOrder'][locale.languageCode];
@ -814,9 +814,12 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get feedback => localizedValues['Feedback'][locale.languageCode]; String get feedback => localizedValues['Feedback'][locale.languageCode];
String get liveChat => localizedValues['LiveChat'][locale.languageCode]; String get liveChat => localizedValues['LiveChat'][locale.languageCode];
String get service => localizedValues['Service'][locale.languageCode]; String get service => localizedValues['Service'][locale.languageCode];
String get hMGServiceLabel => localizedValues['HMGServiceLabel'][locale.languageCode]; String get hMGServiceLabel =>
String get healthWeatherIndicators => localizedValues['HealthWeatherIndicators'][locale.languageCode]; localizedValues['HMGServiceLabel'][locale.languageCode];
String get healthTipsBasedOnCurrentWeather => localizedValues['HealthTipsBasedOnCurrentWeather'][locale.languageCode]; String get healthWeatherIndicators =>
localizedValues['HealthWeatherIndicators'][locale.languageCode];
String get healthTipsBasedOnCurrentWeather =>
localizedValues['HealthTipsBasedOnCurrentWeather'][locale.languageCode];
String get moreDetails => localizedValues['MoreDetails'][locale.languageCode]; String get moreDetails => localizedValues['MoreDetails'][locale.languageCode];
String get sendCopy => localizedValues['SendCopy'][locale.languageCode]; String get sendCopy => localizedValues['SendCopy'][locale.languageCode];
String get resendOrder => localizedValues['ResendOrder'][locale.languageCode]; String get resendOrder => localizedValues['ResendOrder'][locale.languageCode];
@ -830,7 +833,8 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get mass => localizedValues['mass'][locale.languageCode]; String get mass => localizedValues['mass'][locale.languageCode];
String get tempC => localizedValues['temp-c'][locale.languageCode]; String get tempC => localizedValues['temp-c'][locale.languageCode];
String get bpm => localizedValues['bpm'][locale.languageCode]; String get bpm => localizedValues['bpm'][locale.languageCode];
String get respirationSigns => localizedValues['respiration-signs'][locale.languageCode]; String get respirationSigns =>
localizedValues['respiration-signs'][locale.languageCode];
String get sysDias => localizedValues['sys-dias'][locale.languageCode]; String get sysDias => localizedValues['sys-dias'][locale.languageCode];
String get body => localizedValues['body'][locale.languageCode]; String get body => localizedValues['body'][locale.languageCode];
String get feedbackTitle => localizedValues['feedback'][locale.languageCode]; String get feedbackTitle => localizedValues['feedback'][locale.languageCode];
@ -839,26 +843,39 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get likeToHear => localizedValues['like-to-hear'][locale.languageCode]; String get likeToHear => localizedValues['like-to-hear'][locale.languageCode];
String get subject => localizedValues['subject'][locale.languageCode]; String get subject => localizedValues['subject'][locale.languageCode];
String get message => localizedValues['message'][locale.languageCode]; String get message => localizedValues['message'][locale.languageCode];
String get emptySubject => localizedValues['empty-subject'][locale.languageCode]; String get emptySubject =>
String get emptyMessage => localizedValues['empty-message'][locale.languageCode]; localizedValues['empty-subject'][locale.languageCode];
String get selectAttachment => localizedValues['select-attachment'][locale.languageCode]; String get emptyMessage =>
String get complainAppo => localizedValues['complain-appo'][locale.languageCode]; localizedValues['empty-message'][locale.languageCode];
String get complainWithoutAppo => localizedValues['complain-without-appo'][locale.languageCode]; String get selectAttachment =>
localizedValues['select-attachment'][locale.languageCode];
String get complainAppo =>
localizedValues['complain-appo'][locale.languageCode];
String get complainWithoutAppo =>
localizedValues['complain-without-appo'][locale.languageCode];
String get question => localizedValues['question'][locale.languageCode]; String get question => localizedValues['question'][locale.languageCode];
String get messageType => localizedValues['message-type'][locale.languageCode]; String get messageType =>
localizedValues['message-type'][locale.languageCode];
String get compliment => localizedValues['compliment'][locale.languageCode]; String get compliment => localizedValues['compliment'][locale.languageCode];
String get suggestion => localizedValues['suggestion'][locale.languageCode]; String get suggestion => localizedValues['suggestion'][locale.languageCode];
String get yourFeedback => localizedValues['your-feedback'][locale.languageCode]; String get yourFeedback =>
localizedValues['your-feedback'][locale.languageCode];
String get selectPart => localizedValues['select-part'][locale.languageCode]; String get selectPart => localizedValues['select-part'][locale.languageCode];
String get number => localizedValues['number'][locale.languageCode]; String get number => localizedValues['number'][locale.languageCode];
String get notClassified => localizedValues['not-classified'][locale.languageCode]; String get notClassified =>
String get searchItemError => localizedValues['searchItemError'][locale.languageCode]; localizedValues['not-classified'][locale.languageCode];
String get searchItemError =>
localizedValues['searchItemError'][locale.languageCode];
String get youCanFind => localizedValues['YouCanFind'][locale.languageCode]; String get youCanFind => localizedValues['YouCanFind'][locale.languageCode];
String get itemInSearch => localizedValues['ItemInSearch'][locale.languageCode]; String get itemInSearch =>
localizedValues['ItemInSearch'][locale.languageCode];
String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode]; String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode];
String get specialResult => localizedValues['SpecialResult'][locale.languageCode]; String get specialResult =>
String get generalResult => localizedValues['GeneralResult'][locale.languageCode]; localizedValues['SpecialResult'][locale.languageCode];
String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode]; String get generalResult =>
localizedValues['GeneralResult'][locale.languageCode];
String get showMoreBtn =>
localizedValues['show-more-btn'][locale.languageCode];
String get value => localizedValues['value'][locale.languageCode]; String get value => localizedValues['value'][locale.languageCode];
String get range => localizedValues['range'][locale.languageCode]; String get range => localizedValues['range'][locale.languageCode];
String get outpatient => localizedValues['out-patient'][locale.languageCode]; String get outpatient => localizedValues['out-patient'][locale.languageCode];
@ -868,50 +885,69 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get sendCopyRad => localizedValues['send-copy'][locale.languageCode]; String get sendCopyRad => localizedValues['send-copy'][locale.languageCode];
String get appoSurvey => localizedValues['appoSurvey'][locale.languageCode]; String get appoSurvey => localizedValues['appoSurvey'][locale.languageCode];
String get labResults => localizedValues['labResults'][locale.languageCode]; String get labResults => localizedValues['labResults'][locale.languageCode];
String get doctorRating => localizedValues['doctorRating'][locale.languageCode]; String get doctorRating =>
localizedValues['doctorRating'][locale.languageCode];
String get good => localizedValues['good'][locale.languageCode]; String get good => localizedValues['good'][locale.languageCode];
String get v_good => localizedValues['v-good'][locale.languageCode]; String get v_good => localizedValues['v-good'][locale.languageCode];
String get excellent => localizedValues['excellent'][locale.languageCode]; String get excellent => localizedValues['excellent'][locale.languageCode];
String get below_average => localizedValues['below-average'][locale.languageCode]; String get below_average =>
localizedValues['below-average'][locale.languageCode];
String get infoSigns => localizedValues['info-signs'][locale.languageCode]; String get infoSigns => localizedValues['info-signs'][locale.languageCode];
String get infoAdvancePayment => localizedValues['info-advance-payment'][locale.languageCode]; String get infoAdvancePayment =>
String get infoMyBalance => localizedValues['info-my-balance'][locale.languageCode]; localizedValues['info-advance-payment'][locale.languageCode];
String get infoMyBalance =>
localizedValues['info-my-balance'][locale.languageCode];
String get erContant => localizedValues['er-contant'][locale.languageCode]; String get erContant => localizedValues['er-contant'][locale.languageCode];
String get er => localizedValues['er'][locale.languageCode]; String get er => localizedValues['er'][locale.languageCode];
String get transportationService => localizedValues['transportation-Service'][locale.languageCode]; String get transportationService =>
String get infoAmbulance => localizedValues['info-ambulance'][locale.languageCode]; localizedValues['transportation-Service'][locale.languageCode];
String get transportHeading => localizedValues['RRT-transport-heading'][locale.languageCode]; String get infoAmbulance =>
localizedValues['info-ambulance'][locale.languageCode];
String get transportHeading =>
localizedValues['RRT-transport-heading'][locale.languageCode];
String get sar => localizedValues['sar'][locale.languageCode]; String get sar => localizedValues['sar'][locale.languageCode];
String get directionHeading => localizedValues['RRT-direction-heading'][locale.languageCode]; String get directionHeading =>
localizedValues['RRT-direction-heading'][locale.languageCode];
String get toHospital => localizedValues['to-hospital'][locale.languageCode]; String get toHospital => localizedValues['to-hospital'][locale.languageCode];
String get fromHospital => localizedValues['from-hospital'][locale.languageCode]; String get fromHospital =>
localizedValues['from-hospital'][locale.languageCode];
String get oneDirec => localizedValues['one-direc'][locale.languageCode]; String get oneDirec => localizedValues['one-direc'][locale.languageCode];
String get twoDirec => localizedValues['two-direc'][locale.languageCode]; String get twoDirec => localizedValues['two-direc'][locale.languageCode];
String get pickupLocation => localizedValues['pickup-location'][locale.languageCode]; String get pickupLocation =>
localizedValues['pickup-location'][locale.languageCode];
String get pickupSpot => localizedValues['pickup-spot'][locale.languageCode]; String get pickupSpot => localizedValues['pickup-spot'][locale.languageCode];
String get insideHome => localizedValues['inside-home'][locale.languageCode]; String get insideHome => localizedValues['inside-home'][locale.languageCode];
String get haveAppo => localizedValues['have-appo'][locale.languageCode]; String get haveAppo => localizedValues['have-appo'][locale.languageCode];
String get dropoffLocation => localizedValues['dropoff-location'][locale.languageCode]; String get dropoffLocation =>
localizedValues['dropoff-location'][locale.languageCode];
String get selectAll => localizedValues['select-all'][locale.languageCode]; String get selectAll => localizedValues['select-all'][locale.languageCode];
String get selectMap => localizedValues['select-map'][locale.languageCode]; String get selectMap => localizedValues['select-map'][locale.languageCode];
String get noAppointment => localizedValues['no-appointment'][locale.languageCode]; String get noAppointment =>
String get patientShareB => localizedValues['patient-share'][locale.languageCode]; localizedValues['no-appointment'][locale.languageCode];
String get patientShareTax => localizedValues['patient-share-tax'][locale.languageCode]; String get patientShareB =>
String get patientShareTotal => localizedValues['patient-share-total'][locale.languageCode]; localizedValues['patient-share'][locale.languageCode];
String get selectAmbulate => localizedValues['select-ambulate'][locale.languageCode]; String get patientShareTax =>
localizedValues['patient-share-tax'][locale.languageCode];
String get patientShareTotal =>
localizedValues['patient-share-total'][locale.languageCode];
String get selectAmbulate =>
localizedValues['select-ambulate'][locale.languageCode];
String get wheelchair => localizedValues['wheelchair'][locale.languageCode]; String get wheelchair => localizedValues['wheelchair'][locale.languageCode];
String get walker => localizedValues['walker"'][locale.languageCode]; String get walker => localizedValues['walker"'][locale.languageCode];
String get stretcher => localizedValues['stretcher'][locale.languageCode]; String get stretcher => localizedValues['stretcher'][locale.languageCode];
String get none => localizedValues['none'][locale.languageCode]; String get none => localizedValues['none'][locale.languageCode];
String get RRTSummary => localizedValues['RRT-Summary'][locale.languageCode]; String get RRTSummary => localizedValues['RRT-Summary'][locale.languageCode];
String get billAmount => localizedValues['bill-amount'][locale.languageCode]; String get billAmount => localizedValues['bill-amount'][locale.languageCode];
String get transportMethod => localizedValues['transport-method'][locale.languageCode]; String get transportMethod =>
localizedValues['transport-method'][locale.languageCode];
String get directions => localizedValues['directions'][locale.languageCode]; String get directions => localizedValues['directions'][locale.languageCode];
String get infoMyAppointments => localizedValues['info-my-appointments'][locale.languageCode]; String get infoMyAppointments =>
localizedValues['info-my-appointments'][locale.languageCode];
String get infoTodo => localizedValues['info-todo'][locale.languageCode]; String get infoTodo => localizedValues['info-todo'][locale.languageCode];
String get familyInfo => localizedValues['family-info'][locale.languageCode]; String get familyInfo => localizedValues['family-info'][locale.languageCode];
String get profileUpdate =>
localizedValues['update-succ'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -41,19 +41,15 @@ class _AppDrawerState extends State<AppDrawer> {
var familyFileProvider = FamilyFilesProvider(); var familyFileProvider = FamilyFilesProvider();
AuthenticatedUser user; AuthenticatedUser user;
AuthenticatedUser mainUser; AuthenticatedUser mainUser;
AuthenticatedUserObject authenticatedUserObject = locator< AuthenticatedUserObject authenticatedUserObject =
AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>(); VitalSignService _vitalSignService = locator<VitalSignService>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectProvider = Provider.of(context); projectProvider = Provider.of(context);
return SizedBox( return SizedBox(
width: MediaQuery width: MediaQuery.of(context).size.width * 0.75,
.of(context)
.size
.width * 0.75,
child: Container( child: Container(
color: Colors.white, color: Colors.white,
child: Drawer( child: Drawer(
@ -65,359 +61,329 @@ class _AppDrawerState extends State<AppDrawer> {
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
children: <Widget>[ children: <Widget>[
Container( Container(
height: SizeConfig.screenHeight * .30, height: SizeConfig.screenHeight * .25,
padding: EdgeInsets.all(15),
child: InkWell( child: InkWell(
child: DrawerHeader( child: Column(
child: Column( children: <Widget>[
children: <Widget>[ Container(
Container( child:
child: Image.asset('assets/images/DQ/DQ_logo.png'),
Image.asset('assets/images/DQ/DQ_logo.png'), margin: EdgeInsets.all(
margin: EdgeInsets.all( SizeConfig.imageSizeMultiplier * 4),
SizeConfig.imageSizeMultiplier * 4), ),
), (user != null && projectProvider.isLogin)
(user != null && projectProvider.isLogin) ? Padding(
? Padding( padding: EdgeInsets.all(10),
padding: EdgeInsets.all(15), child: Column(
child: Column( mainAxisAlignment:
mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start, children: <Widget>[
children: <Widget>[ Row(
Row( children: <Widget>[
children: <Widget>[ Padding(
padding:
EdgeInsets.only(right: 5),
child: Icon(
Icons.account_circle,
color: Color(0xFF40ACC9),
)),
AppText(
user.firstName +
' ' +
user.lastName,
color: Color(0xFF40ACC9),
)
],
),
Row(children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only( padding:
right: 5), EdgeInsets.only(left: 30),
child: Icon( child: Column(
Icons.account_circle, children: <Widget>[
color: Color(0xFF40ACC9), AppText(
)), TranslationBase.of(
AppText( context)
user.firstName + .fileno +
' ' + ": " +
user.lastName, user.patientID
color: Color(0xFF40ACC9), .toString(),
) color: Color(0xFF40ACC9),
], fontSize: SizeConfig
), .textMultiplier *
Row(children: <Widget>[ 1.5,
Padding( ),
padding: EdgeInsets.only( AppText(
left: 30, top: 5), user.bloodGroup != null
child: Column( ? 'Blood Group: ' +
children: <Widget>[ user.bloodGroup
AppText( : '',
TranslationBase fontSize: SizeConfig
.of( .textMultiplier *
context) 1.5,
.fileno + ),
": " + ],
user.patientID ))
.toString(), ])
color: ]))
Color(0xFF40ACC9), : SizedBox(),
fontSize: SizeConfig ],
.textMultiplier *
1.5,
),
AppText(
user.bloodGroup != null
? 'Blood Group: ' +
user.bloodGroup
: '',
fontSize: SizeConfig
.textMultiplier *
1.5,
),
],
))
])
]))
: SizedBox(),
],
),
), ),
), ),
), ),
Column( Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
InkWell(
child: DrawerItem(
TranslationBase
.of(context)
.arabicChange,
Icons.translate),
onTap: () {
// Navigator.of(context).pushNamed(
// WELCOME_LOGIN,
// );
if (projectProvider.isArabic) {
projectProvider.changeLanguage('en');
} else {
projectProvider.changeLanguage('ar');
}
},
),
(user != null && projectProvider.isLogin) (user != null && projectProvider.isLogin)
? Column( ? Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
user.isFamily == null || user.isFamily == false user.isFamily == null ||
? InkWell( user.isFamily == false
child: DrawerItem( ? InkWell(
TranslationBase child: DrawerItem(
.of(context) TranslationBase.of(context).family,
.family, Icons.group,
Icons.group, textColor: Color(0xFF40ACC9),
textColor: Color(0xFF40ACC9), iconColor: Color(0xFF40ACC9),
iconColor: Color(0xFF40ACC9), bottomLine: false,
bottomLine: false, sideArrow: true,
sideArrow: true, ),
), onTap: () {
onTap: () { Navigator.of(context).pushNamed(
Navigator.of(context).pushNamed( MY_FAMILIY,
MY_FAMILIY, );
); },
}, )
) : SizedBox(),
: SizedBox(), FutureBuilder(
FutureBuilder( future: getFamilyFiles(), // async work
future: getFamilyFiles(), // async work builder: (BuildContext context,
builder: (BuildContext context, AsyncSnapshot<
AsyncSnapshot< GetAllSharedRecordsByStatusResponse>
GetAllSharedRecordsByStatusResponse> snapshot) {
snapshot) { switch (snapshot.connectionState) {
switch (snapshot.connectionState) { case ConnectionState.waiting:
case ConnectionState.waiting: return Padding(
return Padding( padding: EdgeInsets.all(10),
padding: EdgeInsets.all(10), child: Text('Loading....'));
child: Text('Loading....')); default:
default: if (snapshot.hasError)
if (snapshot.hasError) return Padding(
return Padding( padding: EdgeInsets.all(10),
padding: EdgeInsets.all(10), child: Text(snapshot.error));
child: Text(snapshot.error)); else
else return Container(
return Container( decoration: BoxDecoration(
decoration: BoxDecoration( border: Border(
border: Border( bottom: BorderSide(
bottom: BorderSide( // <--- left side
// <--- left side color: Colors.grey[200],
color: Colors.grey[200], width: 1.0,
width: 1.0, ),
), )),
)), child: Column(
child: Column( children: [
children: [ user.isFamily == true
user.isFamily == true ? Container(
? Container( padding:
padding: EdgeInsets.only(
EdgeInsets.only( bottom: 5),
bottom: 5),
child: InkWell(
onTap: () {
switchUser(
mainUser,
context);
},
child: Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <
Widget>[
Expanded(
child: Icon(
Icons
.person),
),
Expanded(
flex: 7,
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <
Widget>[
AppText(
mainUser
.firstName +
' ' +
mainUser
.lastName),
AppText(
TranslationBase
.of(
context)
.fileno +
": " +
mainUser
.patientID
.toString()),
])),
],
)))
: SizedBox(),
Column(
mainAxisAlignment:
MainAxisAlignment
.start,
mainAxisSize:
MainAxisSize.min,
children: snapshot.data
.getAllSharedRecordsByStatusList
.map<Widget>(
(result) {
return result
.status ==
3
? Container(
padding: EdgeInsets
.only(
bottom:
5),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
switchUser( switchUser(
result, mainUser,
context); context);
}, },
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment CrossAxisAlignment
.start, .start,
children: < children: <
Widget>[ Widget>[
Expanded( Expanded(
child: child: Icon(
Icon(Icons Icons
.person, .person),
color: result
.responseID ==
user
.patientID
? Color(
0xFF40ACC9)
: Colors
.black),
), ),
Expanded( Expanded(
flex: 7, flex: 7,
child: Padding( child: Column(
padding: EdgeInsets crossAxisAlignment:
.only( CrossAxisAlignment.start,
left: 5, children: <Widget>[
right: 5), AppText(mainUser.firstName + ' ' + mainUser.lastName),
child: Column( AppText(TranslationBase.of(context).fileno + ": " + mainUser.patientID.toString()),
crossAxisAlignment: CrossAxisAlignment ])),
.start,
children: <
Widget>[
AppText(
result
.patientName,
color: result
.responseID ==
user
.patientID
? Color(
0xFF40ACC9)
: Colors
.black),
AppText(
TranslationBase
.of(
context)
.fileno +
": " +
result
.iD
.toString(),
color: result
.responseID ==
user
.patientID
? Color(
0xFF40ACC9)
: Colors
.black),
]))),
], ],
))) )))
: SizedBox(); : SizedBox(),
}).toList()) Column(
], mainAxisAlignment:
)); MainAxisAlignment
} .start,
}, mainAxisSize:
), MainAxisSize.min,
InkWell( children: snapshot.data
child: DrawerItem( .getAllSharedRecordsByStatusList
TranslationBase .map<Widget>(
.of(context) (result) {
.notification, return result
Icons.notifications), .status ==
onTap: () { 3
//NotificationsPage ? Container(
Navigator.of(context).pop(); padding: EdgeInsets
Navigator.push( .only(
context, bottom:
MaterialPageRoute( 5),
builder: (BuildContext context) => child: InkWell(
NotificationsPage())); onTap: () {
}, switchUser(
), result,
InkWell( context);
child: DrawerItem( },
TranslationBase child: Row(
.of(context) crossAxisAlignment:
.appsetting, CrossAxisAlignment.start,
Icons.settings_input_composite), children: <
onTap: () { Widget>[
Navigator.of(context).pushNamed( Expanded(
SETTINGS, child:
); Icon(Icons.person, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
}, ),
), Expanded(
InkWell( flex: 7,
child: DrawerItem( child: Padding(
TranslationBase padding: EdgeInsets.only(left: 5, right: 5),
.of(context) child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
.rateApp, AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
Icons.star), AppText(TranslationBase.of(context).fileno + ": " + result.iD.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
onTap: () { ]))),
if (Platform.isIOS) { ],
launch( )))
"https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978"); : SizedBox();
} else { }).toList())
launch( ],
"https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en"); ));
} }
}, },
), ),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase TranslationBase.of(context)
.of(context) .arabicChange,
.logout, Icons.translate),
Icons.lock_open), onTap: () {
onTap: () { if (projectProvider.isArabic) {
logout(); projectProvider.changeLanguage('en');
}, } else {
) projectProvider.changeLanguage('ar');
], }
) },
: InkWell( ),
child: DrawerItem( InkWell(
TranslationBase child: DrawerItem(
.of(context) TranslationBase.of(context)
.loginregister, .notification,
Icons.lock_open), Icons.notifications),
onTap: () { onTap: () {
login(); //NotificationsPage
}, Navigator.of(context).pop();
), Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
NotificationsPage()));
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).appsetting,
Icons.settings_input_composite),
onTap: () {
Navigator.of(context).pushNamed(
SETTINGS,
);
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).rateApp,
Icons.star),
onTap: () {
if (Platform.isIOS) {
launch(
"https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
} else {
launch(
"https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en");
}
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).logout,
Icons.lock_open),
onTap: () {
logout();
},
)
],
)
: Column(
children: [
InkWell(
child: DrawerItem(
TranslationBase.of(context)
.loginregister,
Icons.lock_open),
onTap: () {
login();
},
),
SizedBox(
height: 120,
),
InkWell(
child: DrawerItem(
TranslationBase.of(context)
.arabicChange,
Icons.translate),
onTap: () {
if (projectProvider.isArabic) {
projectProvider.changeLanguage('en');
} else {
projectProvider.changeLanguage('ar');
}
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).appsetting,
Icons.settings_input_composite),
onTap: () {
Navigator.of(context).pushNamed(
SETTINGS,
);
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).rateApp,
Icons.star),
onTap: () {
if (Platform.isIOS) {
launch(
"https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
} else {
launch(
"https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en");
}
},
)
],
)
], ],
) )
], ],
@ -436,9 +402,7 @@ class _AppDrawerState extends State<AppDrawer> {
children: [ children: [
Column( Column(
children: <Widget>[ children: <Widget>[
Text(TranslationBase Text(TranslationBase.of(context).poweredBy),
.of(context)
.poweredBy),
Image.asset( Image.asset(
'assets/images/cs_logo_container.png', 'assets/images/cs_logo_container.png',
width: SizeConfig.imageSizeMultiplier * 30, width: SizeConfig.imageSizeMultiplier * 30,
@ -527,12 +491,11 @@ class _AppDrawerState extends State<AppDrawer> {
this this
.familyFileProvider .familyFileProvider
.silentLoggin(user is AuthenticatedUser ? null : user, .silentLoggin(user is AuthenticatedUser ? null : user,
mainUser: user is AuthenticatedUser) mainUser: user is AuthenticatedUser)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
loginAfter(value, context); loginAfter(value, context);
}) }).catchError((err) {
.catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);

Loading…
Cancel
Save