UI updates & fixes

merge-requests/400/head
haroon amjad 4 years ago
parent 728c22cc68
commit a075d53dd5

@ -375,6 +375,7 @@ const Map localizedValues = {
"VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"},
"MonthlyReports": {"en": "Monthly Reports", "ar": "تقارير شهرية"},
"km": {"en": "KMs:", "ar": "كم"},
"km_": {"en": "KM", "ar": "كم"},
"PatientHealthSummaryReport": {"en": "Patient Health Summary Report", "ar": " ملخص التقارير الشهرية"},
"ToViewTheTermsAndConditions": {"en": "To View The Terms And Conditions Report", "ar": " عرض الشروط والأحكام "},
"ClickHere": {"en": "Click here", "ar": "أنقر هنا"},
@ -1503,5 +1504,6 @@ const Map localizedValues = {
"seeDoctorsList": {"en": "See List Of Doctors", "ar": "اعرض قائمة الأطباء"},
"covidQuestionnaire": { "en": "Please answer below questionnaire:", "ar": "الرجاء الإجابة على الاستبيان أدناه:" },
"covidBookAppo": { "en": "Booking Appointment For: ", "ar": "موعد الحجز لـ: " },
"emptySchedule": { "en": "Doctor has no schedule.", "ar": "لا يوجد جدول حضور مسجل للطبيب" }
"emptySchedule": { "en": "Doctor has no schedule.", "ar": "لا يوجد جدول حضور مسجل للطبيب" },
"serviceNotAvailable": { "en": "Dear, this service is not available now, please try again later", "ar": "عزيزي المراجع, هذه الخدمة غير متوفرة الان يرجى المحاوله لاحقا"}
};

