Merge branch 'Haroon' into 'development'

Haroon

See merge request Cloud_Solution/diplomatic-quarter!268
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit 30d525791d

@ -0,0 +1,14 @@
{
"client":{
"appType":"1",
"cp_id":"2640966000002322881",
"product_id":"736430079244816576",
"client_id":"563737844552565952",
"client_secret":"9C9A2C272576B8AE6E886C78AF944E8354B91F0AF3381129BB8369FB35E41C47",
"project_id":"736430079244816576",
"app_id":"103856487",
"api_key":"CgB6e3x90XxBrOCMun809w+DOzcFEettcBDUF3fqaLry1ViqTeJqoPwpfaOq/uGw//x0oYwucu9aWazs+Rdj0GUF",
"package_name":"com.cloud.diplomaticquarterapp"
},
"configuration_version":"1.0"
}

@ -0,0 +1,14 @@
{
"client":{
"appType":"1",
"cp_id":"2640966000002322881",
"product_id":"736430079244816567",
"client_id":"563735388191982656",
"client_secret":"650C7C799812AFFD53A10C7756CF05FB9F215A7E49032ABA8EBF3E14B77535CF",
"project_id":"736430079244816567",
"app_id":"102857389",
"api_key":"CgB6e3x9DJzMgRCmnT6dyUEkp6UsIfddb6l3w0ZEXzeiRMHEFi3400Z5fJ5qaHneU0OrAI/JRpk+DMGVs3QpUxlI",
"package_name":"com.ejada.hmg"
},
"configuration_version":"1.0"
}

