Merge branch 'diplomatic-quarter-live' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan

merge-update-with-lab-changes
Sultan Khan 5 years ago
commit de2a5e55eb

@ -997,7 +997,7 @@ const Map localizedValues = {
"selectClinic": {"en": "Select Clinic", "ar": " بحث بالعيادة"},
"reviews": {"en": "Reviews", "ar": "تقييمات"},
"searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"},
"YouCanFind": {"en": "YouCanFind", "ar": "باستطاعتك العثور على "},
"YouCanFind": {"en": "You Can Find ", "ar": "باستطاعتك العثور على "},
"ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "},
"InvoiceNo": {"en": " Invoice No", "ar": "رقم الفاتورة"},
"SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"},
@ -1035,5 +1035,13 @@ const Map localizedValues = {
"en": "Email the Report",
"ar": "أرسل التقرير"
},
"appoSurvey": {
"en": "Survey",
"ar": "إستبيان"
},
"appoSurveySubtitle": {
"en": "Survey",
"ar": "إستبيان"
},
};

@ -4,7 +4,7 @@ class PharmaciesListModel {
int languageID;
String stamp;
String iPAdress;
double versionID;
dynamic versionID;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
@ -14,7 +14,7 @@ class PharmaciesListModel {
int editedBy;
int projectID;
int clinicID;
double price;
dynamic price;
String imageLocation;
String desLocation;
String itemDes;

@ -554,7 +554,7 @@ class _BookSuccessState extends State<BookSuccess> {
AppoitmentAllHistoryResultList appo) async {
if (paymentMethod == "ApplePay") {
await widget.chromeBrowser.open(
url: "https://flutter.dev/",
url: "https://applepay-datatrans-sample.herokuapp.com/",
options: ChromeSafariBrowserClassOptions(
android: AndroidChromeCustomTabsOptions(
addDefaultShareMenuItem: false),

@ -102,7 +102,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
//indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
@ -184,7 +184,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
Widget myFamilyDetails(context) {
return Container(
height: MediaQuery.of(context).size.height,
margin: EdgeInsets.fromLTRB(20.0, 0, 20.0, 0.0),
margin: EdgeInsets.fromLTRB(20.0, 25.0, 20.0, 0.0),
child: Column(
children: <Widget>[
Expanded(

@ -4,32 +4,32 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class ArrivedButtons {
static var buttons = [
{
"title": "Arrived",
"subtitle": "Status",
"title": TranslationBase.of(AppGlobal.context).arrived,
"subtitle": TranslationBase.of(AppGlobal.context).status,
"icon": "assets/images/new-design/waiting-room.png",
"caller": "openReschedule"
},
{
"title": "Medicines",
"subtitle": "Prescriptions",
"title": TranslationBase.of(AppGlobal.context).medicines,
"subtitle": TranslationBase.of(AppGlobal.context).medicinesSubtitle,
"icon": "assets/images/new-design/medicine_prescriptions_icon.png",
"caller": "prescriptions"
},
{
"title": "Radiology",
"subtitle": "Services",
"title": TranslationBase.of(AppGlobal.context).radiology,
"subtitle": TranslationBase.of(AppGlobal.context).radiologySubtitle,
"icon": "assets/images/new-design/radiology_service_icon.png",
"caller": "radiology"
},
{
"title": "Lab",
"subtitle": "Result",
"title": TranslationBase.of(AppGlobal.context).lab,
"subtitle": TranslationBase.of(AppGlobal.context).labSubtitle,
"icon": "assets/images/new-design/lab_result_icon.png",
"caller": "labResult"
},
{
"title": "Vital Signs",
"subtitle": "Values",
"title": TranslationBase.of(AppGlobal.context).vitalSigns,
"subtitle": TranslationBase.of(AppGlobal.context).vitalSignsSubtitle,
"icon": "assets/images/new-design/vital_signs.png",
"caller": "VitalSigns"
},
@ -40,20 +40,20 @@ class ArrivedButtons {
"caller": "insertComplaint"
},
{
"title": "Insurance",
"subtitle": "Approvals",
"title": TranslationBase.of(AppGlobal.context).insurance,
"subtitle": TranslationBase.of(AppGlobal.context).insuranceSubtitle,
"icon": "assets/images/new-design/insurance_approvals_icon.png",
"caller": "Insurance"
},
{
"title": "Ask Your",
"subtitle": "Doctor",
"title": TranslationBase.of(AppGlobal.context).askYour,
"subtitle": TranslationBase.of(AppGlobal.context).askYourSubtitle,
"icon": "assets/images/new-design/ask_doctor_icon.png",
"caller": "askDoc"
},
{
"title": "Survey",
"subtitle": "Service",
"title": TranslationBase.of(AppGlobal.context).appoSurvey,
"subtitle": TranslationBase.of(AppGlobal.context).service,
"icon": "assets/images/new-design/survey.png",
"caller": "Survey"
}

@ -53,7 +53,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
@override
Widget build(BuildContext context) {
var size = MediaQuery.of(context).size;
final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.42) / 2;
final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.455) / 2;
final double itemWidth = size.width / 2;
return Container(
@ -73,8 +73,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
_handleButtonClicks(e);
},
child: Container(
height: 100.0,
margin: EdgeInsets.all(9.0),
// height: 100.0,
margin: EdgeInsets.all(7.0),
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
@ -90,17 +90,17 @@ class _AppointmentActionsState extends State<AppointmentActions> {
children: <Widget>[
Container(
margin:
EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 0.0),
child: Text(e.title,
overflow: TextOverflow.clip,
style: TextStyle(
color: new Color(0xFF40ACC9),
letterSpacing: 1.0,
fontSize: 20.0)),
fontSize: 18.0)),
),
Container(
margin:
EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
child: Text(e.subtitle,
overflow: TextOverflow.clip,
style: TextStyle(
@ -113,7 +113,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
margin:
EdgeInsets.fromLTRB(0.0, 10.0, 10.0, 7.0),
child: Image.asset(e.icon,
width: 45.0, height: 45.0),
width: 40.0, height: 40.0),
),
],
),

@ -163,45 +163,45 @@ class _PaymentMethodState extends State<PaymentMethod> {
],
),
),
Container(
margin: EdgeInsets.only(top: 25.0),
child: Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
child: Container(
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("ApplePay");
},
child: Card(
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "ApplePay"
? BorderSide(
color: Colors.green, width: 5.0)
: BorderSide(
color: Colors.transparent, width: 0.0),
),
child: Container(
height: 120.0,
padding: EdgeInsets.all(20.0),
child: SvgPicture.asset(
"assets/images/new-design/applepay.svg"),
),
),
),
),
),
Expanded(
child: Container(),
),
],
),
),
// Container(
// margin: EdgeInsets.only(top: 25.0),
// child: Flex(
// direction: Axis.horizontal,
// children: <Widget>[
// Expanded(
// child: Container(
// child: InkWell(
// onTap: () {
// updateSelectedPaymentMethod("ApplePay");
// },
// child: Card(
// elevation: 3.0,
// margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
// color: Colors.white,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10),
// side: selectedPaymentMethod == "ApplePay"
// ? BorderSide(
// color: Colors.green, width: 5.0)
// : BorderSide(
// color: Colors.transparent, width: 0.0),
// ),
// child: Container(
// height: 120.0,
// padding: EdgeInsets.all(20.0),
// child: SvgPicture.asset(
// "assets/images/new-design/applepay.svg"),
// ),
// ),
// ),
// ),
// ),
// Expanded(
// child: Container(),
// ),
// ],
// ),
// ),
SizedBox(
height: 150.0,
),

@ -734,7 +734,7 @@ class _HomePageState extends State<HomePage> {
],
),
),
height: 100,
height: 106,
imageName: 'rectangle.png',
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,

@ -26,7 +26,7 @@ import 'package:flutter/services.dart';
import 'package:intl/intl.dart';
import 'package:local_auth/local_auth.dart';
import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
// import 'package:smart_progress_bar/smart_progress_bar.dart';
class ConfirmLogin extends StatefulWidget {
@override
@ -69,12 +69,11 @@ class _ConfirmLogin extends State<ConfirmLogin> {
int fingrePrintBefore;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
locator<AuthenticatedUserObject>();
AppointmentRateViewModel appointmentRateViewModel =
locator<AppointmentRateViewModel>();
locator<AppointmentRateViewModel>();
ProjectViewModel projectViewModel;
@override
void initState() {
_getAvailableBiometrics();
@ -367,25 +366,25 @@ class _ConfirmLogin extends State<ConfirmLogin> {
localizedReason: 'Scan your fingerprint to authenticate',
useErrorDialogs: true,
stickyAuth: true);
if (authenticated == true) {
if(user !=null && (user.logInType==2 || user.logInType ==3)){
this.checkActivationCode();
}else{
var request = this.getCommonRequest(type: type);
this.getMobileInfo(request);
}
if (authenticated == true) {
if (user != null && (user.logInType == 2 || user.logInType == 3)) {
this.checkActivationCode();
} else {
var request = this.getCommonRequest(type: type);
this.getMobileInfo(request);
}
}
}
}
getMobileInfo(request) {
GifLoaderDialogUtils.showMyDialog(context);
this
.authService
.getLoginInfo(request)
.then((result) => {
GifLoaderDialogUtils.hideDialog(context),
if (result['SMSLoginRequired'] == false)
{
this.loginTokenID = result.logInTokenID,
@ -422,9 +421,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
})
.catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
setUser() async {}
@ -460,7 +459,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
this.deviceToken = await sharedPref.getString(PUSH_TOKEN);
this.lastLogin = await sharedPref.getInt(LAST_LOGIN) != null
? await sharedPref.getInt(LAST_LOGIN)
: user !=null ? user.logInType : null;
: user != null
? user.logInType
: null;
//this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN);
}
@ -514,7 +515,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
.then((result) => {
if (result is Map)
{
result = CheckActivationCode.fromJson(result),
if (this.registerd_data != null &&
this.registerd_data.isRegister == true)
@ -570,7 +570,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
goToHome() {
authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true;
@ -756,7 +755,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
bool checkIfBiometricAvailable(BiometricType biometricType) {
bool isAvailable = false;
if(_availableBiometrics != null) {
if (_availableBiometrics != null) {
for (var i = 0; i < _availableBiometrics.length; i++) {
if (biometricType == _availableBiometrics[i]) isAvailable = true;
}

@ -46,7 +46,7 @@ class VitalSignItem extends StatelessWidget {
des,
style: TextStyle(
fontSize: 1.7 * SizeConfig.textMultiplier,
color: HexColor('#B8382C'),
color: Color(0xff40ACC9),
fontWeight: FontWeight.bold,
),
),
@ -78,9 +78,9 @@ class VitalSignItem extends StatelessWidget {
children: [
TextSpan(text: lastVal),
TextSpan(
text: unit,
text: " " + unit,
style: TextStyle(
color: HexColor('#B8382C'),
color: Color(0xff40ACC9),
),
),
]),

@ -1,23 +1,23 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/pharmacies_list_screen.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart';
import '../base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/pharmacy/drug_item.dart';
import 'package:diplomaticquarterapp/core/service/pharmacies_service.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/pharmacies_list_screen.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../base/base_view.dart';
class MedicineSearch extends StatelessWidget {
final textController = TextEditingController();
final _formKey = GlobalKey<FormState>();
@override
Widget build(BuildContext context) {
return BaseView<PharmacyViewModel>(
@ -51,11 +51,13 @@ class MedicineSearch extends StatelessWidget {
controller: textController,
validator: (value) {
if (value.isEmpty) {
return TranslationBase.of(context).pleaseEnterMedicineName;
}else if( value.length <4){
return TranslationBase.of(context).searchItemError;
}else
return null;
return TranslationBase.of(context)
.pleaseEnterMedicineName;
} else if (value.length < 4) {
return TranslationBase.of(context)
.searchItemError;
} else
return null;
},
),
),
@ -81,21 +83,24 @@ class MedicineSearch extends StatelessWidget {
],
),
),
if(model.pharmacy.isNotEmpty)
Container(
margin: EdgeInsets.only(
left: SizeConfig.heightMultiplier * 2),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
TranslationBase.of(context).youCanFind+
'${model.pharmacy == null ? '0' : model.pharmacy.length.toString()}'+
TranslationBase.of(context).itemInSearch,
),
],
if (model.pharmacy.isNotEmpty)
Container(
margin: EdgeInsets.only(
left: SizeConfig.heightMultiplier * 2),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
child: Texts(
TranslationBase.of(context).youCanFind +
'${model.pharmacy == null ? '0' : model.pharmacy.length.toString()}' +
TranslationBase.of(context).itemInSearch,
),
),
],
),
),
),
if (model.state == ViewState.ErrorLocal)
Container(
child: Texts(model.error),

@ -1,20 +1,19 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
import 'dart:convert';
import 'dart:typed_data';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/cupertino.dart';
import 'package:maps_launcher/maps_launcher.dart';
import '../base/base_view.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'dart:typed_data';
import 'dart:convert';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart';
import 'package:map_launcher/map_launcher.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:url_launcher/url_launcher.dart';
import '../base/base_view.dart';
class PharmaciesList extends StatelessWidget {
final int medicineID;
final String imageURL;
@ -30,6 +29,7 @@ class PharmaciesList extends StatelessWidget {
AppScaffold(
appBarTitle: TranslationBase.of(context).pharmaciesList,
baseViewModel: model,
isShowAppBar: true,
body: Container(
height: SizeConfig.screenHeight,
child: ListView(

@ -866,6 +866,7 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get report => localizedValues['report'][locale.languageCode];
String get openRad => localizedValues['open-rad'][locale.languageCode];
String get sendCopyRad => localizedValues['send-copy'][locale.languageCode];
String get appoSurvey => localizedValues['appoSurvey'][locale.languageCode];
}

@ -25,7 +25,7 @@ class MedicalProfileItem extends StatelessWidget {
showBorder: true,
borderWidth: 0,
margin: 4,
height: 120,
// height: 120,
// MediaQuery.of(context).size.height * 0.12,
child: Container(
//width: MediaQuery.of(context).size.width * 0.25,

@ -244,7 +244,7 @@ class _TextsState extends State<Texts> {
Theme.of(context).backgroundColor.withOpacity(0),
], begin: Alignment.bottomCenter, end: Alignment.topCenter),
),
height: 30.0,
height: 32.0,
),
)
],

@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
@ -40,7 +41,8 @@ class _AppDrawerState extends State<AppDrawer> {
var familyFileProvider = FamilyFilesProvider();
AuthenticatedUser user;
AuthenticatedUser mainUser;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
AuthenticatedUserObject authenticatedUserObject = locator<
AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>();
@ -48,7 +50,10 @@ class _AppDrawerState extends State<AppDrawer> {
Widget build(BuildContext context) {
projectProvider = Provider.of(context);
return SizedBox(
width: MediaQuery.of(context).size.width * 0.75,
width: MediaQuery
.of(context)
.size
.width * 0.75,
child: Container(
color: Colors.white,
child: Drawer(
@ -67,66 +72,67 @@ class _AppDrawerState extends State<AppDrawer> {
children: <Widget>[
Container(
child:
Image.asset('assets/images/DQ/DQ_logo.png'),
Image.asset('assets/images/DQ/DQ_logo.png'),
margin: EdgeInsets.all(
SizeConfig.imageSizeMultiplier * 4),
),
(user != null && projectProvider.isLogin)
? Padding(
padding: EdgeInsets.all(15),
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
padding: EdgeInsets.all(15),
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Row(
children: <Widget>[
Padding(
padding: EdgeInsets.only(
right: 5),
child: Icon(
Icons.account_circle,
color: Color(0xFF40ACC9),
)),
AppText(
user.firstName +
' ' +
user.lastName,
Padding(
padding: EdgeInsets.only(
right: 5),
child: Icon(
Icons.account_circle,
color: Color(0xFF40ACC9),
)
],
),
Row(children: <Widget>[
Padding(
padding: EdgeInsets.only(
left: 30, top: 5),
child: Column(
children: <Widget>[
AppText(
TranslationBase.of(
context)
.fileno +
": " +
user.patientID
.toString(),
color:
Color(0xFF40ACC9),
fontSize: SizeConfig
.textMultiplier *
1.5,
),
AppText(
user.bloodGroup != null
? 'Blood Group: ' +
user.bloodGroup
: '',
fontSize: SizeConfig
.textMultiplier *
1.5,
),
],
))
])
]))
)),
AppText(
user.firstName +
' ' +
user.lastName,
color: Color(0xFF40ACC9),
)
],
),
Row(children: <Widget>[
Padding(
padding: EdgeInsets.only(
left: 30, top: 5),
child: Column(
children: <Widget>[
AppText(
TranslationBase
.of(
context)
.fileno +
": " +
user.patientID
.toString(),
color:
Color(0xFF40ACC9),
fontSize: SizeConfig
.textMultiplier *
1.5,
),
AppText(
user.bloodGroup != null
? 'Blood Group: ' +
user.bloodGroup
: '',
fontSize: SizeConfig
.textMultiplier *
1.5,
),
],
))
])
]))
: SizedBox(),
],
),
@ -138,7 +144,9 @@ class _AppDrawerState extends State<AppDrawer> {
children: <Widget>[
InkWell(
child: DrawerItem(
TranslationBase.of(context).arabicChange,
TranslationBase
.of(context)
.arabicChange,
Icons.translate),
onTap: () {
// Navigator.of(context).pushNamed(
@ -153,192 +161,263 @@ class _AppDrawerState extends State<AppDrawer> {
),
(user != null && projectProvider.isLogin)
? Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
user.isFamily ==null || user.isFamily ==false ? InkWell(
child: DrawerItem(
TranslationBase.of(context).family,
Icons.group,
textColor: Color(0xFF40ACC9),
iconColor: Color(0xFF40ACC9),
bottomLine: false,
sideArrow: true,
),
onTap: () {
Navigator.of(context).pushNamed(
MY_FAMILIY,
);
},
) : SizedBox(),
FutureBuilder(
future: getFamilyFiles(), // async work
builder: (BuildContext context,
AsyncSnapshot<
GetAllSharedRecordsByStatusResponse>
snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(
padding: EdgeInsets.all(10),
child: Text('Loading....'));
default:
if (snapshot.hasError)
return Padding(
padding: EdgeInsets.all(10),
child: Text(snapshot.error));
else
return Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
// <--- left side
color: Colors.grey[200],
width: 1.0,
),
)),
child: Column(
children: [
user.isFamily == true
? Container(
padding:
EdgeInsets.only(
bottom: 5),
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
user.isFamily == null || user.isFamily == false
? InkWell(
child: DrawerItem(
TranslationBase
.of(context)
.family,
Icons.group,
textColor: Color(0xFF40ACC9),
iconColor: Color(0xFF40ACC9),
bottomLine: false,
sideArrow: true,
),
onTap: () {
Navigator.of(context).pushNamed(
MY_FAMILIY,
);
},
)
: SizedBox(),
FutureBuilder(
future: getFamilyFiles(), // async work
builder: (BuildContext context,
AsyncSnapshot<
GetAllSharedRecordsByStatusResponse>
snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(
padding: EdgeInsets.all(10),
child: Text('Loading....'));
default:
if (snapshot.hasError)
return Padding(
padding: EdgeInsets.all(10),
child: Text(snapshot.error));
else
return Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
// <--- left side
color: Colors.grey[200],
width: 1.0,
),
)),
child: Column(
children: [
user.isFamily == true
? Container(
padding:
EdgeInsets.only(
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(
onTap: () {
switchUser(
mainUser,
result,
context);
},
child: Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
CrossAxisAlignment
.start,
children: <
Widget>[
Expanded(
child: Icon(
Icons
.person),
child:
Icon(Icons
.person,
color: result
.responseID ==
user
.patientID
? Color(
0xFF40ACC9)
: Colors
.black),
),
Expanded(
flex: 7,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(mainUser.firstName + ' ' + mainUser.lastName),
AppText(TranslationBase.of(context).fileno + ": " + mainUser.patientID.toString()),
])),
child: Padding(
padding: EdgeInsets
.only(
left: 5,
right: 5),
child: Column(
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(),
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(
onTap: () {
switchUser(
result,
context);
},
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <
Widget>[
Expanded(
child:
Icon(Icons.person, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
),
Expanded(
flex: 7,
child: Padding(
padding:EdgeInsets.only(left:5, right:5),
child:Column(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();
}).toList())
],
));
}
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context)
.notification,
Icons.notifications),
onTap: () {
//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();
},
)
],
)
: SizedBox();
}).toList())
],
));
}
},
),
InkWell(
child: DrawerItem(
TranslationBase
.of(context)
.notification,
Icons.notifications),
onTap: () {
//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();
},
)
],
)
: InkWell(
child: DrawerItem(
TranslationBase.of(context).loginregister,
Icons.lock_open),
onTap: () {
login();
},
),
child: DrawerItem(
TranslationBase
.of(context)
.loginregister,
Icons.lock_open),
onTap: () {
login();
},
),
],
)
],
@ -357,7 +436,9 @@ class _AppDrawerState extends State<AppDrawer> {
children: [
Column(
children: <Widget>[
Text(TranslationBase.of(context).poweredBy),
Text(TranslationBase
.of(context)
.poweredBy),
Image.asset(
'assets/images/cs_logo_container.png',
width: SizeConfig.imageSizeMultiplier * 30,
@ -410,8 +491,8 @@ class _AppDrawerState extends State<AppDrawer> {
authenticatedUserObject.logout();
projectProvider.isLogin = false;
await authenticatedUserObject.getUser();
_vitalSignService.heightCm ="";
_vitalSignService.weightKg ="";
_vitalSignService.heightCm = "";
_vitalSignService.weightKg = "";
await sharedPref.clear();
this.user = null;
Navigator.of(context).pushNamed(HOME);
@ -442,18 +523,21 @@ class _AppDrawerState extends State<AppDrawer> {
}
switchUser(user, context) {
Utils.showProgressDialog(context);
GifLoaderDialogUtils.showMyDialog(context);
this
.familyFileProvider
.silentLoggin(user is AuthenticatedUser ? null : user,
mainUser: user is AuthenticatedUser)
.then((value) => loginAfter(value, context))
mainUser: user is AuthenticatedUser)
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
loginAfter(value, context);
})
.catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
Navigator.of(context).pop();
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
loginAfter(result, context) async {

@ -10,17 +10,17 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
class MyInAppBrowser extends InAppBrowser {
static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String PREAUTH_SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
static String PREAUTH_SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
static List<String> successURLS = [
'success',

@ -29,7 +29,7 @@ class _MedicineItemWidgetState extends State<MedicineItemWidget> {
@override
Widget build(BuildContext context) {
return new RoundedContainer(
height: SizeConfig.heightMultiplier * 12.9,
height: SizeConfig.heightMultiplier * 13.1,
child: Padding(
padding: const EdgeInsets.all(2.0),
child: Row(

Loading…
Cancel
Save