@ -13,7 +13,7 @@ class ActivePrescriptionReport {
// List<int> image;
// String imageExtension;
// dynamic imageSRCUrl;
// String imageString;
String imageString;
// dynamic imageThumbUrl;
dynamic isCovered;
String itemDescription;
@ -48,7 +48,7 @@ class ActivePrescriptionReport {
// this.image,
// this.imageExtension,
// this.imageSRCUrl,
// this.imageString,
this.imageString,
// this.imageThumbUrl,
this.isCovered,
this.itemDescription,
@ -83,7 +83,7 @@ class ActivePrescriptionReport {
// image = json['Image'].cast<int>();
// imageExtension = json['ImageExtension'];
// imageSRCUrl = json['ImageSRCUrl'];
// imageString = json['ImageString'];
imageString = json['ImageString'];
// imageThumbUrl = json['ImageThumbUrl'];
isCovered = json['IsCovered'];
itemDescription = json['ItemDescription'];
@ -120,7 +120,7 @@ class ActivePrescriptionReport {
// data['Image'] = this.image;
// data['ImageExtension'] = this.imageExtension;
// data['ImageSRCUrl'] = this.imageSRCUrl;
// data['ImageString'] = this.imageString;
data['ImageString'] = this.imageString;
// data['ImageThumbUrl'] = this.imageThumbUrl;
data['IsCovered'] = this.isCovered;
data['ItemDescription'] = this.itemDescription;

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart';
import '../base_service.dart';
@ -14,6 +15,11 @@ class FindusService extends BaseService {
Future getAllFindUsOrders() async {
hasError = false;
var lat = await sharedPref.getDouble(USER_LAT);
var long = await sharedPref.getDouble(USER_LONG);
body['Latitude'] = lat ?? 0;
body['Longitude'] = long ?? 0;
await baseAppClient.post(GET_FINDUS_REQUEST,
onSuccess: (dynamic response, int statusCode) {
FindusModelList.clear();

@ -117,6 +117,7 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
bottomSheet: Container(
width: MediaQuery.of(context).size.width,
height: 70.0,
color: Theme.of(context).scaffoldBackgroundColor,
margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0),
child: Button(
onTap: () async {
@ -134,8 +135,6 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
),
),
);
// widget.changePageViewIndex(1);
}
},
label: TranslationBase.of(context).next,
@ -144,39 +143,6 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
loading: widget.model.state == ViewState.BusyLocal,
),
),
// Container(
// height: MediaQuery.of(context).size.height * 0.10,
// width: double.infinity,
// child: Column(
// children: <Widget>[
// Container(
// width: MediaQuery.of(context).size.width * 0.9,
// child: SecondaryButton(
// label: TranslationBase.of(context).next,
// disabled: this.widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length == 0 || widget.model.state == ViewState.BusyLocal,
// color: Colors.grey[800],
// loading: widget.model.state == ViewState.BusyLocal,
// onTap: () async {
// await widget.model.getCustomerInfo();
// if (widget.model.state == ViewState.ErrorLocal) {
// Utils.showErrorToast();
// } else {
// Navigator.push(
// context,
// FadePage(
// page: NewHomeHealthCareStepTowPage(),
// ),
// );
// // widget.changePageViewIndex(1);
// }
// },
// textColor: Theme.of(context).backgroundColor),
// ),
// ],
// ),
// ),
);
}

@ -1,9 +1,13 @@
import 'package:diplomaticquarterapp/pages/ContactUs/widgets/card_common_contat.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import '../../uitl/translations_delegate_base.dart';
import 'LiveChat/livechat_page.dart';
import 'findus/findus_page.dart';
class ContactUsPage extends StatefulWidget {
@override
@ -23,39 +27,82 @@ class _ContactUsPageState extends State<ContactUsPage> {
@override
Widget build(BuildContext context) {
List<Widget> myMedicalList = myOptionsList(context);
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).hMGServiceLabel,
appBarTitle: TranslationBase.of(context).contactUs,
isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF8F8F8),
body: GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.all(21),
shrinkWrap: true,
body: Column(
children: [
CardCommonContact(
image: 'assets/images/new-design/find_us_icon.png',
text: TranslationBase.of(context).findUs,
subText: "",
type: 0,
),
CardCommonContact(
image: 'assets/images/new-design/feedback_icon.png',
text: TranslationBase.of(context).feedback,
subText: "",
type: 1,
Container(
width: double.infinity,
height: 30,
),
CardCommonContact(
image: 'assets/images/new-design/live_chat_icon.png',
text: TranslationBase.of(context).liveChat,
subText: "",
type: 2,
Padding(
padding: EdgeInsets.only(left: 12, right: 12),
child: GridView.builder(
shrinkWrap: true,
primary: false,
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero,
itemCount: myMedicalList.length,
itemBuilder: (BuildContext context, int index) {
return myMedicalList[index];
},
),
),
],
),
);
}
List<Widget> myOptionsList(BuildContext context) {
List<Widget> medical = List();
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: FindUsPage()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).findUs,
imagePath: 'assets/images/new-design/find_us_icon.png',
subTitle: null,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: FeedbackHomePage()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).feedback,
imagePath: 'assets/images/new-design/feedback_icon.png',
subTitle: null,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: LiveChatPage()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).liveChat,
imagePath: 'assets/images/new-design/live_chat_icon.png',
subTitle: null,
isPngImage: true,
),
));
return medical;
}
}

@ -37,7 +37,7 @@ class _FindUsPageState extends State<FindUsPage> with SingleTickerProviderStateM
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: 'Locations',
appBarTitle: TranslationBase.of(context).location,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF8F8F8),