@ -1,39 +1,37 @@
{ {
"project_info": { "project_info": {
"project_number": "815750722565", "project_number": "864393916058",
"firebase_url": "https://api-project-815750722565.firebaseio.com", "firebase_url": "https://diplomaticquarter-d2385.firebaseio.com",
"project_id": "api-project-815750722565", "project_id": "diplomaticquarter-d2385",
"storage_bucket": "api-project-815750722565.appspot.com" "storage_bucket": "diplomaticquarter-d2385.appspot.com"
}, },
"client": [ "client": [
{ {
"client_info": { "client_info": {
"mobilesdk_app_id": "1:815750722565:android:62281cd3e5df4063", "mobilesdk_app_id": "1:864393916058:android:5b5a65cd6d8c18b4b97923",
"android_client_info": { "android_client_info": {
"package_name": "com.cloud.diplomaticquarterapp" "package_name": "com.cloud.diplomaticquarterapp"
} }
}, },
"oauth_client": [ "oauth_client": [
{ {
"client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com", "client_id": "864393916058-tphjrn8j39ntevt32ekcvmll8aue7qql.apps.googleusercontent.com",
"client_type": 3 "client_type": 3
} }
], ],
"api_key": [ "api_key": [
{ {
"current_key": "AIzaSyDUfg6AKM1-00WyzpvLImUBC46wFrq9-qw" "current_key": "AIzaSyBdV3mos1BPhUzNKCj2KANJtiO3o2zh9IM"
} }
], ],
"services": { "services": {
"analytics_service": {
"status": 1
},
"appinvite_service": { "appinvite_service": {
"status": 1, "other_platform_oauth_client": [
"other_platform_oauth_client": [] {
}, "client_id": "864393916058-tphjrn8j39ntevt32ekcvmll8aue7qql.apps.googleusercontent.com",
"ads_service": { "client_type": 3
"status": 2 }
]
} }
} }
} }

@ -1333,12 +1333,14 @@ const Map localizedValues = {
"app-update": { "app-update": {
"en": "UPDATE THE APP", "en": "UPDATE THE APP",
"ar": "تحديث التطبيق" "ar": "تحديث التطبيق"
}, "covid-alert": {
"en": "Alert",
"ar": "تنبيه"
}, },
"enterIdentificationNumber": {"en" : "Enter Identification Number", "ar": "أدخل رقم التعريف"}, "enterIdentificationNumber": {"en" : "Enter Identification Number", "ar": "أدخل رقم التعريف"},
"accountActivationDesc": {"en" : "This service allows you to activate your LAKUM account after registering through the Vida system.", "ar": "تتيح لك هذه الخدمة تفعيل حساب LAKUM الخاص بك بعد التسجيل من خلال نظام Vida."}, "accountActivationDesc": {"en" : "This service allows you to activate your LAKUM account after registering through the Vida system.", "ar": "تتيح لك هذه الخدمة تفعيل حساب LAKUM الخاص بك بعد التسجيل من خلال نظام Vida."},
"pointsToTransfer": {"en" : "Point's to Transfer :", "ar": "النقاط المراد تحويلها:"}, "pointsToTransfer": {"en" : "Point's to Transfer :", "ar": "النقاط المراد تحويلها:"},
"enterBeneficiaryAccountNo": {"en" : "Enter Beneficiary Account No.", "ar": "أدخل رقم حساب المستفيد"}, "enterBeneficiaryAccountNo": {"en" : "Enter Beneficiary Account No.", "ar": "أدخل رقم حساب المستفيد"},
// "visit": {"en" : "Visit", "ar": "الزيارة"},
"confirm-prescription": { "confirm-prescription": {
"en": "Are you sure !! you want to send this request", "en": "Are you sure !! you want to send this request",
"ar": "تاكيد ارسال الطلب؟" "ar": "تاكيد ارسال الطلب؟"

@ -5,8 +5,8 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart'; import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -46,7 +46,7 @@ class BaseAppClient {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE); //Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
var pharmacyToken = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); var pharmacyToken = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
Map<String,String> headers = { Map<String, String> headers = {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Accept': 'application/json' 'Accept': 'application/json'
}; };
@ -125,8 +125,7 @@ class BaseAppClient {
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.post(url.trim(), final response = await http.post(url.trim(),
body: json.encode(body), body: json.encode(body), headers: headers);
headers: headers);
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
print("statusCode :$statusCode"); print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
@ -164,21 +163,24 @@ class BaseAppClient {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else if (parsed['MessageStatus'] == 2 && } else if (parsed['MessageStatus'] == 2 &&
parsed['IsAuthenticated']) { parsed['IsAuthenticated']) {
if (parsed['message'] == null && if (parsed['SameClinicApptList'] != null) {
parsed['ErrorEndUserMessage'] == null) { onSuccess(parsed, statusCode);
if(parsed['ErrorSearchMsg'] == null ){ } else {
onFailure("Server Error found with no available message", if (parsed['message'] == null &&
statusCode); parsed['ErrorEndUserMessage'] == null) {
}else { if (parsed['ErrorSearchMsg'] == null) {
onFailure(parsed['ErrorSearchMsg'], onFailure("Server Error found with no available message",
statusCode);
} else {
onFailure(parsed['ErrorSearchMsg'], statusCode);
}
} else {
onFailure(
parsed['message'] ??
parsed['ErrorEndUserMessage'] ??
parsed['ErrorMessage'],
statusCode); statusCode);
} }
} else {
onFailure(
parsed['message'] ??
parsed['ErrorEndUserMessage'] ??
parsed['ErrorMessage'],
statusCode);
} }
} else if (!parsed['IsAuthenticated']) { } else if (!parsed['IsAuthenticated']) {
await logout(); await logout();

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart'; import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart';
@ -13,9 +14,11 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.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:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'package:table_calendar/table_calendar.dart'; import 'package:table_calendar/table_calendar.dart';
class CovidTimeSlots extends StatefulWidget { class CovidTimeSlots extends StatefulWidget {
@ -28,6 +31,8 @@ class CovidTimeSlots extends StatefulWidget {
int selectedClinicID; int selectedClinicID;
int selectedDoctorID; int selectedDoctorID;
var language;
PatientShareResponse patientShareResponse; PatientShareResponse patientShareResponse;
CovidTimeSlots({@required this.projectID}); CovidTimeSlots({@required this.projectID});
@ -89,10 +94,10 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
super.dispose(); super.dispose();
} }
void _onDaySelected(DateTime day, List events) { void _onDaySelected(DateTime day, List events, ProjectViewModel projectViewModel) {
final DateFormat formatter = DateFormat('yyyy-MM-dd'); final DateFormat formatter = DateFormat('yyyy-MM-dd');
setState(() { setState(() {
this.selectedDate = DateUtil.getMonthDayYearDateFormatted(day); this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, projectViewModel.isArabic ? "ar" : "en");
openTimeSlotsPickerForDate(day, docFreeSlots); openTimeSlotsPickerForDate(day, docFreeSlots);
CovidTimeSlots.selectedDate = formatter.format(day); CovidTimeSlots.selectedDate = formatter.format(day);
print(CovidTimeSlots.selectedDate); print(CovidTimeSlots.selectedDate);
@ -111,6 +116,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest, appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
@ -170,11 +176,12 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
color: Colors.white), color: Colors.white),
margin: EdgeInsets.fromLTRB(0.0, 20.0, 0.0, 5.0), margin: EdgeInsets.fromLTRB(0.0, 20.0, 0.0, 5.0),
padding: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 20.0), padding: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 20.0),
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height * 0.65, // height: MediaQuery.of(context).size.height * 0.65,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
@ -219,7 +226,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
}, },
), ),
), ),
_buildTableCalendarWithBuilders(), _buildTableCalendarWithBuilders(projectViewModel),
], ],
), ),
), ),
@ -253,7 +260,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
onPressed: () { onPressed: () {
bookCovidTestAppointment(); bookCovidTestAppointment();
}, },
child: Text("BOOK", style: TextStyle(fontSize: 18.0)), child: Text(TranslationBase.of(context).bookNow, style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -264,9 +271,9 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
); );
} }
Widget _buildTableCalendarWithBuilders() { Widget _buildTableCalendarWithBuilders(ProjectViewModel projectViewModel) {
return TableCalendar( return TableCalendar(
locale: 'en_US', locale: projectViewModel.isArabic ? 'ar_SA' : 'en_US',
calendarController: _calendarController, calendarController: _calendarController,
events: _events, events: _events,
initialCalendarFormat: CalendarFormat.month, initialCalendarFormat: CalendarFormat.month,
@ -351,6 +358,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
_onDaySelected( _onDaySelected(
date, date,
event, event,
projectViewModel
); );
_animationController.forward(from: 0.0); _animationController.forward(from: 0.0);
}, },
@ -488,7 +496,6 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
CovidTimeSlots.selectedDate, CovidTimeSlots.selectedDate,
context) context)
.then((res) { .then((res) {
print(res);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: "Appointment Booked Successfully");
getPatientShare(context, res['AppointmentNo'], docObject.clinicID, getPatientShare(context, res['AppointmentNo'], docObject.clinicID,
@ -525,8 +532,8 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo,
BuildContext context) { BuildContext context) {
GifLoaderDialogUtils.showMyDialog(context);
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.cancelAppointment(appo, context).then((res) { service.cancelAppointment(appo, context).then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
@ -560,10 +567,12 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
navigateToPaymentAlert() { navigateToPaymentAlert() {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( FadePage(
builder: (context) => CovidPaymentAlert( page: CovidPaymentAlert(
patientShareResponse: widget.patientShareResponse))); patientShareResponse: widget.patientShareResponse),
),
);
} }
getCovidFreeSlots(BuildContext context, int projectID) { getCovidFreeSlots(BuildContext context, int projectID) {

@ -1,7 +1,13 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-summary.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.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';
@ -15,10 +21,13 @@ class CovidPaymentAlert extends StatefulWidget {
} }
class _CovidPaymentAlertState extends State<CovidPaymentAlert> { class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "COVID-19 TEST", appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
@ -43,7 +52,7 @@ class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only(left: 30.0, right: 20.0), margin: EdgeInsets.only(left: 30.0, right: 20.0),
child: Text("Alert", child: Text(TranslationBase.of(context).covidAlert,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -54,7 +63,8 @@ class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 30.0, right: 20.0, top: 5.0), left: 30.0, right: 20.0, top: 5.0),
child: Text( child: Text(
"Pay With-in 15 mins to confirm the appointment", TranslationBase.of(context).covidAlertHeader,
// "Pay With-in 15 mins to confirm the appointment",
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 20.0)), color: Colors.white, fontSize: 20.0)),
@ -72,7 +82,7 @@ class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
children: <Widget>[ children: <Widget>[
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
child: Text("Pay With-in 15 mins", child: Text(TranslationBase.of(context).covidAlertMins,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
color: new Color(0xFFc5272d), color: new Color(0xFFc5272d),
@ -83,7 +93,7 @@ class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.only(top: 15.0), margin: EdgeInsets.only(top: 15.0),
child: Text( child: Text(
"Payment for Covid-19 Test should Be made with-in 15 mins otherwise The system will Cancel the Scheduled appointment automatically.", TranslationBase.of(context).covidAlertInfo,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Colors.grey[700], color: Colors.grey[700],
@ -115,7 +125,7 @@ class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text("COVID-19 TEST", child: Text(TranslationBase.of(context).covidTest,
style: TextStyle( style: TextStyle(
fontSize: 18.0, fontSize: 18.0,
color: Colors.black, color: Colors.black,
@ -137,10 +147,12 @@ class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
child: Text( child: Text(
widget.patientShareResponse.projectName != widget.patientShareResponse.projectName !=
null null
? widget.patientShareResponse.projectName ? widget
.patientShareResponse.projectName
: "NULL", : "NULL",
style: TextStyle( style: TextStyle(
fontSize: 18.0, color: Colors.grey[700])), fontSize: 18.0,
color: Colors.grey[700])),
), ),
], ],
), ),
@ -159,14 +171,16 @@ class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
)), )),
Container( Container(
child: Text( child: Text(
widget.patientShareResponse.appointmentDate != widget.patientShareResponse
.appointmentDate !=
null null
? getDate(widget.patientShareResponse ? getDate(widget.patientShareResponse
.appointmentDate) .appointmentDate)
.split(" ")[0] .split(" ")[0]
: "NULL", : "NULL",
style: TextStyle( style: TextStyle(
fontSize: 18.0, color: Colors.grey[700])), fontSize: 18.0,
color: Colors.grey[700])),
), ),
], ],
), ),
@ -185,14 +199,16 @@ class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
)), )),
Container( Container(
child: Text( child: Text(
widget.patientShareResponse.appointmentDate != widget.patientShareResponse
.appointmentDate !=
null null
? getDate(widget.patientShareResponse ? getDate(widget.patientShareResponse
.appointmentDate) .appointmentDate)
.split(" ")[1] .split(" ")[1]
: "NULL", : "NULL",
style: TextStyle( style: TextStyle(
fontSize: 18.0, color: Colors.grey[700])), fontSize: 18.0,
color: Colors.grey[700])),
), ),
], ],
), ),
@ -216,7 +232,8 @@ class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
.patientShareResponse.doctorNameObj .patientShareResponse.doctorNameObj
: "NULL", : "NULL",
style: TextStyle( style: TextStyle(
fontSize: 18.0, color: Colors.grey[700])), fontSize: 18.0,
color: Colors.grey[700])),
), ),
], ],
), ),
@ -251,9 +268,9 @@ class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: Colors.grey[500], disabledColor: Colors.grey[500],
onPressed: () { onPressed: () {
// bookCovidTestAppointment(); startPaymentProcess();
}, },
child: Text("NEXT", style: TextStyle(fontSize: 18.0)), child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -264,6 +281,37 @@ class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
); );
} }
startPaymentProcess() {
navigateToPaymentMethod(context, widget.patientShareResponse);
}
Future navigateToPaymentMethod(
context, PatientShareResponse patientShareResponse) async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
});
}
Navigator.push(
context, MaterialPageRoute(builder: (context) => PaymentMethod()))
.then((value) {
print(value);
if (value != null) {
Navigator.push(
context,
FadePage(
page: CovidPaymentSummary(
patientShareResponse: widget.patientShareResponse,
selectedPaymentMethod: value.toString()),
),
);
}
});
}
String getDate(String appoDate) { String getDate(String appoDate) {
var appoDateFormatted = ""; var appoDateFormatted = "";

@ -0,0 +1,331 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class CovidPaymentSummary extends StatefulWidget {
PatientShareResponse patientShareResponse;
final String selectedPaymentMethod;
MyInAppBrowser browser;
AuthenticatedUser authenticatedUser;
AppSharedPreferences sharedPref = AppSharedPreferences();
String transID = "";
CovidPaymentSummary(
{@required this.patientShareResponse, this.selectedPaymentMethod});
@override
_CovidPaymentSummaryState createState() => _CovidPaymentSummaryState();
}
class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).confirmThePayment,
textAlign: TextAlign.center,
fontWeight: FontWeight.w500,
fontSize: 24,
),
SizedBox(
height: 12,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
height: 100.0,
padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45,
child:
Image.asset(getImagePath(widget.selectedPaymentMethod)),
),
Texts(
'${widget.patientShareResponse.patientShareWithTax} ' + TranslationBase.of(context).sar,
fontSize: 26,
bold: true,
)
],
),
SizedBox(
height: 12,
),
Row(
children: [
Expanded(
child: Container(
margin: EdgeInsets.all(3),
child: NewTextFields(
hintText: TranslationBase.of(context).fileNumber,
initialValue:
projectViewModel.user.patientID.toString(),
isEnabled: false,
),
),
),
Expanded(
child: Container(
margin: EdgeInsets.all(3),
child: NewTextFields(
hintText: TranslationBase.of(context).name,
initialValue: projectViewModel.user.firstName,
isEnabled: false,
),
),
),
],
),
SizedBox(
height: 12,
),
NewTextFields(
hintText: TranslationBase.of(context).mobileNumber,
initialValue: projectViewModel.user.mobileNumber,
isEnabled: false,
),
SizedBox(
height: 12,
),
NewTextFields(
hintText: TranslationBase.of(context).depositorName,
initialValue: projectViewModel.user.firstName +
" " +
projectViewModel.user.middleName +
" " +
projectViewModel.user.lastName,
isEnabled: false,
),
],
),
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.1,
width: double.infinity,
padding: EdgeInsets.all(12),
child: SecondaryButton(
textColor: Colors.white,
color: Theme.of(context).primaryColor,
label: TranslationBase.of(context).confirm.toUpperCase(),
onTap: () {
startPaymentProcess(projectViewModel.user);
},
),
),
);
}
startPaymentProcess(AuthenticatedUser authenticatedUser) {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.patientShareResponse.projectID;
appo.clinicID = widget.patientShareResponse.clinicID;
appo.appointmentNo = widget.patientShareResponse.appointmentNo;
openPayment(
widget.selectedPaymentMethod,
authenticatedUser,
double.parse(
widget.patientShareResponse.patientShareWithTax.toString()),
widget.patientShareResponse,
appo);
}
openPayment(
String paymentMethod,
AuthenticatedUser authenticatedUser,
double amount,
PatientShareResponse patientShareResponse,
AppoitmentAllHistoryResultList appo) async {
if (paymentMethod == "ApplePay") {
// await widget.chromeBrowser.open(
// url: "https://applepay-datatrans-sample.herokuapp.com/",
// options: ChromeSafariBrowserClassOptions(
// android: AndroidChromeCustomTabsOptions(
// addDefaultShareMenuItem: false),
// ios: IOSSafariOptions(barCollapsingEnabled: true)));
} else {
widget.browser = new MyInAppBrowser(
onExitCallback: onBrowserExit,
appo: appo,
onLoadStartCallback: onBrowserLoadStart);
widget.browser.openPaymentBrowser(
amount,
"Appointment check in",
Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo),
appo.projectID.toString(),
authenticatedUser.emailAddress,
paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser,
widget.browser,
widget.patientShareResponse.isLiveCareAppointment,
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo,
widget.patientShareResponse.clinicID,
widget.patientShareResponse.doctorID);
}
}
onBrowserLoadStart(String url) {
print("onBrowserLoadStart");
print(url);
MyInAppBrowser.successURLS.forEach((element) {
if (url.contains(element)) {
if (widget.browser.isOpened()) widget.browser.close();
MyInAppBrowser.isPaymentDone = true;
return;
}
});
MyInAppBrowser.errorURLS.forEach((element) {
if (url.contains(element)) {
if (widget.browser.isOpened()) widget.browser.close();
MyInAppBrowser.isPaymentDone = false;
return;
}
});
}
onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) {
print("onBrowserExit Called!!!!");
if (isPaymentMade) checkPaymentStatus(appo);
}
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
.checkPaymentStatus(
Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo),
context)
.then((res) {
print("Printing Payment Status Reponse!!!!");
print(res);
String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') {
createAdvancePayment(res, appo);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['Response_Message']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
service
.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'],
res['Fort_id'], res['PaymentMethod'], context)
.then((res) {
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
addAdvancedNumberRequest(
res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference,
appo.appointmentNo.toString());
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
addAdvancedNumberRequest(
String advanceNumber, String paymentReference, String appointmentID) {
DoctorsListService service = new DoctorsListService();
service
.addAdvancedNumberRequest(
advanceNumber, paymentReference, appointmentID, context)
.then((res) {
print(res);
getAppoQR(context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
getAppoQR(context) {
DoctorsListService service = new DoctorsListService();
service
.generateAppointmentQR(widget.patientShareResponse, context)
.then((res) {
print(res);
GifLoaderDialogUtils.hideDialog(context);
navigateToQR(context, res['AppointmentQR']);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
Future navigateToQR(context, String appoQR) async {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => QRCode(
patientShareResponse: widget.patientShareResponse,
appoQR: appoQR,
)));
}
String getImagePath(String paymentMethod) {
switch (paymentMethod) {
case "MADA":
return 'assets/images/new-design/mada.png';
break;
case "SADAD":
return 'assets/images/new-design/sadad.png';
break;
case "VISA":
return 'assets/images/new-design/visa.png';
break;
case "MASTERCARD":
return 'assets/images/new-design/mastercard.png';
break;
case "Installment":
return 'assets/images/new-design/installment.png';
break;
}
return 'assets/images/new-design/mada.png';
}
}

@ -367,7 +367,7 @@ class _ToDoState extends State<ToDo> {
height: 30.0, height: 30.0,
margin: projectViewModel.isArabic margin: projectViewModel.isArabic
? EdgeInsets.fromLTRB(160.0, 0.0, 30.0, 0.0) ? EdgeInsets.fromLTRB(160.0, 0.0, 30.0, 0.0)
: EdgeInsets.fromLTRB(30.0, 0.0, 160.0, 0.0), : EdgeInsets.fromLTRB(20.0, 0.0, 160.0, 0.0),
transform: Matrix4.translationValues(0.0, -8.0, 0.0), transform: Matrix4.translationValues(0.0, -8.0, 0.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@ -392,7 +392,7 @@ class _ToDoState extends State<ToDo> {
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12.0)), fontSize: 11.0)),
) )
: Container( : Container(
child: Text( child: Text(
@ -401,7 +401,7 @@ class _ToDoState extends State<ToDo> {
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12.0)), fontSize: 11.0)),
) )
], ],
), ),

