Fixes & code optimizations

merge-update-with-lab-changes
haroon amjad 4 years ago
parent 5692bc66a9
commit f029aaa1c6

@ -1611,4 +1611,5 @@ const Map localizedValues = {
"viewDocList": {"en": "View List of Doctors", "ar": "عرض قائمة الأطباء"}, "viewDocList": {"en": "View List of Doctors", "ar": "عرض قائمة الأطباء"},
"bodyFatTitle": {"en": "Body Fat", "ar": " الدهون في الجسم"}, "bodyFatTitle": {"en": "Body Fat", "ar": " الدهون في الجسم"},
"cholesTitle": {"en": "Blood Cholesterol", "ar": " الكولسترول في الدم"}, "cholesTitle": {"en": "Blood Cholesterol", "ar": " الكولسترول في الدم"},
"laserClinic": {"en": "Laser Clinic", "ar": "عيادة الليزر"},
}; };

@ -116,8 +116,8 @@ class BaseAppClient {
// body['IdentificationNo'] = 1009199553; // body['IdentificationNo'] = 1009199553;
// body['MobileNo'] = "966545156035"; // body['MobileNo'] = "966545156035";
// body['PatientID'] = 1018977; body['PatientID'] = 1018977;
// body['TokenID'] = "@dm!n"; body['TokenID'] = "@dm!n";
body.removeWhere((key, value) => key == null || value == null); body.removeWhere((key, value) => key == null || value == null);

@ -6,7 +6,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class H2OPageIndexPage extends StatelessWidget { class H2OPageIndexPage extends StatelessWidget {
@override @override
@ -23,7 +22,7 @@ class H2OPageIndexPage extends StatelessWidget {
"Water Tracker:", "Water Tracker:",
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 25, fontSize: 25,
color: HexColor("#60686b"), color: Color(0xFF60686b),
), ),
SizedBox( SizedBox(
height: 12, height: 12,

@ -3,8 +3,6 @@ import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_v
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_bar_chart.dart';
import 'package:diplomaticquarterapp/widgets/errors/app_embedded_error.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';

@ -11,8 +11,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:percent_indicator/circular_percent_indicator.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:wave/config.dart'; import 'package:wave/config.dart';
import 'package:wave/wave.dart'; import 'package:wave/wave.dart';

@ -2,8 +2,6 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart';
import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart';
//import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
@ -20,10 +18,10 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/show_zoom_image_dialog.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON }
@ -89,6 +87,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
backgroundColor: Color(0xffF7F7F7), backgroundColor: Color(0xffF7F7F7),
showNewAppBarTitle: true, showNewAppBarTitle: true,
baseViewModel: model, baseViewModel: model,
isShowDecPage: true,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
description: TranslationBase.of(context).bloodDonationInfo, description: TranslationBase.of(context).bloodDonationInfo,
appBarTitle: TranslationBase.of(context).bloodD, appBarTitle: TranslationBase.of(context).bloodD,
@ -106,31 +105,32 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64),
), ),
SizedBox(height: 12), SizedBox(height: 12),
CommonDropDownView( if (projectProvider.isLogin && model.state != ViewState.Busy)
TranslationBase.of(context).city, CommonDropDownView(
model.bloodModelList.isNotEmpty TranslationBase.of(context).city,
? model.bloodModelList[0].city (model.bloodModelList.isNotEmpty && model.CitiesModelList.isNotEmpty)
: projectProvider.isArabic ? model.bloodModelList[0].city
? model.CitiesModelList[_selectedHospitalIndex].descriptionN : projectProvider.isArabic
: model.CitiesModelList[_selectedHospitalIndex].description, () { ? model.CitiesModelList[_selectedHospitalIndex].descriptionN
List<RadioSelectionDialogModel> list = [ : model.CitiesModelList[_selectedHospitalIndex].description, () {
for (int i = 0; i < model.CitiesModelList.length; i++) List<RadioSelectionDialogModel> list = [
RadioSelectionDialogModel(projectProvider.isArabic ? model.CitiesModelList[i].descriptionN : model.CitiesModelList[i].description, i), for (int i = 0; i < model.CitiesModelList.length; i++)
]; RadioSelectionDialogModel(projectProvider.isArabic ? model.CitiesModelList[i].descriptionN : model.CitiesModelList[i].description, i),
];
showDialog( showDialog(
context: context, context: context,
child: RadioSelectionDialog( child: RadioSelectionDialog(
listData: list, listData: list,
selectedIndex: _selectedHospitalIndex, selectedIndex: _selectedHospitalIndex,
isScrollable: true, isScrollable: true,
onValueSelected: (index) { onValueSelected: (index) {
_selectedHospitalIndex = index; _selectedHospitalIndex = index;
_selectedHospital = model.CitiesModelList[index]; _selectedHospital = model.CitiesModelList[index];
}, },
), ),
); );
}).withBorderedContainer, }).withBorderedContainer,
SizedBox(height: 12), SizedBox(height: 12),
CommonDropDownView(TranslationBase.of(context).gender, _selectedGenderIndex == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female, () { CommonDropDownView(TranslationBase.of(context).gender, _selectedGenderIndex == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female, () {
List<RadioSelectionDialogModel> list = [ List<RadioSelectionDialogModel> list = [
@ -226,19 +226,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
width: 350, width: 350,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
showDialog( showZoomImageDialog(context, 'assets/images/BloodChrt_EN.png', isNetworkImage: false);
context: context,
builder: (_) => AssetGiffyDialog(
title: Text(
"",
style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600),
),
image: Image.asset('assets/images/BloodChrt_EN.png'),
buttonCancelText: Text(TranslationBase.of(context).cancel),
buttonCancelColor: Colors.grey,
onlyCancelButton: true,
),
);
}, },
child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png'), color: Colors.white), child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png'), color: Colors.white),
), ),

File diff suppressed because one or more lines are too long