@ -82,7 +82,7 @@ class _HospitalsPageState extends State<HospitalsPage> {
child: Padding(
padding: EdgeInsets.only(left: 12, right: 12),
child: Text(
_location.locationName?.trim() ?? "",
_location.locationName?.trim().toString() + "\n" + _location.distanceInKilometers.toString() + " " + TranslationBase.of(context).km_ ?? "",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,

@ -10,6 +10,7 @@ class PharmaciesPage extends StatefulWidget {
final List<GetHMGLocationsModel> findusPharmaciesModelList;
PharmaciesPage({Key key, this.findusPharmaciesModelList});
@override
_PharmaciesPageState createState() => _PharmaciesPageState();
}
@ -102,7 +103,7 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
height: 4,
),
Text(
_location.cityName?.trim() ?? "",
_location.cityName?.trim().toString() + "\n" + _location.distanceInKilometers.toString() + " " + TranslationBase.of(context).km_ ?? "",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,

@ -1,8 +1,7 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
@ -37,7 +36,7 @@ class _ErOptionsState extends State<ErOptions> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context);
final rrtLocked = !projectViewModel.havePrivilege(68);
final rrtLocked = projectViewModel.havePrivilege(68);
return AppScaffold(
isShowAppBar: widget.isAppbar,
@ -47,129 +46,58 @@ class _ErOptionsState extends State<ErOptions> {
showNewAppBarTitle: true,
backgroundColor: Color(0xffF8F8F8),
body: GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.all(21),
shrinkWrap: true,
children: [
CardCommonEr(
image: 'assets/images/new-design/AM.PNG',
text: TranslationBase.of(context).ambulancerequest,
subText: TranslationBase.of(context).requestA,
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: AmbulanceReq()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).ambulancerequest,
imagePath: 'assets/images/new-design/AM.PNG',
subTitle: TranslationBase.of(context).requestA,
isPngImage: true,
),
),
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: NearestEr()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).nearester,
imagePath: 'assets/images/new-design/emergency_icon.png',
subTitle: TranslationBase.of(context).locationa,
isPngImage: true,
),
),
CardCommonEr(
image: 'assets/images/new-design/emergency_icon.png',
text: TranslationBase.of(context).nearester,
subText: TranslationBase.of(context).locationa,
onTap: () {
Navigator.push(context, FadePage(page: NearestEr()));
}),
CardCommonEr(
image: 'assets/images/new-design/AM.PNG',
text: 'ED service',
subText: 'ED service',
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: DdServicesPage()));
},
child: MedicalProfileItem(
title: "ED",
imagePath: 'assets/images/new-design/AM.PNG',
subTitle: TranslationBase.of(context).service,
isPngImage: true,
),
),
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: RRTMainScreen()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).rrtService,
imagePath: 'assets/images/new-design/AM.PNG',
subTitle: TranslationBase.of(context).service,
isPngImage: true,
isEnable: rrtLocked,
),
),
CardCommonEr(
locked: rrtLocked,
image: 'assets/images/new-design/AM.PNG',
text: TranslationBase.of(context).rrtService,
subText: TranslationBase.of(context).rapidResponseTeam,
onTap: () {
Navigator.push(context, FadePage(page: RRTMainScreen()));
}),
],
),
//
// body: Container(
// margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
//
// Container(
// height: 170,
// margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
// child: Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment: MainAxisAlignment.start,
// children: <Widget>[
// Expanded(
// child: CardCommonEr(
// image: 'assets/images/new-design/AM.PNG',
// text: TranslationBase.of(context).ambulancerequest,
// subText: TranslationBase.of(context).requestA,
// onTap: (){
// Navigator.push(
// context,
// FadePage(
// page: AmbulanceReq()));
// },
//
// ),
// ),
// Expanded(
// child: CardCommonEr(
// image: 'assets/images/new-design/emergency_icon.png',
// text: TranslationBase.of(context).nearester,
// subText: TranslationBase.of(context).locationa,
// onTap:(){
// Navigator.push(
// context,
// FadePage(
// page: NearestEr()));
// }),
//
// )
// ],
// ),
// ),
// Container(
// margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
// height: 170,
// child: Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment: MainAxisAlignment.start,
// children: <Widget>[
// Expanded(
// child: CardCommonEr(
// image: 'assets/images/new-design/AM.PNG',
// text:'ED service',
// subText: 'ED service',
// onTap: (){
// Navigator.push(
// context,
// FadePage(page: DdServicesPage())
// );
// },
//
// ),
// ),
// Expanded(
// child: CardCommonEr(
// locked: rrtLocked,
// image: 'assets/images/new-design/AM.PNG',
// text: TranslationBase.of(context).rrtService,
// subText: TranslationBase.of(context).rapidResponseTeam,
// onTap:(){
// Navigator.push(
// context,
// FadePage(
// page: RRTMainScreen()));
// }),
// )
// ],
// ),
// ),
// ],
// ),
// ),
);
}
}

@ -93,7 +93,7 @@ class _NearestErState extends State<NearestEr> {
GifLoaderDialogUtils.showMyDialog(context);
ErService service = new ErService();
service.getProjectAvgERWaitingTimeOrders().then((response) {
if (response['MessageStatus'] == 1) {
if (response != null && response['MessageStatus'] == 1) {
setState(() {
projectAvgERWaitingTimeModelList.clear();
response['List_ProjectAvgERWaitingTime'].forEach((vital) {
@ -103,12 +103,14 @@ class _NearestErState extends State<NearestEr> {
});
GifLoaderDialogUtils.hideDialog(context);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: TranslationBase.of(context).serviceNotAvailable);
isDataLoaded = false;
}
}).catchError((err) {
print(err);
AppToast.showErrorToast(message: err);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err.toString());
});
}
}

@ -541,7 +541,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
page: VitalSignDetailsScreen(
appointmentNo: appoNo,
projectID: projectID,
isNotOneAppointment: true,
isNotOneAppointment: false,
)));
}