@ -27,7 +27,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
Container( Container(
margin: EdgeInsets.fromLTRB(0.0, 15.0, 0.0, 0.0), margin: EdgeInsets.fromLTRB(0.0, 15.0, 0.0, 0.0),
alignment: Alignment.center, alignment: Alignment.center,
child: Text("Select Payment Method", child: Text(TranslationBase.of(context).selectPaymentOption,
style: TextStyle( style: TextStyle(
fontSize: 26.0, fontWeight: FontWeight.bold)), fontSize: 26.0, fontWeight: FontWeight.bold)),
), ),

@ -289,13 +289,22 @@ class _HomePageState extends State<HomePage> {
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Texts( Row(
model.user.firstName + children: [
" " + Texts(
model.user.lastName, model.user.firstName +
color: Colors.grey[100], " " +
bold: true, model.user.lastName,
fontSize: 15, color: Colors.grey[100],
bold: true,
fontSize: 15,
),
Container(
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
child: SvgPicture.asset(
"assets/images/new-design/verification_check.svg"),
),
],
), ),
Texts( Texts(
'${model.user.patientID}', '${model.user.patientID}',

@ -1,5 +1,8 @@
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/stepsTracker.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
// import 'package:fit_kit/fit_kit.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class HealthDataList extends StatefulWidget { class HealthDataList extends StatefulWidget {
@ -8,13 +11,30 @@ class HealthDataList extends StatefulWidget {
} }
class _HealthDataListState extends State<HealthDataList> { class _HealthDataListState extends State<HealthDataList> {
// List<DataType> dataTypes = List();
@override
void initState() {
// dataTypes.add(DataType.DISTANCE);
// dataTypes.add(DataType.STEP_COUNT);
// dataTypes.add(DataType.HEART_RATE);
// dataTypes.add(DataType.SLEEP);
// dataTypes.add(DataType.ENERGY);
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Smartwatches", appBarTitle: "Smartwatches",
isShowAppBar: true, isShowAppBar: true,
body: Container( body: Container(
height: MediaQuery.of(context).size.height, height: MediaQuery
.of(context)
.size
.height,
margin: EdgeInsets.all(20.0), margin: EdgeInsets.all(20.0),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
@ -58,21 +78,31 @@ class _HealthDataListState extends State<HealthDataList> {
Divider( Divider(
color: Colors.grey[500], color: Colors.grey[500],
), ),
Row( InkWell(
children: [ onTap: () {
Container( Navigator.push(
child: Image.asset( context,
"assets/images/SmartWatches/heartrate_icon.png", FadePage(
width: 60.0, page: StepsTracker(),
height: 60.0), ),
), );
Container( },
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0), child: Row(
child: Text("Steps", children: [
style: TextStyle( Container(
fontSize: 20.0, fontWeight: FontWeight.bold)), child: Image.asset(
), "assets/images/SmartWatches/heartrate_icon.png",
], width: 60.0,
height: 60.0),
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0),
child: Text("Steps",
style: TextStyle(
fontSize: 20.0, fontWeight: FontWeight.bold)),
),
],
),
), ),
Divider( Divider(
color: Colors.grey[500], color: Colors.grey[500],
@ -121,25 +151,68 @@ class _HealthDataListState extends State<HealthDataList> {
), ),
bottomSheet: Container( bottomSheet: Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).size.height * 0.1, height: MediaQuery
.of(context)
.size
.height * 0.1,
color: Colors.grey[100], color: Colors.grey[100],
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Divider( Divider(
color: Colors.transparent, color: Colors.transparent,
), ),
Container( InkWell(
width: MediaQuery.of(context).size.width * 0.8, onTap: () {
child: Button( print("ReadLast");
onTap: () { // readLast();
// launch(model.radImageURL); },
}, child:Container(
label: 'Sync Health Data', height: (MediaQuery
backgroundColor: Colors.grey[800], .of(context)
), .size
), .height/2)*0.12,
width: MediaQuery
.of(context)
.size
.width * 0.8,
decoration: BoxDecoration(
color: Colors.grey[800],
borderRadius: BorderRadius.circular(6.0),
),
child: Container(
padding: EdgeInsets.only(top: 10.0),
child: Text(
'Sync Health Data' , textAlign: TextAlign.center,style: TextStyle(
color: Colors.white , fontSize: 18.0
),
),
),),),
], ],
), ),
)); ));
} }
// void readLast() async {
// print("ReadLast");
// final result = await FitKit.readLast(DataType.DISTANCE);
// print(result);
// print(result);
// }
//
// void readAll() async {
// if (await FitKit.requestPermissions(dataTypes)) {
// for (DataType type in dataTypes) {
// final results = await FitKit.read(
// type,
// dateFrom: DateTime.now().subtract(Duration(days: 7)),
// dateTo: DateTime.now(),
// limit: 100,
// );
// print(results);
// print(results.length);
// }
// readLast();
// }
// }
} }

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/healt
import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart'; import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -88,8 +89,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text( child: Text(
"Apple Watch Series 1", "Apple Watch Series 1", overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -108,8 +110,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text( child: Text(
"Apple Watch Series 2", "Apple Watch Series 2", overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -135,8 +138,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text( child: Text(
"Apple Watch Series 3", "Apple Watch Series 3", overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -155,8 +159,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text( child: Text(
"Apple Watch Series 4", "Apple Watch Series 4", overflow: TextOverflow.clip ,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -182,8 +187,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text( child: Text(
"Apple Watch Series 5", "Apple Watch Series 5", overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -202,8 +208,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text( child: Text(
"Apple Watch Series 6", "Apple Watch Series 6", overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -229,7 +236,8 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
child: Text("Mi Band 3", width: MediaQuery.of(context).size.width*0.22,
child: Text("Mi Band 3", overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -248,7 +256,8 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
child: Text("Mi Band 4", width: MediaQuery.of(context).size.width*0.22,
child: Text("Mi Band 4", overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -417,9 +426,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
child: CarouselSlider( child: CarouselSlider(
carouselController: buttonCarouselController, carouselController: buttonCarouselController,
options: CarouselOptions( options: CarouselOptions(
enableInfiniteScroll: false, // enableInfiniteScroll: true,
viewportFraction: 0.95, viewportFraction: 0.99,
height: MediaQuery.of(context).size.height * 0.9), height: MediaQuery.of(context).size.height*1.02 ),
items: [1, 2].map((i) { items: [1, 2].map((i) {
return Builder( return Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
@ -427,7 +436,8 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
margin: EdgeInsets.symmetric(horizontal: 5.0), margin: EdgeInsets.symmetric(horizontal: 5.0),
child: Card( child: Card(
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), margin: EdgeInsets.only(top:16.0 , bottom: 8.0),
// fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white.withOpacity(1.0), color: Colors.white.withOpacity(1.0),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
@ -457,8 +467,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text( child: Text(
"Huawei Watch 2", "Huawei Watch 2", overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -477,8 +488,10 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text( child: Text(
"Mobovi TicWatch E2", "Mobovi TicWatch E2",
overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -504,7 +517,8 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
child: Text("Huawei Watch", width: MediaQuery.of(context).size.width*0.22,
child: Text("Huawei Watch", overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -523,7 +537,8 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
child: Text("Fossil Sport", width: MediaQuery.of(context).size.width*0.22,
child: Text("Fossil Sport", overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -549,8 +564,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text( child: Text(
"MisFit Vapor 2", "MisFit Vapor 2", overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -569,8 +585,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text( child: Text(
"LG Watch Sport", "LG Watch Sport", overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -596,7 +613,8 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
child: Text("Mi Band 3", width: MediaQuery.of(context).size.width*0.22,
child: Text("Mi Band 3", overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -615,7 +633,8 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: 70.0, width: 70.0,
height: 70.0), height: 70.0),
Container( Container(
child: Text("Mi Band 4", width: MediaQuery.of(context).size.width*0.22,
child: Text("Mi Band 4", overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 12.0)), fontSize: 12.0)),
) )
@ -735,7 +754,7 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
), ),
Container( Container(
margin: EdgeInsets.fromLTRB( margin: EdgeInsets.fromLTRB(
15.0, 95.0, 15.0, 15.0), 15.0, 75.0, 15.0, 15.0),
child: ButtonTheme( child: ButtonTheme(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: borderRadius:

@ -84,6 +84,7 @@ class _StepsTrackerState extends State<StepsTracker>
print(res['Med_GetYearStepsTransactionsStsList']); print(res['Med_GetYearStepsTransactionsStsList']);
yearlyStepsList.clear(); yearlyStepsList.clear();
res['Med_GetYearStepsTransactionsStsList'].forEach((element) { res['Med_GetYearStepsTransactionsStsList'].forEach((element) {
print('in forEach');
yearlyStepsList.add(new YearlyStepsResModel.fromJson(element)); yearlyStepsList.add(new YearlyStepsResModel.fromJson(element));
if (element['ValueSum'] != null) { if (element['ValueSum'] != null) {
double value = element['ValueSum']; double value = element['ValueSum'];
@ -91,7 +92,7 @@ class _StepsTrackerState extends State<StepsTracker>
dataLength++; dataLength++;
} }
}); });
print("innnnnnnnnnnnnnnnn");
print(avgStepsValue); print(avgStepsValue);
print(dataLength); print(dataLength);
setState(() { setState(() {

@ -1116,6 +1116,7 @@ class TranslationBase {
String get youAlreadyHaveOrder => localizedValues["you-already-have-order"][locale.languageCode]; String get youAlreadyHaveOrder => localizedValues["you-already-have-order"][locale.languageCode];
String get orderOverview => localizedValues["order-overview"][locale.languageCode]; String get orderOverview => localizedValues["order-overview"][locale.languageCode];
String get shippingAddresss => localizedValues["shipping-address"][locale.languageCode]; String get shippingAddresss => localizedValues["shipping-address"][locale.languageCode];
String get covidAlert => localizedValues["covid-alert"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save