@ -539,8 +539,8 @@ class _SearchByClinicState extends State<SearchByClinic> {
navigateToDentalComplaints(context, searchInfo); navigateToDentalComplaints(context, searchInfo);
} else if (dropdownValue.split("-")[0] == "253") { } else if (dropdownValue.split("-")[0] == "253") {
// navigateToLaserClinic(context); navigateToLaserClinic(context);
callDoctorsSearchAPI(); // callDoctorsSearchAPI();
} else if (dropdownValue.split("-")[1] == "true" } else if (dropdownValue.split("-")[1] == "true"
// && authProvider.isLogin && // && authProvider.isLogin &&
// authUser.patientType == 1 // authUser.patientType == 1

@ -1,10 +1,7 @@
import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/hospital_location.dart'; import 'package:diplomaticquarterapp/widgets/hospital_location.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class HospitalsPage extends StatefulWidget { class HospitalsPage extends StatefulWidget {

@ -10,7 +10,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../uitl/translations_delegate_base.dart'; import '../../uitl/translations_delegate_base.dart';
import 'widgets/card_position.dart';
class NearestEr extends StatefulWidget { class NearestEr extends StatefulWidget {
static const String _url = "assets/images/"; static const String _url = "assets/images/";

@ -1,61 +0,0 @@
import 'package:flutter/material.dart';
class CardCommonEr extends StatelessWidget {
final image;
final text;
final subText;
final bool locked;
final Function onTap;
const CardCommonEr({
this.locked = false,
@required this.image,
@required this.text,
@required this.subText,
@required this.onTap,
});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: locked ? null : onTap,
child: Opacity(
opacity: locked ? 0.25 : 1.0,
child: Stack(
children: [
Container(
width: double.infinity,
padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Image.asset(this.image, width: 42.0, height: 42.0),
Text(
text + "${subText.isEmpty ? "" : "\n$subText"}",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16),
),
],
),
),
if (locked) Align(alignment: Alignment.center, child: lock())
],
),
),
);
}
Widget lock() {
return Container(
child: Icon(Icons.lock_rounded, size: 80),
);
}
}

@ -1,106 +0,0 @@
//import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:url_launcher/url_launcher.dart';
class CardPosition extends StatelessWidget {
final image;
final text;
final subText;
final type;
final telephone;
final networkImage;
final latitude;
final longitude;
final projectname;
final cardSize;
final String waitingTime;
const CardPosition({
@required this.image,
@required this.text,
@required this.subText,
@required this.type,
@required this.telephone,
@required this.networkImage,
@required this.latitude,
@required this.longitude,
@required this.projectname,
@required this.cardSize,
@required this.waitingTime,
});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () {
navigateToSearch(context, this.type, this.telephone, this.networkImage, this.latitude, this.longitude, this.projectname);
},
child: Container(
// width:MediaQuery.of(context).size.width * 0.47,//165,
margin: EdgeInsets.fromLTRB(8.0, 8.0, 8.0, 8.0),
decoration: BoxDecoration(boxShadow: [BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)], borderRadius: BorderRadius.circular(10), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
height: cardSize * 0.2 - 8,
margin: EdgeInsets.fromLTRB(8.0, 8.0, 8.0, 0.0),
child: Text(this.text, overflow: TextOverflow.clip, style: TextStyle(color: Colors.black, letterSpacing: 1.0, fontSize: 2 * SizeConfig.textMultiplier)),
),
Container(
height: cardSize * 0.5 - 8,
alignment: Alignment.center,
margin: EdgeInsets.fromLTRB(0.0, 0.0, 8.0, 8.0),
child: Image.asset(this.image, width: 60.0, height: cardSize * 0.4),
),
Container(
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
height: cardSize * 0.2 - 8,
child: Text(this.subText, overflow: TextOverflow.clip, style: TextStyle(color: Color(0xFFc5272d), letterSpacing: 1.0, fontSize: 15.0)),
),
],
),
),
);
}
Future navigateToSearch(context, type, telephone, networkImage, latitude, longitude, projectname) async {
var localize = TranslationBase.of(context);
showDialog(
context: context,
builder: (_) => AssetGiffyDialog(
entryAnimation: EntryAnimation.BOTTOM,
image: Image.network(
networkImage,
fit: BoxFit.cover,
),
title: Text(
projectname,
style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600),
),
description: Text(
"${localize.averageWaitingTime}\n\n$waitingTime ${localize.minute}",
textAlign: TextAlign.center,
),
buttonOkText: Text(
"LOCATION",
style: TextStyle(color: Colors.white),
),
buttonOkColor: Colors.grey,
buttonCancelText: Text(
'CAll',
style: TextStyle(color: Colors.white),
),
buttonCancelColor: Colors.grey,
onOkButtonPressed: () {
MapsLauncher.launchCoordinates(double.parse(latitude), double.parse(longitude), projectname);
},
onCancelButtonPressed: () {
launch("tel://" + telephone);
}));
}
}

@ -408,6 +408,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
prescriptions.actualDoctorRate = widget.appo.actualDoctorRate; prescriptions.actualDoctorRate = widget.appo.actualDoctorRate;
prescriptions.noOfPatientsRate = widget.appo.noOfPatientsRate; prescriptions.noOfPatientsRate = widget.appo.noOfPatientsRate;
prescriptions.isInOutPatient = widget.appo.isInOutPatient; prescriptions.isInOutPatient = widget.appo.isInOutPatient;
prescriptions.doctorID = widget.appo.doctorID;
navigateToMedicinePrescriptionReport(prescriptions); navigateToMedicinePrescriptionReport(prescriptions);
} }