@ -54,7 +54,7 @@ class ActiveMedicationsPage extends StatelessWidget {
Container(
child: Card(
child: Image.memory(
Utils.dataFromBase64String(model.activePrescriptionReport[index].productImageBase64),
Utils.dataFromBase64String(model.activePrescriptionReport[index].imageString),
fit: BoxFit.cover,
height: SizeConfig.imageSizeMultiplier * 19,
width: SizeConfig.imageSizeMultiplier * 18,

@ -155,7 +155,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
NewTextFields(
hintText: TranslationBase.of(context).fileNumber,
controller: _fileTextController,
readOnly: true,
readOnly: beneficiaryType == BeneficiaryType.OtherAccount ? false : true,
),
if (beneficiaryType == BeneficiaryType.OtherAccount)
SizedBox(

@ -87,7 +87,7 @@ class _SelectBeneficiaryDialogState extends State<SelectBeneficiaryDialog> {
leading: Radio(
value: BeneficiaryType.MyFamilyFiles,
groupValue: beneficiaryType,
activeColor: Color(0xFF40ACC9),
activeColor: Color(0xffC5272D),
onChanged: (BeneficiaryType value) {
setState(() {
beneficiaryType = value;
@ -124,7 +124,7 @@ class _SelectBeneficiaryDialogState extends State<SelectBeneficiaryDialog> {
leading: Radio(
value: BeneficiaryType.OtherAccount,
groupValue: beneficiaryType,
activeColor: Color(0xFF40ACC9),
activeColor: Color(0xffC5272D),
onChanged: (BeneficiaryType value) {
setState(() {
beneficiaryType = value;
@ -158,7 +158,7 @@ class _SelectBeneficiaryDialogState extends State<SelectBeneficiaryDialog> {
fontSize: 14,
fontWeight: FontWeight.w600,
letterSpacing: -0.46,
color: Colors.red,
color: Color(0xffC5272D),
),
),
),

@ -123,7 +123,7 @@ class MyBalancePage extends StatelessWidget {
),
bottomSheet: Container(
// height: MediaQuery.of(context).size.height * 0.12,
height: 70.0,
height: 85.0,
color: Colors.white,
width: double.infinity,
padding: EdgeInsets.all(12),

@ -63,7 +63,7 @@ class _MyInvoicesState extends State<MyInvoices> {
return DoctorCard(
onTap: () => openInvoiceDetailsPage(getDentalAppointmentsResponse.listDentalAppointments[index]),
isInOutPatient: true,
name: TranslationBase.of(context).dr + " " + getDentalAppointmentsResponse.listDentalAppointments[index].doctorName,
name: TranslationBase.of(context).dr.toString() + " " + (projectViewModel.isArabic ? getDentalAppointmentsResponse.listDentalAppointments[index].doctorNameN.toString() : getDentalAppointmentsResponse.listDentalAppointments[index].doctorName.toString()),
billNo: getDentalAppointmentsResponse.listDentalAppointments[index].invoiceNo.toString(),
profileUrl: getDentalAppointmentsResponse.listDentalAppointments[index].doctorImageURL,
subName: getDentalAppointmentsResponse.listDentalAppointments[index].projectName,

@ -1,14 +1,14 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/Weight/WeightHomePage.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/widgets/card_common_contat.dart';
import 'Weight/WeightHomePage.dart';
import 'blood_pressure/BloodPressureHomePage.dart';
import 'blood_suger/blood_sugar_home_page.dart';
class MyTrackers extends StatelessWidget {
@override
@ -26,125 +26,51 @@ class MyTrackers extends StatelessWidget {
body: SingleChildScrollView(
child: Container(
child: GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.all(21),
shrinkWrap: true,
children: [
CardCommonContact(
image: 'assets/tracker/blood-suger.png',
text: TranslationBase.of(context).bloodSugar,
subText: "",
type: 3,
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: BloodSugarHomePage()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).bloodSugar,
imagePath: 'assets/tracker/blood-suger.png',
subTitle: null,
isPngImage: true,
width: 45.0,
height: 45.0,
),
),
CardCommonContact(
image: 'assets/tracker/blood-pressure.png',
text: TranslationBase.of(context).bloodPressure,
subText: "",
type: 4,
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: BloodPressureHomePage()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).bloodPressure,
imagePath: 'assets/tracker/blood-pressure.png',
subTitle: null,
isPngImage: true,
width: 45.0,
height: 45.0,
),
),
CardCommonContact(
image: 'assets/tracker/weight.png',
text: TranslationBase.of(context).weight,
subText: "",
type: 5,
)
])
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Expanded(
// child: InkWell(
// onTap: () => Navigator.push(context, FadePage(page: BloodSugarHomePage())),
// child: Container(
// margin: EdgeInsets.all(5),
// width: MediaQuery.of(context).size.width * 0.35,
// height: MediaQuery.of(context).size.width * 0.35,
// decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Image.asset(
// 'assets/tracker/blood-suger.png',
// width: 60.0,
// ),
// SizedBox(
// height: 15,
// ),
// Texts(TranslationBase.of(context).bloodSugar),
// ],
// ),
// ),
// ),
// ),
// Expanded(
// child: InkWell(
// onTap: () => Navigator.push(context, FadePage(page: BloodPressureHomePage())),
// child: Container(
// margin: EdgeInsets.all(5),
// width: MediaQuery.of(context).size.width * 0.35,
// height: MediaQuery.of(context).size.width * 0.35,
// decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Image.asset(
// 'assets/tracker/blood-pressure.png',
// width: 60.0,
// ),
// SizedBox(
// height: 15,
// ),
// Texts(TranslationBase.of(context).bloodPressure),
// ],
// ),
// ),
// ),
// ),
// ],
// ),
// Row(
// //mainAxisAlignment: MainAxisAlignment.spaceAround,
// children: [
// Expanded(
// child: InkWell(
// onTap: () => Navigator.push(context, FadePage(page: WeightHomePage())),
// child: Container(
// margin: EdgeInsets.all(5),
// width: MediaQuery.of(context).size.width * 0.35,
// height: MediaQuery.of(context).size.width * 0.35,
// decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Image.asset(
// 'assets/tracker/weight.png',
// width: 60.0,
// ),
// SizedBox(
// height: 15,
// ),
// Texts(TranslationBase.of(context).weight),
// ],
// ),
// ),
// ),
// ),
// Expanded(
// child: Container(),
// ),
// ],
// ),
// ],
// ),
),
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: WeightHomePage()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).weight,
imagePath: 'assets/tracker/weight.png',
subTitle: null,
isPngImage: true,
width: 45.0,
height: 45.0,
),
),
])),
),
);
}

@ -1,9 +1,11 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/widgets/card_common_contat.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
@ -36,7 +38,7 @@ class PaymentService extends StatelessWidget {
shrinkWrap: true,
primary: false,
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero,
itemCount: paymentServiceList.length,
itemBuilder: (BuildContext context, int index) {
@ -55,44 +57,52 @@ class PaymentService extends StatelessWidget {
List<Widget> medical = List();
medical.add(
CardCommonContact(
image: 'assets/images/online_payment_icon.png',
text: TranslationBase.of(context).payment,
subText: TranslationBase.of(context).paymentOnline,
type: 6,
width: double.infinity,
height: 55.0,
projectViewModel: projectViewModel,
model: model,
InkWell(
onTap: () {
navigateToToDoPage(context);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).payment,
imagePath: 'assets/images/new-design/online_payment_icon.png',
subTitle: TranslationBase.of(context).paymentOnline,
isPngImage: true,
width: 65.0,
height: 55.0,
),
),
);
medical.add(
CardCommonContact(
image: 'assets/images/device_icon.png',
text: TranslationBase.of(context).onlineCheckIn,
subText: TranslationBase.of(context).appointment,
type: 7,
width: 70.0,
height: 60.0,
projectViewModel: projectViewModel,
model: model,
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: AdvancePaymentPage()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).onlineCheckIn,
imagePath: 'assets/images/device_icon.png',
subTitle: TranslationBase.of(context).appointment,
isPngImage: true,
width: 45.0,
height: 45.0,
),
),
);
medical.add(
CardCommonContact(
image: 'assets/images/check-in.png',
text: TranslationBase.of(context).hmg,
subText: TranslationBase.of(context).wallet,
type: 8,
width: 60.0,
height: 55.0,
projectViewModel: projectViewModel,
model: model,
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: MyBalancePage()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).hmg,
imagePath: 'assets/images/check-in.png',
subTitle: TranslationBase.of(context).wallet,
isPngImage: true,
width: 45.0,
height: 45.0,
),
),
);
return medical;
}

@ -379,6 +379,20 @@ class DateUtil {
return "";
}
/// get data formatted like 26/4/2020
/// [dateTime] convert DateTime to data formatted according to language
static String getDayMonthYearDateFormattedLang(DateTime dateTime, bool isArabic) {
if (dateTime != null)
return DateFormat('dd/MM/yyyy', isArabic ? "ar_SA" : "en_US").format(dateTime);
else
return "";
}
/// get data formatted like 10:30 according to lang
static String formatDateToTimeLang(DateTime date, bool isArabic) {
return DateFormat('hh:mm a', isArabic ? "ar_SA" : "en_US").format(date);
}
/// get data formatted like 26/4/2020 10:30
/// [dateTime] convert DateTime to data formatted
static String getDayMonthYearHourMinuteDateFormatted(DateTime dateTime) {

@ -2259,8 +2259,7 @@ class TranslationBase {
String get emptySchedule => localizedValues["emptySchedule"][locale.languageCode];
String get serviceNotAvailable => localizedValues["serviceNotAvailable"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -49,7 +49,7 @@ class DoctorCard extends StatelessWidget {
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return Container(
height: 120,
height: 128,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
@ -130,7 +130,7 @@ class DoctorCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.formatDateToDate(date, projectViewModel.isArabic),
DateUtil.getDayMonthYearDateFormattedLang(date, projectViewModel.isArabic),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
Text(

@ -12,8 +12,10 @@ class MedicalProfileItem extends StatelessWidget {
final bool isPngImage;
bool isEnable;
Color imgColor;
final width;
final height;
MedicalProfileItem({@required this.imagePath, @required this.title, @required this.subTitle, hasBadge, this.isEnable = true, this.imgColor, this.isPngImage = false});
MedicalProfileItem({@required this.imagePath, @required this.title, @required this.subTitle, hasBadge, this.isEnable = true, this.imgColor, this.isPngImage = false, this.width, this.height});
@override
Widget build(BuildContext context) {
@ -43,8 +45,8 @@ class MedicalProfileItem extends StatelessWidget {
isPngImage
? Image.asset(
imagePath,
height: SizeConfig.widthMultiplier * 7,
width: SizeConfig.widthMultiplier * 7,
width: width != null ? width : SizeConfig.widthMultiplier * 7,
height: height != null ? height : SizeConfig.widthMultiplier * 7,
color: imgColor,
)
: SvgPicture.asset(
@ -64,25 +66,26 @@ class MedicalProfileItem extends StatelessWidget {
height: 13 / 10,
),
),
Container(
width: double.infinity,
child: Row(
children: [
Expanded(
child: Text(
subTitle,
maxLines: 1,
style: TextStyle(
fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w600,
letterSpacing: -0.3,
height: 1,
if (subTitle != null)
Container(
width: double.infinity,
child: Row(
children: [
Expanded(
child: Text(
subTitle,
maxLines: 1,
style: TextStyle(
fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w600,
letterSpacing: -0.3,
height: 1,
),
),
),
),
],
],
),
),
),
mFlex(1),
],
),

@ -75,12 +75,12 @@ class DoctorHeader extends StatelessWidget {
children: [
if (headerModel.date != null)
Text(
DateUtil.formatDateToDate(headerModel.date, projectViewModel.isArabic),
DateUtil.getDayMonthYearDateFormattedLang(headerModel.date, projectViewModel.isArabic),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
if (headerModel.time != null)
Text(
headerModel.time ?? DateUtil.formatDateToTime(headerModel.date),
headerModel.time ?? DateUtil.formatDateToTimeLang(headerModel.date, projectViewModel.isArabic),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
if (headerModel?.nationalityFlagURL != null)

Loading…
Cancel
Save