@ -23,7 +23,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'landing_page_pharmcy.dart'; import 'landing_page_pharmcy.dart';
@ -196,7 +195,7 @@ class _HomePageState extends State<HomePage> {
width: double.infinity, width: double.infinity,
height: 125, height: 125,
decoration: BoxDecoration( decoration: BoxDecoration(
color: HexColor('#A59E9E'), color: Color(0xFFA59E9E),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all(color: Colors.transparent, width: 0.5), border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)), borderRadius: BorderRadius.all(Radius.circular(9)),
@ -231,7 +230,7 @@ class _HomePageState extends State<HomePage> {
width: 90, width: 90,
height: 30, height: 30,
decoration: BoxDecoration( decoration: BoxDecoration(
color: HexColor('#D81A2E'), color: Color(0xFFD81A2E),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all(color: Colors.transparent, width: 0.5), border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(0)), borderRadius: BorderRadius.all(Radius.circular(0)),
@ -255,7 +254,7 @@ class _HomePageState extends State<HomePage> {
width: double.infinity, width: double.infinity,
height: projectViewModel.isArabic ? 160 : 130, height: projectViewModel.isArabic ? 160 : 130,
decoration: BoxDecoration( decoration: BoxDecoration(
color: HexColor('#A59E9E'), color: Color(0xFFA59E9E),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all(color: Colors.transparent, width: 0.5), border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)), borderRadius: BorderRadius.all(Radius.circular(9)),
@ -341,7 +340,7 @@ class _HomePageState extends State<HomePage> {
width: 90, width: 90,
height: 30, height: 30,
decoration: BoxDecoration( decoration: BoxDecoration(
color: HexColor('#D81A2E'), color: Color(0xFFD81A2E),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all(color: Colors.transparent, width: 0.5), border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
@ -593,7 +592,7 @@ class _HomePageState extends State<HomePage> {
)), )),
), ),
height: MediaQuery.of(context).size.width * 0.4, height: MediaQuery.of(context).size.width * 0.4,
color: HexColor("#747C80"), color: Color(0xFF747C80),
imageName: 'emergency_service_image.png', imageName: 'emergency_service_image.png',
), ),
], ],
@ -826,7 +825,6 @@ class _HomePageState extends State<HomePage> {
} else { } else {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { await pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
await pharmacyModuleViewModel.verifyCustomer().then((value) { await pharmacyModuleViewModel.verifyCustomer().then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Navigator.push(context, FadePage(page: LandingPagePharmacy())); Navigator.push(context, FadePage(page: LandingPagePharmacy()));
@ -868,7 +866,7 @@ class DashboardItem extends StatelessWidget {
color: !hasBorder color: !hasBorder
? color != null ? color != null
? color ? color
: HexColor('#050705').withOpacity(opacity) : Color(0xFF050705).withOpacity(opacity)
: Colors.white, : Colors.white,
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
border: hasBorder ? Border.all(width: 1.0, color: const Color(0xffcccccc)) : Border.all(width: 0.0, color: Colors.transparent), border: hasBorder ? Border.all(width: 1.0, color: const Color(0xffcccccc)) : Border.all(width: 0.0, color: Colors.transparent),

@ -243,14 +243,14 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_firebaseMessaging.setAutoInitEnabled(true); _firebaseMessaging.setAutoInitEnabled(true);
// signalRUtil = new SignalRUtil(hubName: "http://192.168.8.101:5001/chatHub", context: context); // signalRUtil = new SignalRUtil(hubName: "http://192.168.8.101:5001/chatHub", context: context);
// signalRUtil = new SignalRUtil(hubName: "https://api.cssynapses.com/chatsocket", context: context); signalRUtil = new SignalRUtil(hubName: "https://VCallApi.hmg.com/WebRTCHub?source=mobile&username=2001273", context: context);
locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context); locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectViewModel.isLogin && !projectViewModel.isLoginChild) { if (projectViewModel.isLogin && !projectViewModel.isLoginChild) {
familyFileProvider.getSharedRecordByStatus(); familyFileProvider.getSharedRecordByStatus();
} }
// signalRUtil.startSignalRConnection(); signalRUtil.startSignalRConnection();
}); });
// HMG (Guest/Internet) Wifi Access [Zohaib Kambrani] // HMG (Guest/Internet) Wifi Access [Zohaib Kambrani]
//for now commented to reduce this call will enable it when needed //for now commented to reduce this call will enable it when needed

@ -19,11 +19,12 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:intl/intl.dart' as intl;
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
import 'package:intl/intl.dart' as intl;
class Register extends StatefulWidget { class Register extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
const Register({Key key, this.changePageViewIndex}) : super(key: key); const Register({Key key, this.changePageViewIndex}) : super(key: key);
@override @override
@ -326,15 +327,14 @@ class _Register extends State<Register> {
var nRequest = request.toJson(); var nRequest = request.toJson();
nRequest['LogInTokenID'] = response['LogInTokenID']; nRequest['LogInTokenID'] = response['LogInTokenID'];
if (response['hasFile'] == true) { if (response['hasFile'] == true) {
// AppToast.showErrorToast(message: response['ErrorEndUserMessage']); ConfirmDialog dialog = new ConfirmDialog(
AlertDialogBox(
context: context, context: context,
confirmMessage: response['ErrorEndUserMessage'], confirmMessage: response['ErrorEndUserMessage'],
okText: TranslationBase.of(context).ok, okText: TranslationBase.of(context).confirm,
okFunction: () { cancelText: TranslationBase.of(context).cancel_nocaps,
AlertDialogBox.closeAlertDialog(context); okFunction: () => {Navigator.of(context).pop()},
Navigator.of(context).pop(); cancelFunction: () => {});
}).showAlertDialog(context); dialog.showAlertDialog(context);
} else { } else {
nRequest['forRegister'] = true; nRequest['forRegister'] = true;
nRequest['isRegister'] = true; nRequest['isRegister'] = true;

@ -62,107 +62,135 @@ class PrescriptionItemsPage extends StatelessWidget {
prescriptions.noOfPatientsRate, prescriptions.noOfPatientsRate,
model.user.emailAddress, model.user.emailAddress,
), ),
isNeedToShowButton: projectViewModel.havePrivilege(13), isNeedToShowButton: (model.prescriptionReportListINP.length > 0 || model.prescriptionReportEnhList.length > 0) ? projectViewModel.havePrivilege(13) : false,
showConfirmMessageDialog: false, showConfirmMessageDialog: false,
onTap: () { onTap: () {
showConfirmMessage(context, model); showConfirmMessage(context, model);
}, },
), ),
if (!prescriptions.isInOutPatient) if (!prescriptions.isInOutPatient)
ListView.separated( model.prescriptionReportListINP.length > 0
itemBuilder: (context, index) { ? ListView.separated(
return InkWell( itemBuilder: (context, index) {
onTap: () { return InkWell(
Navigator.push( onTap: () {
context, Navigator.push(
FadePage( context,
page: PrescriptionDetailsPageINP( FadePage(
prescriptionReport: model.prescriptionReportListINP[index], page: PrescriptionDetailsPageINP(
), prescriptionReport: model.prescriptionReportListINP[index],
), ),
); ),
}, );
child: Container( },
width: double.infinity, child: Container(
child: Container( width: double.infinity,
margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4), child: Container(
decoration: cardRadius(12), margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4),
child: Padding( decoration: cardRadius(12),
padding: EdgeInsets.only(top: 12, bottom: 20, left: projectViewModel.isArabic ? 12 : 20, right: projectViewModel.isArabic ? 20 : 12), child: Padding(
child: Row( padding: EdgeInsets.only(top: 12, bottom: 20, left: projectViewModel.isArabic ? 12 : 20, right: projectViewModel.isArabic ? 20 : 12),
children: [ child: Row(
Flexible( children: [
child: Column( Flexible(
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Text(
model.prescriptionReportListINP[index].itemDescription.isNotEmpty
? model.prescriptionReportListINP[index].itemDescription
: model.prescriptionReportListINP[index].itemDescriptionN ?? '',
style: TextStyle(
fontSize: 16,
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
),
mHeight(10),
Row(
children: [ children: [
InkWell( Text(
child: Stack( model.prescriptionReportListINP[index].itemDescription.isNotEmpty
alignment: Alignment.center, ? model.prescriptionReportListINP[index].itemDescription
children: [ : model.prescriptionReportListINP[index].itemDescriptionN ?? '',
Container( style: TextStyle(
child: Image.network( fontSize: 16,
model.prescriptionReportListINP[index].imageSRCUrl, letterSpacing: -0.64,
fit: BoxFit.cover, fontWeight: FontWeight.w600,
width: 60,
height: 60,
),
margin: EdgeInsets.zero,
clipBehavior: Clip.antiAlias,
decoration: cardRadius(2000),
),
Container(
child: Icon(Icons.search,size: 18,color: Colors.white,),
padding: EdgeInsets.all(6),
decoration: containerRadius(Colors.black.withOpacity(0.3), 200),
)
],
), ),
onTap: (){
showZoomImageDialog(context, model.prescriptionReportListINP[index].imageSRCUrl,);
},
), ),
mWidth(12), mHeight(10),
Column( Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( InkWell(
children: [ child: Stack(
Text( alignment: Alignment.center,
TranslationBase.of(context).route + ": ", children: [
style: TextStyle( Container(
color: Colors.grey, child: Image.network(
fontSize: 10, model.prescriptionReportListINP[index].imageSRCUrl,
letterSpacing: -0.4, fit: BoxFit.cover,
fontWeight: FontWeight.w600, width: 60,
height: 60,
),
margin: EdgeInsets.zero,
clipBehavior: Clip.antiAlias,
decoration: cardRadius(2000),
), ),
), Container(
Text( child: Icon(
model.prescriptionReportListINP[index].route, Icons.search,
style: TextStyle( size: 18,
fontSize: 12, color: Colors.white,
letterSpacing: -0.48, ),
fontWeight: FontWeight.w600, padding: EdgeInsets.all(6),
), decoration: containerRadius(Colors.black.withOpacity(0.3), 200),
), )
], ],
),
onTap: () {
showZoomImageDialog(
context,
model.prescriptionReportListINP[index].imageSRCUrl,
);
},
), ),
Row( mWidth(12),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row(
children: [
Text(
TranslationBase.of(context).route + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
Text(
model.prescriptionReportListINP[index].route,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
),
Row(
children: [
Text(
TranslationBase.of(context).dailyDoses + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
Text(
model.prescriptionReportListINP[index].doseDailyQuantity.toString(),
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
),
mHeight(12),
Text( Text(
TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportListINP[index].remarks,
style: TextStyle( style: TextStyle(
color: Colors.grey, color: Colors.grey,
fontSize: 10, fontSize: 10,
@ -170,184 +198,180 @@ class PrescriptionItemsPage extends StatelessWidget {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
Text(
model.prescriptionReportListINP[index].doseDailyQuantity.toString(),
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
], ],
), )
mHeight(12),
Text(
model.prescriptionReportListINP[index].remarks,
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
], ],
) ),
], ],
), ),
], ),
), Icon(
), Icons.arrow_forward,
Icon( size: 16,
Icons.arrow_forward, ),
size: 16, ],
), ),
], ),
),
),
),
),
);
},
separatorBuilder: (context, index) {
return mHeight(8);
},
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: model.prescriptionReportListINP.length)
else
ListView.separated(
padding: EdgeInsets.all(21),
itemBuilder: (context, index) {
return InkWell(
onTap: () {
PrescriptionReport prescriptionReport = PrescriptionReport(
imageSRCUrl: model.prescriptionReportEnhList[index].imageSRCUrl,
itemDescription: model.prescriptionReportEnhList[index].itemDescription,
itemDescriptionN: model.prescriptionReportEnhList[index].itemDescription,
routeN: model.prescriptionReportEnhList[index].route,
frequency: model.prescriptionReportEnhList[index].frequency,
frequencyN: model.prescriptionReportEnhList[index].frequency,
doseDailyQuantity: model.prescriptionReportEnhList[index].doseDailyQuantity,
days: model.prescriptionReportEnhList[index].days,
itemID: model.prescriptionReportEnhList[index].itemID,
remarks: model.prescriptionReportEnhList[index].remarks);
Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPage(
prescriptionReport: prescriptionReport,
prescriptions: prescriptions,
), ),
), ),
); );
}, },
child: Container( separatorBuilder: (context, index) {
decoration: BoxDecoration( return mHeight(8);
color: Colors.white, },
borderRadius: BorderRadius.all( physics: NeverScrollableScrollPhysics(),
Radius.circular(10.0), shrinkWrap: true,
), itemCount: model.prescriptionReportListINP.length)
boxShadow: [ : Padding(
BoxShadow( padding: const EdgeInsets.only(top: 150.0),
color: Color(0xff000000).withOpacity(.05), child: getNoDataWidget(context),
blurRadius: 27, )
offset: Offset(0, -3), else
model.prescriptionReportEnhList.length > 0
? ListView.separated(
padding: EdgeInsets.all(21),
itemBuilder: (context, index) {
return InkWell(
onTap: () {
PrescriptionReport prescriptionReport = PrescriptionReport(
imageSRCUrl: model.prescriptionReportEnhList[index].imageSRCUrl,
itemDescription: model.prescriptionReportEnhList[index].itemDescription,
itemDescriptionN: model.prescriptionReportEnhList[index].itemDescription,
routeN: model.prescriptionReportEnhList[index].route,
frequency: model.prescriptionReportEnhList[index].frequency,
frequencyN: model.prescriptionReportEnhList[index].frequency,
doseDailyQuantity: model.prescriptionReportEnhList[index].doseDailyQuantity,
days: model.prescriptionReportEnhList[index].days,
itemID: model.prescriptionReportEnhList[index].itemID,
remarks: model.prescriptionReportEnhList[index].remarks);
Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPage(
prescriptionReport: prescriptionReport,
prescriptions: prescriptions,
),
),
);
},
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
blurRadius: 27,
offset: Offset(0, -3),
),
],
), ),
], child: Padding(
), padding: EdgeInsets.only(top: 12, bottom: 20, left: projectViewModel.isArabic ? 12 : 20, right: projectViewModel.isArabic ? 20 : 12),
child: Padding( child: Row(
padding: EdgeInsets.only(top: 12, bottom: 20, left: projectViewModel.isArabic ? 12 : 20, right: projectViewModel.isArabic ? 20 : 12), children: [
child: Row( Flexible(
children: [ child: Column(
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
(model.prescriptionReportEnhList[index].itemDescription.isNotEmpty
? model.prescriptionReportEnhList[index].itemDescription
: model.prescriptionReportEnhList[index].itemDescriptionN ?? '')
.toLowerCase()
.capitalizeFirstofEach,
style: TextStyle(
fontSize: 16,
color: Color(0xff2E303A),
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
),
mHeight(10),
Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
InkWell( Text(
child: Stack( (model.prescriptionReportEnhList[index].itemDescription.isNotEmpty
alignment: Alignment.center, ? model.prescriptionReportEnhList[index].itemDescription
children: [ : model.prescriptionReportEnhList[index].itemDescriptionN ?? '')
Container( .toLowerCase()
child: Image.network( .capitalizeFirstofEach,
model.prescriptionReportEnhList[index].imageSRCUrl, style: TextStyle(
fit: BoxFit.cover, fontSize: 16,
width: 60, color: Color(0xff2E303A),
height: 60, letterSpacing: -0.64,
), fontWeight: FontWeight.w600,
margin: EdgeInsets.zero,
clipBehavior: Clip.antiAlias,
decoration: cardRadius(2000),
),
Container(
child: Icon(Icons.search,size: 18,color: Colors.white,),
padding: EdgeInsets.all(6),
decoration: containerRadius(Colors.black.withOpacity(0.3), 200),
)
],
), ),
onTap: (){
showZoomImageDialog(context, model.prescriptionReportEnhList[index].imageSRCUrl,);
},
), ),
mWidth(12), mHeight(10),
Expanded( Row(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ InkWell(
MyRichText(TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].route, projectViewModel.isArabic), child: Stack(
MyRichText(TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportEnhList[index].doseDailyQuantity.toString(), alignment: Alignment.center,
projectViewModel.isArabic), children: [
mHeight(9), Container(
Text( child: Image.network(
model.prescriptionReportEnhList[index].remarks, model.prescriptionReportEnhList[index].imageSRCUrl,
style: TextStyle( fit: BoxFit.cover,
color: Color(0xff575757), width: 60,
fontSize: 12, height: 60,
letterSpacing: -0.4, ),
fontWeight: FontWeight.w600, margin: EdgeInsets.zero,
), clipBehavior: Clip.antiAlias,
decoration: cardRadius(2000),
),
Container(
child: Icon(
Icons.search,
size: 18,
color: Colors.white,
),
padding: EdgeInsets.all(6),
decoration: containerRadius(Colors.black.withOpacity(0.3), 200),
)
],
), ),
], onTap: () {
), showZoomImageDialog(
) context,
model.prescriptionReportEnhList[index].imageSRCUrl,
);
},
),
mWidth(12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MyRichText(TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].route, projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportEnhList[index].doseDailyQuantity.toString(),
projectViewModel.isArabic),
mHeight(9),
Text(
model.prescriptionReportEnhList[index].remarks,
style: TextStyle(
color: Color(0xff575757),
fontSize: 12,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
],
),
)
],
),
], ],
), ),
], ),
), Icon(
), Icons.arrow_forward,
Icon( size: 16,
Icons.arrow_forward, ),
size: 16, ],
), ),
], ),
), ),
), );
), },
); separatorBuilder: (context, index) {
}, return mHeight(12);
separatorBuilder: (context, index) { },
return mHeight(12); shrinkWrap: true,
}, physics: NeverScrollableScrollPhysics(),
shrinkWrap: true, itemCount: model.prescriptionReportEnhList.length)
physics: NeverScrollableScrollPhysics(), : Padding(
itemCount: model.prescriptionReportEnhList.length), padding: const EdgeInsets.only(top: 150.0),
child: getNoDataWidget(context),
),
], ],
), ),
), ),

@ -7,7 +7,6 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../../../locator.dart'; import '../../../../../locator.dart';
import '../../../../../routes.dart'; import '../../../../../routes.dart';
@ -45,7 +44,7 @@ class _FooterWidgetState extends State<FooterWidget> {
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(0.0), Radius.circular(0.0),
), ),
border: Border.all(color: HexColor('#707070'), width: 0), border: Border.all(color: Color(0xFF707070), width: 0),
), ),
width: double.infinity, width: double.infinity,
height: quantityUI, height: quantityUI,

@ -5,7 +5,7 @@ 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:flutter_xlider/flutter_xlider.dart'; // import 'package:flutter_xlider/flutter_xlider.dart';
class SelectGender extends StatefulWidget { class SelectGender extends StatefulWidget {
@override @override
@ -82,18 +82,18 @@ class _SelectGender extends State<SelectGender> {
SizedBox( SizedBox(
height: 30, height: 30,
), ),
FlutterSlider( // FlutterSlider(
values: [slider], // values: [slider],
max: 90, // max: 90,
min: 14, // min: 14,
onDragCompleted: (handlerIndex, lowerValue, upperValue) { // onDragCompleted: (handlerIndex, lowerValue, upperValue) {
print(lowerValue); // print(lowerValue);
print(upperValue); // print(upperValue);
setState(() { // setState(() {
slider = upperValue; // slider = upperValue;
}); // });
}, // },
), // ),
], ],
), ),
Expanded( Expanded(

@ -2,7 +2,6 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/Constants.dart'; import 'package:diplomaticquarterapp/Constants.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
/// ---- Default Theme ---- /// ---- Default Theme ----
/// ///
@ -40,7 +39,7 @@ defaultTheme({fontName}) {
buttonColor: Colors.black, buttonColor: Colors.black,
toggleableActiveColor: secondaryColor, toggleableActiveColor: secondaryColor,
indicatorColor: secondaryColor, indicatorColor: secondaryColor,
bottomSheetTheme: BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)),
cursorColor: Colors.grey, cursorColor: Colors.grey,
primaryTextTheme: TextTheme(bodyText2: TextStyle(color: Colors.white)), primaryTextTheme: TextTheme(bodyText2: TextStyle(color: Colors.white)),
iconTheme: IconThemeData(), iconTheme: IconThemeData(),
@ -92,7 +91,7 @@ invertThemes({fontName}) {
buttonColor: Colors.black, buttonColor: Colors.black,
toggleableActiveColor: secondaryColor, toggleableActiveColor: secondaryColor,
indicatorColor: secondaryColor, indicatorColor: secondaryColor,
bottomSheetTheme: BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)),
cursorColor: Colors.black, cursorColor: Colors.black,
iconTheme: IconThemeData(), iconTheme: IconThemeData(),
appBarTheme: AppBarTheme( appBarTheme: AppBarTheme(
@ -147,7 +146,7 @@ bwThemes({fontName}) {
primaryColor: Color(0xfffffff4), primaryColor: Color(0xfffffff4),
toggleableActiveColor: secondaryColor, toggleableActiveColor: secondaryColor,
indicatorColor: secondaryColor, indicatorColor: secondaryColor,
bottomSheetTheme: BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)),
cursorColor: Colors.black, cursorColor: Colors.black,
iconTheme: IconThemeData(), iconTheme: IconThemeData(),
appBarTheme: AppBarTheme( appBarTheme: AppBarTheme(

@ -2580,6 +2580,8 @@ class TranslationBase {
String get cholesTitle => localizedValues["cholesTitle"][locale.languageCode]; String get cholesTitle => localizedValues["cholesTitle"][locale.languageCode];
String get laserClinic => localizedValues["laserClinic"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -5,7 +5,6 @@ import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -97,8 +96,8 @@ class _BottomNavBarState extends State<BottomNavBar> {
// ), // ),
if (/*widget.index == 0 && */ projectViewModel.havePrivilege(34)) if (/*widget.index == 0 && */ projectViewModel.havePrivilege(34))
BottomNavigationItem( BottomNavigationItem(
icon: EvaIcons.calendar, icon: Icons.calendar_today_sharp,
activeIcon: EvaIcons.calendar, activeIcon: Icons.calendar_today_sharp,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: widget.index, index: widget.index,
currentIndex: 4, currentIndex: 4,

@ -3,7 +3,7 @@ import 'dart:io';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:feather_icons_flutter/feather_icons_flutter.dart'; // import 'package:feather_icons_flutter/feather_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
@ -20,10 +20,10 @@ class ImageOptions {
), ),
_BottomSheetItem( _BottomSheetItem(
title: TranslationBase.of(context).gallery, title: TranslationBase.of(context).gallery,
icon: FeatherIcons.image, icon: Icons.image,
onTap: () async { onTap: () async {
File _image = File _image =
await ImagePicker.pickImage(source: ImageSource.gallery, imageQuality: 50); await ImagePicker.pickImage(source: ImageSource.gallery, imageQuality: 20);
String fileName = _image.path; String fileName = _image.path;
final bytes = File(fileName).readAsBytesSync(); final bytes = File(fileName).readAsBytesSync();
String base64Encode = base64.encode(bytes); String base64Encode = base64.encode(bytes);
@ -34,10 +34,10 @@ class ImageOptions {
), ),
_BottomSheetItem( _BottomSheetItem(
title: TranslationBase.of(context).camera, title: TranslationBase.of(context).camera,
icon: FeatherIcons.camera, icon: Icons.camera_alt,
onTap: () async { onTap: () async {
File _image = File _image =
await ImagePicker.pickImage(source: ImageSource.camera, imageQuality: 50); await ImagePicker.pickImage(source: ImageSource.camera, imageQuality: 20);
String fileName = _image.path; String fileName = _image.path;
final bytes = File(fileName).readAsBytesSync(); final bytes = File(fileName).readAsBytesSync();
String base64Encode = base64.encode(bytes); String base64Encode = base64.encode(bytes);

@ -1,53 +0,0 @@
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:flutter/material.dart';
class AppBarChart extends StatelessWidget {
const AppBarChart({
Key key,
@required this.isArabic,
@required this.seriesList,
}) : super(key: key);
final List<charts.Series> seriesList;
final bool isArabic;
@override
Widget build(BuildContext context) {
return Container(
height: 400,
//margin: EdgeInsets.only(top: 60),
child: charts.BarChart(
seriesList,
// animate: animate,
domainAxis: charts.OrdinalAxisSpec(
renderSpec: charts.GridlineRendererSpec(
labelAnchor: isArabic ? charts.TickLabelAnchor.before : charts.TickLabelAnchor.after,
labelRotation: -30,
labelOffsetFromAxisPx: 30,
labelOffsetFromTickPx: 15,
labelJustification: charts.TickLabelJustification.inside,
),
),
/// Customize the primary measure axis using a small tick renderer.
/// Use String instead of num for ordinal domain axis
/// (typically bar charts).
primaryMeasureAxis: new charts.NumericAxisSpec(
renderSpec: new charts.GridlineRendererSpec(
// Display the measure axis labels below the gridline.
//
// 'Before' & 'after' follow the axis value direction.
// Vertical axes draw 'before' below & 'after' above the tick.
// Horizontal axes draw 'before' left & 'after' right the tick.
labelAnchor: charts.TickLabelAnchor.before,
// Left justify the text in the axis.
//
// Note: outside means that the secondary measure axis would right
// justify.
labelJustification: charts.TickLabelJustification.outside,
)),
),
);
}
}

@ -1,44 +0,0 @@
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:flutter/material.dart';
/// chart line
/// [seriesList] charts series
/// [chartTitle] the charts title
/// [animate] enable and disable animate on create chart
/// [includeArea] chart include Area
/// [stacked] stacked chart over the design
class AppLineChart extends StatelessWidget {
final List<charts.Series> seriesList;
final String chartTitle;
final bool animate;
final bool includeArea;
final bool stacked;
AppLineChart(
{Key key,
@required this.seriesList,
this.chartTitle,
this.animate = true,
this.includeArea = false,
this.stacked = true});
@override
Widget build(BuildContext context) {
return Container(
child: Column(
children: <Widget>[
Text(
chartTitle,
style: TextStyle(fontSize: 24.0, fontWeight: FontWeight.bold),
),
Expanded(
child: charts.LineChart(seriesList,
defaultRenderer: charts.LineRendererConfig(
includeArea: false, stacked: true),
animate: animate),
),
],
),
);
}
}

@ -1,4 +1,3 @@
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// Custom Item widget /// Custom Item widget
@ -32,7 +31,7 @@ class CustomItem extends StatelessWidget {
this.disabled: false, this.disabled: false,
this.onTap, this.onTap,
this.startIconColor, this.startIconColor,
this.endIcon = EvaIcons.chevronRight, this.endIcon = Icons.chevron_right_sharp,
this.padding, this.padding,
this.child, this.child,
this.endIconColor, this.endIconColor,

@ -1,7 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'dart:math' as math; import 'dart:math' as math;
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/gestures.dart' show DragStartBehavior; import 'package:flutter/gestures.dart' show DragStartBehavior;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
@ -862,7 +861,7 @@ class _MonthPickerState extends State<MonthPicker>
disabledColor: disabledColor:
Theme.of(context).disabledColor.withOpacity(0.2), Theme.of(context).disabledColor.withOpacity(0.2),
color: Theme.of(context).disabledColor, color: Theme.of(context).disabledColor,
icon: const Icon(EvaIcons.chevronLeft), icon: const Icon(Icons.chevron_left_sharp),
tooltip: _isDisplayingFirstMonth tooltip: _isDisplayingFirstMonth
? null ? null
: '${localizations.previousMonthTooltip} ${localizations.formatMonthYear(_previousMonthDate)}', : '${localizations.previousMonthTooltip} ${localizations.formatMonthYear(_previousMonthDate)}',
@ -886,7 +885,7 @@ class _MonthPickerState extends State<MonthPicker>
disabledColor: disabledColor:
Theme.of(context).disabledColor.withOpacity(0.2), Theme.of(context).disabledColor.withOpacity(0.2),
color: Theme.of(context).disabledColor, color: Theme.of(context).disabledColor,
icon: const Icon(EvaIcons.chevronRight), icon: const Icon(Icons.chevron_right_sharp),
tooltip: _isDisplayingLastMonth tooltip: _isDisplayingLastMonth
? null ? null
: '${localizations.nextMonthTooltip} ${localizations.formatMonthYear(_nextMonthDate)}', : '${localizations.nextMonthTooltip} ${localizations.formatMonthYear(_nextMonthDate)}',

@ -1,4 +1,3 @@
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -156,7 +155,7 @@ class _TextFieldsState extends State<TextFields> {
); );
}, },
child: Icon( child: Icon(
EvaIcons.eye, Icons.remove_red_eye_sharp,
size: 24.0, size: 24.0,
color: Color.fromRGBO(78, 62, 253, 1.0), color: Color.fromRGBO(78, 62, 253, 1.0),
), ),
@ -167,7 +166,7 @@ class _TextFieldsState extends State<TextFields> {
view = true; view = true;
}); });
}, },
child: Icon(EvaIcons.eyeOff, child: Icon(Icons.remove_red_eye_sharp,
size: 24.0, color: Colors.grey[500]), size: 24.0, color: Colors.grey[500]),
), ),
); );

@ -10,7 +10,6 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/loadings/ShimmerLoading.dart'; import 'package:diplomaticquarterapp/widgets/loadings/ShimmerLoading.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class OffersAndPackagesWidget extends StatefulWidget { class OffersAndPackagesWidget extends StatefulWidget {
final List<OfferPackagesItemModel> models; final List<OfferPackagesItemModel> models;
@ -168,7 +167,7 @@ class _OfferPackagesItemWidgetState extends State<OfferPackagesItemWidget> {
alignment: Alignment.bottomLeft, alignment: Alignment.bottomLeft,
child: MaterialButton( child: MaterialButton(
height: 30, height: 30,
color: HexColor('#D81A2E'), color: Color(0xFFD81A2E),
onPressed: () => widget.model.action.onClick(model.item), onPressed: () => widget.model.action.onClick(model.item),
child: Texts( child: Texts(
TranslationBase.of(context).view, TranslationBase.of(context).view,

@ -1,5 +1,4 @@
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class StarRating extends StatelessWidget { class StarRating extends StatelessWidget {
@ -23,7 +22,7 @@ class StarRating extends StatelessWidget {
Padding( Padding(
padding: EdgeInsets.only(right: 1.0), padding: EdgeInsets.only(right: 1.0),
child: Icon( child: Icon(
(index+1) <= (totalAverage ?? 0) ? EvaIcons.star : EvaIcons.starOutline, (index+1) <= (totalAverage ?? 0) ? Icons.star : Icons.star_border_outlined,
size: size, size: size,
color: (index+1) <= (totalAverage ?? 0) ? Color.fromRGBO(255, 186, 0, 1.0) : Theme.of(context).hintColor color: (index+1) <= (totalAverage ?? 0) ? Color.fromRGBO(255, 186, 0, 1.0) : Theme.of(context).hintColor
), ),

@ -1,4 +1,3 @@
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class CloseBack extends StatelessWidget{ class CloseBack extends StatelessWidget{
@ -16,7 +15,7 @@ class CloseBack extends StatelessWidget{
onTap: Feedback.wrapForTap(() { onTap: Feedback.wrapForTap(() {
onTap!=null ? onTap() : Navigator.pop(context); onTap!=null ? onTap() : Navigator.pop(context);
}, context), }, context),
child: Icon(EvaIcons.close, color: Colors.white), child: Icon(Icons.close, color: Colors.white),
); );
} }
} }

@ -1,7 +1,5 @@
import 'package:diplomaticquarterapp/d_q_icons_icons.dart'; import 'package:diplomaticquarterapp/d_q_icons_icons.dart';
import 'package:diplomaticquarterapp/pages/landing/home_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'bottom_nav_pharmacy_home_item.dart'; import 'bottom_nav_pharmacy_home_item.dart';
@ -10,8 +8,8 @@ import 'bottom_nav_pharmacy_item.dart';
class BottomNavPharmacyBar extends StatefulWidget { class BottomNavPharmacyBar extends StatefulWidget {
final ValueChanged<int> changeIndex; final ValueChanged<int> changeIndex;
final int index; final int index;
BottomNavPharmacyBar({Key key, this.changeIndex, this.index})
: super(key: key); BottomNavPharmacyBar({Key key, this.changeIndex, this.index}) : super(key: key);
@override @override
_BottomNavPharmacyBarState createState() => _BottomNavPharmacyBarState(); _BottomNavPharmacyBarState createState() => _BottomNavPharmacyBarState();
@ -35,8 +33,8 @@ class _BottomNavPharmacyBarState extends State<BottomNavPharmacyBar> {
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
BottomNavHomeItem( BottomNavHomeItem(
icon: EvaIcons.image, icon: Icons.image,
activeIcon: EvaIcons.image, activeIcon: Icons.image,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: widget.index, index: widget.index,
currentIndex: 0, currentIndex: 0,
@ -50,14 +48,7 @@ class _BottomNavPharmacyBarState extends State<BottomNavPharmacyBar> {
currentIndex: 1, currentIndex: 1,
title: TranslationBase.of(context).categorise, title: TranslationBase.of(context).categorise,
), ),
BottomNavPharmacyItem( BottomNavPharmacyItem(icon: Icons.home, activeIcon: Icons.home, changeIndex: _changeIndex, index: widget.index, currentIndex: 0, isHome: true, title: TranslationBase.of(context).home),
icon: EvaIcons.home,
activeIcon: EvaIcons.home,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 0,
isHome: true,
title: TranslationBase.of(context).home),
BottomNavPharmacyItem( BottomNavPharmacyItem(
icon: DQIcons.user_menu_icon, icon: DQIcons.user_menu_icon,
activeIcon: DQIcons.user_menu_icon, activeIcon: DQIcons.user_menu_icon,
@ -67,12 +58,7 @@ class _BottomNavPharmacyBarState extends State<BottomNavPharmacyBar> {
title: TranslationBase.of(context).myAccount, title: TranslationBase.of(context).myAccount,
), ),
BottomNavPharmacyItem( BottomNavPharmacyItem(
icon: DQIcons.cart_menu_icon, icon: DQIcons.cart_menu_icon, activeIcon: DQIcons.cart_menu_icon, changeIndex: _changeIndex, index: widget.index, currentIndex: 3, title: TranslationBase.of(context).cart)
activeIcon: DQIcons.cart_menu_icon,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 3,
title: TranslationBase.of(context).cart)
], ],
), ),
), ),

@ -1,24 +1,24 @@
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:progress_hud_v2/generated/i18n.dart';
showZoomImageDialog(BuildContext context, String url) { showZoomImageDialog(BuildContext context, String url, {bool isNetworkImage = true}) {
showDialog( showDialog(
context: context, context: context,
builder: (BuildContext context) => Dialog( builder: (BuildContext context) => Dialog(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
), //this right here ), //this right here
child: ShowZoomImage(url), child: ShowZoomImage(url, isNetworkImage),
), ),
); );
} }
class ShowZoomImage extends StatelessWidget { class ShowZoomImage extends StatelessWidget {
String url; String url;
bool isNetworkImage = true;
ShowZoomImage(this.url); ShowZoomImage(this.url, this.isNetworkImage);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -35,11 +35,17 @@ class ShowZoomImage extends StatelessWidget {
Navigator.pop(context); Navigator.pop(context);
}, },
), ),
CachedNetworkImage( isNetworkImage
imageUrl: url, ? CachedNetworkImage(
height: MediaQuery.of(context).size.width / 1.4, imageUrl: url,
width: double.infinity, height: MediaQuery.of(context).size.width / 1.4,
), width: double.infinity,
)
: Image.asset(
url,
height: MediaQuery.of(context).size.width / 1.4,
width: double.infinity,
),
mHeight(12), mHeight(12),
], ],
), ),

@ -11,7 +11,6 @@ dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
# Localizations # Localizations
flutter_localizations: flutter_localizations:
sdk: flutter sdk: flutter
@ -39,8 +38,6 @@ dependencies:
# Permissions # Permissions
permission_handler: ^5.0.0+hotfix.3 permission_handler: ^5.0.0+hotfix.3
device_info: ^0.4.2+4 device_info: ^0.4.2+4
#popub
giffy_dialog: ^1.8.0
# Flutter Html View # Flutter Html View
flutter_html: 1.0.2 flutter_html: 1.0.2
@ -56,45 +53,38 @@ dependencies:
firebase_messaging: ^7.0.3 firebase_messaging: ^7.0.3
firebase_analytics: ^6.3.0 firebase_analytics: ^6.3.0
cloud_firestore: ^0.14.3 cloud_firestore: ^0.14.3
android_intent: ^0.3.7+7
# Progress bar # Progress bar
progress_hud_v2: ^2.0.0 progress_hud_v2: ^2.0.0
percent_indicator: ^2.1.5 percent_indicator: ^2.1.5
# Icons # Icons
feather_icons_flutter: any
eva_icons_flutter: any
font_awesome_flutter: any font_awesome_flutter: any
cupertino_icons: ^0.1.3 cupertino_icons: ^0.1.3
# Image Attachments # Image Attachments
image_picker: ^0.6.7+1 image_picker: ^0.6.7+1
image_cropper: ^1.2.1
#GIF image #GIF image
flutter_gifimage: ^1.0.1 flutter_gifimage: ^1.0.1
photo_view: any photo_view: any
# flutter_webrtc: any # flutter_webrtc: any
# UI Reqs # UI Reqs
dotted_border: 1.0.5
expandable: ^4.1.4 expandable: ^4.1.4
hexcolor: ^1.0.1
# Notification Banner # Notification Banner
dropdown_banner: ^1.4.0 # dropdown_banner: ^1.4.0
flutter_xlider: ^3.4.0 # flutter_xlider: ^3.4.0
# flutter_local_notifications: # flutter_local_notifications:
# charts # charts
charts_flutter: ^0.9.0 charts_flutter: ^0.9.0
google_maps_flutter: ^1.0.3 google_maps_flutter: ^1.0.3
huawei_map: ^5.0.3+303 huawei_map: ^5.0.3+303
# Qr code Scanner TODO fix it # Qr code Scanner TODO fix it
# barcode_scanner: ^1.0.1 # barcode_scanner: ^1.0.1
flutter_polyline_points: ^0.1.0 flutter_polyline_points: ^0.1.0
location: ^2.3.5 location: ^2.3.5
# Qr code Scanner # Qr code Scanner
@ -104,16 +94,11 @@ dependencies:
rating_bar: ^0.2.0 rating_bar: ^0.2.0
# Calendar # Calendar
# table_calendar: ^2.3.0
syncfusion_flutter_calendar: ^18.4.49 syncfusion_flutter_calendar: ^18.4.49
# syncfusion_flutter_charts: any
# SVG Images # SVG Images
flutter_svg: ^0.18.0 flutter_svg: ^0.18.0
# Location Helper
map_launcher: ^0.8.1
#Calendar Events #Calendar Events
manage_calendar_events: ^1.0.2 manage_calendar_events: ^1.0.2
@ -129,15 +114,6 @@ dependencies:
#hijri #hijri
hijri: ^2.0.3 hijri: ^2.0.3
#Email Sender
flutter_email_sender: ^3.0.1
#Popup_window
popup_box: ^0.1.0
#Numbers
number_inc_dec: ^0.6.6
#datetime_picker #datetime_picker
flutter_datetime_picker: ^1.4.0 flutter_datetime_picker: ^1.4.0
# Carousel # Carousel
@ -161,18 +137,16 @@ dependencies:
flutter_webrtc: ^0.5.9 flutter_webrtc: ^0.5.9
screen: ^0.0.5 screen: ^0.0.5
#google maps places #google maps places
google_maps_place_picker: ^1.0.0 google_maps_place_picker: ^1.0.0
typewriter: ^0.0.3
#countdown timer for Upcoming List
# flutter_countdown_timer: ^1.4.0
#countdown timer for Upcoming List #countdown timer for Upcoming List
flutter_countdown_timer: ^1.6.0 flutter_countdown_timer: ^1.6.0
#Dependencies for video call implementation #Dependencies for video call implementation
native_device_orientation: ^0.3.0 native_device_orientation: ^0.3.0
enum_to_string: ^1.0.9 enum_to_string: ^1.0.9
# recase: ^3.0.0
wakelock: ^0.1.4 wakelock: ^0.1.4
after_layout: ^1.0.7 after_layout: ^1.0.7
twilio_programmable_video: ^0.6.2 twilio_programmable_video: ^0.6.2
@ -194,7 +168,7 @@ dependencies:
in_app_review: ^1.0.4 in_app_review: ^1.0.4
badges: ^1.1.4 badges: ^1.1.4
# open_settings: ^2.0.1
# Dep by Zohaib # Dep by Zohaib
shimmer: ^1.1.2 shimmer: ^1.1.2
carousel_slider: ^2.3.1 carousel_slider: ^2.3.1

Loading…
Cancel
Save