Merge branch 'development_v2.5' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into fatima_v2

merge-requests/580/head
Fatimah Alshammari 4 years ago
commit f83adbc6ff

@ -33,7 +33,7 @@ class NavObserver extends RouteObserver<PageRoute<dynamic>> {
screenName: event.flutterName(), screenClassOverride: className)
.catchError(
(Object error) {
debugPrint('$FirebaseAnalyticsObserver: $error');
print('$FirebaseAnalyticsObserver: $error');
},
test: (Object error) {
return error is PlatformException;

@ -15,8 +15,8 @@ const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders';
const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';

@ -811,7 +811,7 @@ const Map localizedValues = {
"HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية بناءاً على الطقس الحالي '},
"MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "},
"SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"},
"ResendOrder": {"en": "Re-Order & Delivery", "ar": "إعادة طلب و توصيل"},
"ResendOrder": {"en": "Refill & Delivery", "ar": "إعادة صرف وتوصيل"},
"Ports": {"en": "Ports", "ar": "المنافذ"},
"Way": {"en": "Way", "ar": "الطريقة"},
"Average": {"en": "Average", "ar": "متوسط"},
@ -1572,7 +1572,7 @@ const Map localizedValues = {
"modesBelow": {"en": "Please select the modes below:", "ar": ":الرجاء تحديد الأوضاع أدناه"},
"prefferedMode": {"en": "Please select the preferred mode below:", "ar": ":الرجاء تحديد الوضع المفضل أدناه"},
"permissionsBellow": {"en": "Please allow the permissions below:", "ar": ":الرجاء السماح الأذونات أدناه"},
"appointmentReminder": {"en": "Would you like to set a reminder for this appointment in your calendar?", "ar": "هل ترغب في اضافة تذكير لهذا الموعد في التقويم؟"},
"appointmentReminder": {"en": "Would you like to set a reminder for this in your calendar?", "ar": "هل ترغب في اضافة تذكير لهذا في التقويم؟"},
"cancelAppointment": {"en": "Cancel Appt.", "ar": "الغاء الموعد"},
"updateInsurCards": {"en": "Update Insurance Cards", "ar": "تحديث بطاقات التأمين"},
"patientAge": {"en": "y", "ar": "سنة"},

@ -1,11 +1,11 @@
import 'PointsAmountPerday.dart';
class PointsAmountPerMonth {
dynamic amountPerMonth;
dynamic month;
int monthNumber;
num amountPerMonth;
String month;
num monthNumber;
List<PointsAmountPerday> pointsAmountPerday;
dynamic pointsPerMonth;
num pointsPerMonth;
PointsAmountPerMonth(
{this.amountPerMonth,

@ -20,8 +20,6 @@ class AncillaryOrdersService extends BaseService {
_ancillaryLists = [];
response['AncillaryOrderList'].forEach((item) {
ancillaryLists.add(AncillaryOrdersListModel.fromJson(item));
print("response of ancillary Lists__________");
print(response);
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -34,7 +32,6 @@ class AncillaryOrdersService extends BaseService {
body['AppointmentNo_Vida'] = appointmentNo;
body['OrderNo'] = orderNo;
body['ProjectID'] = projectID;
// "OrderNo=$orderNo&AppointmentNo_Vida=$appointmentNo&ProjectID=$projectID"
hasError = false;
await baseAppClient.post(GET_ANCILLARY_ORDERS_DETAILS,
onSuccess: (dynamic response, int statusCode) {
@ -42,12 +39,7 @@ class AncillaryOrdersService extends BaseService {
response['AncillaryOrderProcList'].forEach((item) {
ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(item));
// ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(response['AncillaryOrderProcList']));
print("----------------------------------");
print("Test data");
print(response);
});
//Future.value(_ancillaryProcLists);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -122,11 +122,15 @@ class BaseAppClient {
}
}
// body['IdentificationNo'] = 1009199553;
// body['MobileNo'] = "966545156035";
// body['PatientID'] = 1018977; //3844083
// body['IdentificationNo'] = 2076117163;
// body['MobileNo'] = "966503109207";
// body['PatientID'] = 2478442; //3844083
// body['TokenID'] = "@dm!n";
// Patient ID: 2478442
// Mobile no.: 0503109207
// ID: 2076117163
body.removeWhere((key, value) => key == null || value == null);
print("URL : $url");

@ -88,10 +88,6 @@ class AmService extends BaseService {
pendingAmbulanceRequestOrder = AmbulanceRequestOrdersModel.fromJson(item);
}
});
print(patientAmbulanceRequestOrdersList.length);
print(hasPendingOrder);
print(pendingOrderID);
print(pendingOrderStatus);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
@ -142,10 +138,7 @@ class AmService extends BaseService {
Future insertERPressOrder({@required PatientER_RC patientER}) async {
hasError = false;
var body = patientER.toJson();
print(body);
await baseAppClient.post(INSERT_TRANSPORTATION_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -8,7 +8,6 @@ import 'package:diplomaticquarterapp/core/model/geofencing/responses/GeoZonesRes
import 'package:diplomaticquarterapp/core/model/geofencing/responses/LogGeoZoneResponseModel.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
class GeofencingServices extends BaseService {
@ -25,8 +24,6 @@ class GeofencingServices extends BaseService {
geoZones.add(GeoZonesResponseModel().fromJson(json));
});
if (kDebugMode || testZones) addTestingGeoZones(zones);
_zonesJsonString = json.encode(zones);
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -35,13 +32,11 @@ class GeofencingServices extends BaseService {
AppSharedPreferences pref = AppSharedPreferences();
await pref.setString(HMG_GEOFENCES, _zonesJsonString);
debugPrint("Finished Fetching GEO ZONES from HMG service...");
debugPrint("GEO ZONES saved to AppPreferences with key '$HMG_GEOFENCES'");
return geoZones;
}
LogGeoZoneResponseModel logResponse;
Future<LogGeoZoneResponseModel> logGeoZone(LogGeoZoneRequestModel request) async {
hasError = false;
await baseAppClient.post(LOG_GEO_ZONES, onSuccess: (dynamic response, int statusCode) {
@ -52,12 +47,4 @@ class GeofencingServices extends BaseService {
}, body: request.toFlatMap());
return logResponse;
}
addTestingGeoZones(List zones) {
// zones.add({"GEOF_ID": 12, "Description": "ZiK Home", "Latitude": "24.691136", "Longitude": "46.650116", "Radius": 100, "Type": 1});
// zones.add({"GEOF_ID": 13, "Description": "CS Office", "Latitude": "24.7087913", "Longitude": "46.6656461", "Radius": 100, "Type": 1});
// zones.add({"GEOF_ID": 14, "Description": "Mahmoud Shrouf Home", "Latitude": "24.777577", "Longitude": "46.652675", "Radius": 100, "Type": 1});
// zones.add({"GEOF_ID": 14, "Description": "Panorama Mall", "Latitude": "24.692453", "Longitude": "46.669168", "Radius": 450, "Type": 1});
// zones.add({"GEOF_ID": 16, "Description": "Saudi Architects Crossing", "Latitude": "24.698375", "Longitude": "46.668567", "Radius": 140, "Type": 1});
}
}

@ -99,7 +99,6 @@ class MyBalanceService extends BaseService {
onSuccess: (response, statusCode) async {
logInTokenID = response['LogInTokenID'];
verificationCode = response['VerificationCode'];
print(verificationCode);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -23,8 +23,6 @@ class LacumService extends BaseService{
await baseAppClient.post(GET_LACUM_ACCOUNT_INFORMATION,
onSuccess: (response, statusCode) async {
lacumInformation = LacumAccountInformation.fromJson(response);
print("Test Lacum Account Information");
print(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
@ -39,20 +37,14 @@ class LacumService extends BaseService{
super.error = "";
Map<String, dynamic> body = Map();
// body['IdentificationNo'] = user.patientIdentificationNo;
// body['AccountNumber'] = "${lacumInformation.yahalaAccountNo}";
body['IdentificationNo'] = "2076117163";
body['AccountNumber'] = "2019000006";
body['IdentificationNo'] = user.patientIdentificationNo;
body['AccountNumber'] = "${lacumInformation.yahalaAccountNo}";
body['IsDetailsRequired'] = true;
try {
await baseAppClient.post(GET_LACUM_GROUP_INFORMATION,
onSuccess: (response, statusCode) async {
lacumGroupInformation = LacumAccountInformation.fromJson(response);
print("Test Lacum Group Information");
print(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -28,7 +28,6 @@ class PharmacyModuleService extends BaseService {
await baseAppClient.getPharmacy(PHARMACY_VERIFY_CUSTOMER, onSuccess: (dynamic response, int statusCode) async {
if (response['UserName'] != null) {
sharedPref.setString(PHARMACY_CUSTOMER_ID, response['CustomerId'].toString());
print(response);
} else {
await createUser();
}
@ -57,8 +56,6 @@ class PharmacyModuleService extends BaseService {
if (!response['IsRegistered']) {
} else {
customerInfo = CustomerInfo.fromJson(response);
print(response['customerDto']);
print(response['customerDto']['customerGuid']);
await sharedPref.setObject(PHARMACY_CUSTOMER_ID, customerInfo.customerId);
await sharedPref.setObject(PHARMACY_CUSTOMER_GUID, response['customerDto']['customerGuid']);
}
@ -189,8 +186,6 @@ class PharmacyModuleService extends BaseService {
response['products'].forEach((item) {
mostViewedProducts.add(PharmacyProduct.fromJson(item));
});
// print("most viewed products ---------");
// print(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -64,7 +64,6 @@ class _LocationPageState extends State<LocationPage> {
enableMapTypeButton: true,
searchForInitialValue: false,
onPlacePicked: (PickResult result) {
print("onPlacePickedonPlacePickedonPlacePickedonPlacePicked");
print(result.adrAddress);
},
selectedPlaceWidgetBuilder: (_, selectedPlace, state, isSearchBarFocused) {
@ -79,8 +78,6 @@ class _LocationPageState extends State<LocationPage> {
child: state == SearchingState.Searching
? SizedBox(height: 43,child: Center(child: CircularProgressIndicator())).insideContainer
: DefaultButton(TranslationBase.of(context).addNewAddress, () async {
// print();
AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel(
customer: Customer(addresses: [
Addresses(

@ -1,21 +1,26 @@
import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.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:provider/provider.dart';
class AnicllaryOrders extends StatefulWidget {
@override
_AnicllaryOrdersState createState() => _AnicllaryOrdersState();
}
class _AnicllaryOrdersState extends State<AnicllaryOrders>
with SingleTickerProviderStateMixin {
class _AnicllaryOrdersState extends State<AnicllaryOrders> with SingleTickerProviderStateMixin {
TabController _tabController;
ProjectViewModel projectViewModel;
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
@ -28,58 +33,103 @@ class _AnicllaryOrdersState extends State<AnicllaryOrders>
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<AnciallryOrdersViewModel>(
onModelReady: (model) => model.getOrders(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).anicllaryOrders,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: model.ancillaryLists.length > 0
? Column(children: [
getPatientInfo(model),
getAncillaryOrdersList(model)
])
: SizedBox())));
padding: EdgeInsets.all(12), child: model.ancillaryLists.length > 0 ? Column(children: [getPatientInfo(model), getAncillaryOrdersList(model)]) : getNoDataWidget(context))));
}
Widget getPatientInfo(AnciallryOrdersViewModel model) {
print(model.ancillaryLists);
return Padding(
child: Column(
children: [
Row(
children: [
Texts(
TranslationBase.of(context).mrn,
fontWeight: FontWeight.bold,
fontSize: 22,
),
Texts(
" : ",
fontSize: 20,
),
Texts(
model.ancillaryLists[0].patientID.toString(),
)
],
),
Row(
children: [
Texts(
TranslationBase.of(context).patientName,
fontWeight: FontWeight.bold,
fontSize: 20,
),
Texts(
" : ",
fontSize: 20,
Container(
width: double.infinity,
child: Container(
decoration: cardRadius(12),
margin: EdgeInsets.zero,
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
TranslationBase.of(context).patientName + ":",
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 10,
letterSpacing: -0.6,
color: CustomColors.grey,
),
),
mWidth(3),
Text(
projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
),
),
],
),
Row(
children: [
Text(
TranslationBase.of(context).mrn + ":",
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 10,
letterSpacing: -0.6,
color: CustomColors.grey,
),
),
mWidth(3),
Text(
projectViewModel.user.patientID.toString(),
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
),
),
],
),
Row(
children: [
Text(
TranslationBase.of(context).nationalIdNumber + ":",
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 10,
letterSpacing: -0.6,
color: CustomColors.grey,
),
),
mWidth(3),
Text(
projectViewModel.user.patientIdentificationNo,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
),
),
],
),
],
),
),
Texts(
model.ancillaryLists[0].patientName,
)
],
),
),
Divider()
],
@ -89,87 +139,34 @@ class _AnicllaryOrdersState extends State<AnicllaryOrders>
}
Widget getAncillaryOrdersList(AnciallryOrdersViewModel model) {
return Column(
children: model.ancillaryLists[0].ancillaryOrderList
.map(
(item) => InkWell(
onTap: () {
ancillaryOrdersDetails(item, model.ancillaryLists[0].projectID);
},
child: Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.5,
))),
padding: EdgeInsets.all(15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.all(3),
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context)
.appointmentNo +
' : ',
fontWeight: FontWeight.bold,
),
Texts(item.appointmentNo.toString())
],
)),
Padding(
padding: EdgeInsets.all(3),
child: Row(
children: [
Texts(
TranslationBase.of(context)
.appointmentDate +
' : ',
fontWeight: FontWeight.bold),
Texts(DateUtil.getFormattedDate(
DateUtil.convertStringToDate(
item.appointmentDate),
"MMM dd,yyyy"))
],
)),
Padding(
padding: EdgeInsets.all(3),
child: Row(
children: [
Texts(
TranslationBase.of(context)
.doctorName +
' : ',
fontWeight: FontWeight.bold),
Texts(item.doctorName.toString())
],
)),
Divider(
color: Colors.black12,
height: 1,
)
]),
Icon(
Icons.arrow_right,
size: 25,
)
]))),
)
.toList());
return Column(children: [
ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
return DoctorCard(
onTap: () => ancillaryOrdersDetails(model.ancillaryLists[0].ancillaryOrderList[index], model.ancillaryLists[0].projectID),
isInOutPatient: true,
name: TranslationBase.of(context).dr.toString() + " " + (model.ancillaryLists[0].ancillaryOrderList[index].doctorName),
billNo: model.ancillaryLists[0].ancillaryOrderList[index].orderNo.toString(),
profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
subName: model.ancillaryLists[0].projectName,
isLiveCareAppointment: false,
date: DateUtil.convertStringToDate(model.ancillaryLists[0].ancillaryOrderList[index].orderDate),
isSortByClinic: true,
);
},
itemCount: model.ancillaryLists[0].ancillaryOrderList.length,
separatorBuilder: (context, index) => SizedBox(height: 14),
),
]);
}
ancillaryOrdersDetails(item, projectId) {
Navigator.push(
context,
FadePage(
page: AnicllaryOrdersDetails(item.appointmentNo, item.orderNo,projectId ),
page: AnicllaryOrdersDetails(item.appointmentNo, item.orderNo, projectId),
),
);
}

@ -1,15 +1,19 @@
import "package:collection/collection.dart";
import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class AnicllaryOrdersDetails extends StatefulWidget {
final dynamic appoNo;
@ -17,11 +21,14 @@ class AnicllaryOrdersDetails extends StatefulWidget {
final dynamic projectID;
AnicllaryOrdersDetails(this.appoNo, this.orderNo, this.projectID);
@override
_AnicllaryOrdersState createState() => _AnicllaryOrdersState();
}
class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTickerProviderStateMixin {
ProjectViewModel projectViewModel;
void initState() {
super.initState();
}
@ -32,10 +39,13 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<AnciallryOrdersViewModel>(
onModelReady: (model) => model.getOrdersDetails(widget.appoNo, widget.orderNo, widget.projectID),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).anicllaryOrders,
body: SingleChildScrollView(
@ -83,48 +93,94 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
}
Widget getPatientInfo(AnciallryOrdersViewModel model) {
print(model.ancillaryListsDetails);
return Padding(
child: Column(
children: [
Row(
children: [
Texts(
TranslationBase.of(context).mrn,
fontWeight: FontWeight.bold,
fontSize: 22,
),
Texts(
" : ",
fontSize: 20,
),
Texts(
model.ancillaryLists[0].patientID.toString(),
)
],
),
Row(
children: [
Texts(
TranslationBase.of(context).patientName,
fontWeight: FontWeight.bold,
fontSize: 20,
),
Texts(
" : ",
fontSize: 20,
Container(
width: double.infinity,
child: Container(
decoration: cardRadius(12),
margin: EdgeInsets.zero,
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
TranslationBase.of(context).patientName + ":",
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 10,
letterSpacing: -0.6,
color: CustomColors.grey,
),
),
mWidth(3),
Text(
projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
),
),
],
),
Row(
children: [
Text(
TranslationBase.of(context).mrn + ":",
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 10,
letterSpacing: -0.6,
color: CustomColors.grey,
),
),
mWidth(3),
Text(
projectViewModel.user.patientID.toString(),
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
),
),
],
),
Row(
children: [
Text(
TranslationBase.of(context).nationalIdNumber + ":",
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 10,
letterSpacing: -0.6,
color: CustomColors.grey,
),
),
mWidth(3),
Text(
projectViewModel.user.patientIdentificationNo,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
),
),
],
),
],
),
),
Texts(
model.ancillaryLists[0].patientName,
)
],
),
),
Divider(
color: Colors.black26,
)
Divider()
],
),
padding: EdgeInsets.only(top: 5.0, bottom: 5.0),
padding: EdgeInsets.only(top: 5.0, bottom: 10.0),
);
}

@ -122,7 +122,6 @@ class FatResult extends StatelessWidget {
service.getCalculationDoctors(calculationID: 5).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['List_CalculationTable'].length);
if (res['MessageStatus'] == 1) {
if (res['List_CalculationTable'].length != 0) {
res['List_CalculationTable'].forEach((item) {

@ -142,7 +142,6 @@ class CarbsResult extends StatelessWidget {
service.getCalculationDoctors(calculationID: 11).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['List_CalculationTable'].length);
if (res['MessageStatus'] == 1) {
if (res['List_CalculationTable'].length != 0) {
res['List_CalculationTable'].forEach((item) {

@ -250,16 +250,7 @@ class _IdealBodyState extends State<IdealBody> {
color: CustomColors.accentColor,
onTap: () {
setState(() {
// calculateBmr();
// calculateCalories();
calculateIdealWeight();
print(idealWeight);
print(minRange);
print(maxRange);
print(overWeightBy);
print(textResult);
//print(overWeightBy);
{
Navigator.push(
context,

@ -200,7 +200,6 @@ class _DentalComplaintsState extends State<DentalComplaints> {
service.getDoctorsList(int.parse("17"), widget.searchInfo.ProjectID, false, context, isContinueDentalPlan: true).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
print(res['List_IsPatientHasOnGoingEstimation']);
dentalProceduresModel = DentalProceduresModel.fromJson(res);
dentalProceduresModel.listIsPatientHasOnGoingEstimation.forEach((procedure) {
appoTime += procedure.neededTime;
@ -251,7 +250,6 @@ class _DentalComplaintsState extends State<DentalComplaints> {
res['List_DentalChiefComplain'].forEach((v) {
complaintsList.add(new ListDentalChiefComplain.fromJson(v));
});
print(complaintsList.length);
});
} else {}
}).catchError((err) {

@ -43,8 +43,12 @@ class _QRCodeState extends State<QRCode> {
_bytes = base64.decode(widget.appoQR.split(',').last);
widget.authUser = new AuthenticatedUser();
FlutterNfcKit.nfcAvailability.then((value) {
_supportsNFC = (value == NFCAvailability.available);
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
FlutterNfcKit.nfcAvailability.then((value) {
setState(() {
_supportsNFC = (value == NFCAvailability.available);
});
});
});
super.initState();
@ -69,36 +73,37 @@ class _QRCodeState extends State<QRCode> {
height: MediaQuery.of(context).size.width / 3,
child: Row(
children: [
_supportsNFC
? Expanded(
flex: 1,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
child: Container(
margin: EdgeInsets.only(top: 30.0),
alignment: Alignment.center,
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(10),
),
child: Image.asset("assets/images/nfc/ic_nfc.png"),
),
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
});
});
},
),
],
// _supportsNFC
// ?
Expanded(
flex: 1,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
child: Container(
margin: EdgeInsets.only(top: 30.0),
alignment: Alignment.center,
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(10),
),
child: Image.asset("assets/images/nfc/ic_nfc.png"),
),
)
: Container(),
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
});
});
},
),
],
),
),
// : Container(),
Expanded(
flex: 1,
child: Container(

@ -196,7 +196,6 @@ class _SearchByClinicState extends State<SearchByClinic> {
onChanged: (bool value) {
setState(() {
nearestAppo = value;
print(nearestAppo);
if (nearestAppo)
getProjectsList();
else
@ -231,7 +230,6 @@ class _SearchByClinicState extends State<SearchByClinic> {
showClickListDialog(context, clinicsList, onSelection: (ListClinicCentralized clincs) {
Navigator.pop(context);
setState(() {
print(clincs.clinicID.toString() + "-" + clincs.isLiveCareClinicAndOnline.toString() + "-" + clincs.liveCareClinicID.toString() + "-" + clincs.liveCareServiceID.toString());
dropdownTitle = clincs.clinicDescription;
dropdownValue =
clincs.clinicID.toString() + "-" + clincs.isLiveCareClinicAndOnline.toString() + "-" + clincs.liveCareClinicID.toString() + "-" + clincs.liveCareServiceID.toString();
@ -241,7 +239,6 @@ class _SearchByClinicState extends State<SearchByClinic> {
projectDropdownValue = "";
getDoctorsList(context);
} else {
print("Dental");
}
});
});
@ -534,7 +531,6 @@ class _SearchByClinicState extends State<SearchByClinic> {
),
).then((value) {
setState(() {
print(value);
if (value == "false") dropdownValue = null;
});
if (value == "livecare") {

@ -27,7 +27,7 @@ class TestPageState extends State<TestPage>{
void location(){
LocationUtils().getCurrentLocation(callBack: (latLng){
debugPrint(latLng.toString());
print(latLng.toString());
});
}

@ -243,205 +243,6 @@ class _ToDoState extends State<ToDo> {
],
),
);
// return Container(
// margin: EdgeInsets.all(10.0),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Container(
// child: Card(
// margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0),
// color: Colors.white,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10),
// ),
// child: Container(
// width: MediaQuery.of(context).size.width,
// padding: EdgeInsets.all(10.0),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisSize: MainAxisSize.max,
// children: <Widget>[
// Row(
// children: <Widget>[
// Image.asset("assets/images/new-design/time_icon.png", width: 20.0, height: 20.0),
// Container(
// width: MediaQuery.of(context).size.width * 0.4,
// margin: EdgeInsets.only(left: 10.0, right: 10.0),
// child: Text(
// DateUtil.getWeekDayMonthDayYearDateFormatted(
// DateUtil.convertStringToDate(widget.appoList[index].appointmentDate), projectViewModel.isArabic ? "ar" : "en") +
// " " +
// widget.appoList[index].startTime.substring(0, 5),
// overflow: TextOverflow.clip,
// style: TextStyle(fontSize: 10.0)),
// ),
// !widget.appoList[index].isLiveCareAppointment ? Image.asset("assets/images/new-design/hospital_address_icon.png", width: 20.0, height: 20.0) : Container(),
// Container(
// margin: EdgeInsets.only(left: 5.0, right: 5.0),
// child: widget.appoList[index].isLiveCareAppointment
// ? Container()
// : Text(widget.appoList[index].projectName != null ? widget.appoList[index].projectName : "-",
// overflow: TextOverflow.clip, maxLines: 2, style: TextStyle(fontSize: 10.0)),
// ),
// ],
// ),
// Container(
// margin: EdgeInsets.only(top: 5.0),
// child: Divider(
// color: Colors.grey[500],
// ),
// ),
// Flex(
// direction: Axis.horizontal,
// children: <Widget>[
// Expanded(
// flex: 1,
// child: Container(
// height: MediaQuery.of(context).size.height * 0.1,
// margin: EdgeInsets.only(top: 5.0),
// child: ClipRRect(
// borderRadius: BorderRadius.circular(100.0),
// child: Image.network(widget.appoList[index].doctorImageURL, fit: BoxFit.fill),
// ),
// ),
// ),
// Expanded(
// flex: 3,
// child: Container(
// margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// Text(widget.appoList[index].doctorTitle + " " + widget.appoList[index].doctorNameObj,
// style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.bold, letterSpacing: -0.64)),
// if (getDoctorSpeciality(widget.appoList[index].doctorSpeciality) != "null\n")
// Container(
// margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
// child: Text(getDoctorSpeciality(widget.appoList[index].doctorSpeciality).trim(),
// style: TextStyle(fontSize: 12.0, color: Colors.grey[600], letterSpacing: -0.64)),
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// mainAxisSize: MainAxisSize.max,
// children: <Widget>[
// RatingBar.readOnly(
// initialRating: widget.appoList[index].actualDoctorRate.toDouble(),
// size: 20.0,
// filledColor: Colors.yellow[700],
// emptyColor: Colors.grey[500],
// isHalfAllowed: true,
// halfFilledIcon: Icons.star_half,
// filledIcon: Icons.star,
// emptyIcon: Icons.star,
// ),
// ],
// ),
// Container(
// child: CountdownTimer(
// controller:
// new CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (widget.appoList[index].remaniningHoursTocanPay * 1000) * 60),
// widgetBuilder: (_, CurrentRemainingTime time) {
// return time != null
// ? Text(
// '${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} ' +
// TranslationBase.of(context).upcomingTimeLeft,
// style: TextStyle(fontSize: 12.0, color: Color(0xffC5272D)))
// : Container();
// },
// ),
// ),
// ],
// ),
// ),
// ),
// Expanded(
// flex: 1,
// child: InkWell(
// onTap: () => performNextAction(widget.appoList[index]),
// child: Container(
// margin: EdgeInsets.only(top: 20.0),
// child: Column(
// children: <Widget>[
// Image.asset(getNextActionImage(widget.appoList[index].nextAction), width: 50.0, height: 50.0),
// Container(
// margin: EdgeInsets.only(top: 5.0),
// child: Text(getNextActionText(widget.appoList[index].nextAction), textAlign: TextAlign.center, style: TextStyle(fontSize: 12.0)),
// )
// ],
// ),
// ),
// ),
// )
// ],
// ),
// Divider(
// color: Colors.grey[500],
// ),
// Flex(
// direction: Axis.horizontal,
// children: <Widget>[
// Expanded(
// flex: 2,
// child: Container(
// child: Text(getNextActionDescription(widget.appoList[index].nextAction), style: TextStyle(fontSize: 11.0, color: Colors.grey[700])),
// ),
// ),
// Expanded(
// flex: 1,
// child: GestureDetector(
// onTap: () {
// navigateToAppointmentDetails(context, widget.appoList[index]);
// },
// child: Container(
// child: Text(TranslationBase.of(context).upcomingDetails,
// textAlign: TextAlign.end, style: TextStyle(fontSize: 11.0, color: new Color(0xffC5272D), decoration: TextDecoration.underline)),
// ),
// ),
// )
// ],
// ),
// ],
// ),
// ),
// ),
// ),
// Container(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.only(bottomLeft: Radius.circular(10.0), bottomRight: Radius.circular(10.0)),
// color: Color(0xff20bc44),
// ),
// height: 30.0,
// padding: EdgeInsets.only(right: 10, left: 10),
// margin: EdgeInsets.symmetric(horizontal: 20),
// transform: Matrix4.translationValues(0.0, -8.0, 0.0),
// child: Row(
// mainAxisSize: MainAxisSize.min,
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// widget.appoList[index].clinicID == 265
// ? Container(
// margin: EdgeInsets.only(left: 5.0, right: 5.0),
// child: SvgPicture.asset(
// "assets/images/new/car_icon.svg",
// height: 15,
// width: 15,
// ),
// )
// : widget.appoList[index].isLiveCareAppointment
// ? Image.asset("assets/images/new-design/video.png")
// : Image.asset("assets/images/new-design/walkin.png"),
// widget.appoList[index].clinicID == 265
// ? Text(TranslationBase.of(context).drivethruAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
// : widget.appoList[index].isLiveCareAppointment
// ? Text(TranslationBase.of(context).videoAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
// : Text(TranslationBase.of(context).walkinAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
// ],
// ),
// ),
// ],
// ),
// );
},
),
),
@ -736,7 +537,6 @@ class _ToDoState extends State<ToDo> {
getLiveCareAppointmentPatientShare(context, DoctorsListService service, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
service.getLiveCareAppointmentPatientShare(appo.appointmentNo.toString(), appo.clinicID, appo.projectID, context).then((res) {
print(res);
GifLoaderDialogUtils.hideDialog(context);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
openPaymentDialog(appo, widget.patientShareResponse);
@ -801,7 +601,6 @@ class _ToDoState extends State<ToDo> {
context: context,
pageBuilder: (context, animation1, animation2) {})
.then((value) {
print(value);
if (value != null) {
navigateToPaymentMethod(context, value, appo);
@ -882,7 +681,6 @@ class _ToDoState extends State<ToDo> {
String paymentReference = res['Fort_id'].toString();
service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['OnlineCheckInAppointments'][0]);
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, appo.appointmentNo.toString(), appo, res['OnlineCheckInAppointments'][0]);
}).catchError((err) {
print(err);
@ -917,26 +715,7 @@ class _ToDoState extends State<ToDo> {
});
}
// getPatientData() async {
// AppSharedPreferences sharedPref = AppSharedPreferences();
// if (await sharedPref.getObject(USER_PROFILE) != null) {
// var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
// setState(() {
// print(data);
// authUser = data;
// });
// getPatientAppointmentHistory();
// }
// }
Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) 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, FadePage(page: PaymentMethod(onSelectedMethod: (String metohd) {
setState(() {});
}))).then((value) {

@ -139,7 +139,6 @@ class _LiveCareHomeState extends State<LiveCareHome> with SingleTickerProviderSt
service.getLivecareHistory(context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
setState(() {
print(res['ErRequestHistoryList'].length);
if (res['ErRequestHistoryList'].length != 0) {
patientERVirtualHistoryResponse = PatientERVirtualHistoryResponse.fromJson(res);
erRequestHistoryList = patientERVirtualHistoryResponse.erRequestHistoryList;

@ -257,7 +257,6 @@ class _Login extends State<Login> {
authService
.checkPatientAuthentication(request)
.then((value) => {
//showLoader(false),
if (value['isSMSSent'])
{
sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']),
@ -284,17 +283,11 @@ class _Login extends State<Login> {
cancelFunction: () => {});
dialog.showAlertDialog(context);
});
// SMSOTP.showLoadingDialog(context, false),
}
checkActivationCode({code}) async {
Map<String, dynamic> request = {};
// request.logInTokenID = await sharedPref.getString(LOGIN_TOKEN_ID);
// request.activationCode = code ?? "0000";
// request.isSilentLogin = code != null ? false : true;
if (code == null)
//showLoader(true);
request['PatientMobileNumber'] = int.parse(mobileNo);
if (code == null) request['PatientMobileNumber'] = int.parse(mobileNo);
request['ZipCode'] = countryCode;
request['SearchType'] = loginType;
request['LoginType'] = loginType;
@ -305,10 +298,8 @@ class _Login extends State<Login> {
request['PatientIdentificationID'] = '';
request['PatientID'] = int.parse(nationalIDorFile.text);
}
// request.isRegister = false;
this.authService.checkActivationCode(request, code).then((result) async {
sharedPref.remove(FAMILY_FILE);
// Register GeoZones after login
registerGeoZones();
projectViewModel.setPrivilege(privilegeList: result);
result = CheckActivationCode.fromJson(result);
@ -323,15 +314,8 @@ class _Login extends State<Login> {
appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true;
authenticatedUserObject.user = result.list;
// authenticatedUserObject.user.cRSVerificationStatus =
// result['CRSVerificationStatus'];
projectViewModel.user = authenticatedUserObject.user;
//await familyFileProvider.getSharedRecordByStatus();
// await pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
// if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser();
// });
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {

@ -297,8 +297,6 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(transID, AppGlobal.context).then((res) {
print("Printing Payment Status Reponse!!!!");
print(res);
String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') {
createAdvancePayment(res, appo);
@ -327,7 +325,6 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
widget.advanceModel.fileNumber,
AppGlobal.context)
.then((res) {
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
addAdvancedNumberRequest(
res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference,

@ -283,7 +283,6 @@ class _PassportUpdatePageState extends State<PassportUpdatePage> {
service.getCovidPassportNumber().then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['Covid19_Certificate_GetPassportList'][0]['PassportNo']);
passportNumber.text = res['Covid19_Certificate_GetPassportList'][0]['PassportNo'];
if (res['Covid19_Certificate_GetPassportList'][0]['PassportNo'] != "") {
_isButtonDisabled = false;

@ -30,7 +30,6 @@ class _MedicalProfilePageState extends State<MedicalProfilePageNew> {
projectViewModel = Provider.of(context);
var appoCountProvider = Provider.of<ToDoCountProviderModel>(context);
List<Widget> myMedicalList = Utils.myMedicalList(projectViewModel: projectViewModel, context: context, count: appoCountProvider.count, isLogin: projectViewModel.isLogin);
print(myMedicalList);
return BaseView<MedicalViewModel>(
onModelReady: (model) => model.getAppointmentHistory(),
builder: (_, model, widget1) => AppScaffold(
@ -47,25 +46,6 @@ class _MedicalProfilePageState extends State<MedicalProfilePageNew> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
// Container(
// width: double.infinity,
// height: 210,
// decoration: containerBottomRightRadiusWithGradientBorder(0, darkColor: Color(0xFFF2B353E), lightColor: Color(0xFFF2B353E)),
// child: Stack(
// children: <Widget>[
// if (model.isLogin)
// ListView.builder(
// itemBuilder: (context, index) => TimeLineWidget(
// isUp: index % 2 == 1,
// appoitmentAllHistoryResul: model.appoitmentAllHistoryResultList[index],
// ),
// itemCount: model.appoitmentAllHistoryResultList.length,
// scrollDirection: Axis.horizontal,
// reverse: projectViewModel.isArabic,
// ),
// ],
// ),
// ),
TimeLineView(model.isLogin, projectViewModel.isArabic, model.appoitmentAllHistoryResultList),
SizedBox(
height: 20,
@ -101,14 +81,6 @@ class _MedicalProfilePageState extends State<MedicalProfilePageNew> {
shrinkWrap: true,
primary: false,
physics: NeverScrollableScrollPhysics(),
// gridDelegate:
// SliverGridDelegateWithFixedCrossAxisCount(
// crossAxisCount: 3,
// childAspectRatio: MediaQuery.of(context)
// .size
// .width /
// (MediaQuery.of(context).size.height / 2.20),
// ),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero,
itemCount: myMedicalList.length,

@ -124,7 +124,6 @@ class _syncHealthDataButtonState extends State<syncHealthDataButton> {
counter++;
totalHeartRate += element['Value'];
} else if (element['MedCategoryID'] == 4) {
print("sleeeeep");
sleepDataList.add(new healthData(
MedCategoryID: 4, MedSubCategoryID: element['MedSubCategoryID'], MachineDate: DateUtil.convertDateToString(date), Value: element['Value'], TransactionsListID: TransactionsListID++));

@ -37,7 +37,6 @@ class _ClinicPackagesPageState extends State<ClinicPackagesPage> with AfterLayou
if (viewModel.service.customer != null) {
var request = AddProductToCartRequestModel(product_id: product.id, customer_id: viewModel.service.customer.id);
await viewModel.service.addProductToCart(request, context: context).then((response) {
// appScaffold.appBar.badgeUpdater(viewModel.service.cartItemCount);
}).catchError((error) {
utils.Utils.showErrorToast(error);
});

@ -284,7 +284,7 @@ class _PackagesCartPageState extends State<PackagesCartPage> with AfterLayoutMix
var subTitle = "Order# ${value.data.customOrderNumber}";
Navigator.of(context).pushReplacement(MaterialPageRoute(builder: (context) => PackageOrderCompletedPage(heading: heading, title: title, subTitle: subTitle)));
}).catchError((error) {
debugPrint(error);
print(error);
});
}

@ -1,18 +1,17 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/compare-list.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/compare-list.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
int counter = 0;
dynamic languageID;
class ComparePage extends StatefulWidget {
@override
_ComparePageState createState() => _ComparePageState();
@ -23,6 +22,7 @@ class _ComparePageState extends State<ComparePage> {
getLanguageID() async {
languageID = await sharedPref.getString(APP_LANGUAGE);
}
void initState() {
getLanguageID();
super.initState();
@ -68,8 +68,8 @@ class compareList extends StatelessWidget {
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(TranslationBase.of(context).noData,
// 'There is no data',
child: Text(
TranslationBase.of(context).noData,
style: TextStyle(fontSize: 30),
),
)
@ -77,27 +77,11 @@ class compareList extends StatelessWidget {
),
),
)
: CarouselSlider(
options: CarouselOptions(
height: 800.0,
viewportFraction: 0.87,
enableInfiniteScroll: false),
items: productItem.map((i) {
return Builder(
builder: (BuildContext context) {
return Padding(
padding: const EdgeInsets.only(top: 8),
child: Container(
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.symmetric(horizontal: 10.0),
child: productItem.length != 0
? slideDetail(productItem)
: Container(),
),
);
},
);
}).toList(),
: Container(
margin: EdgeInsets.only(top: 12.0),
width: double.infinity,
height: MediaQuery.of(context).size.height,
child: slideDetail(productItem),
);
}
}
@ -147,8 +131,7 @@ class _slideDetailState extends State<slideDetail> {
icon: Icon(FontAwesomeIcons.trashAlt, size: 15),
onPressed: () {
setState(() {
Provider.of<CompareList>(context, listen: false)
.deleteItem(widget.data[index].id);
Provider.of<CompareList>(context, listen: false).deleteItem(widget.data[index].id);
});
},
),
@ -173,53 +156,42 @@ class _slideDetailState extends State<slideDetail> {
),
Container(
margin: EdgeInsets.all(5),
child:Align(
child: Align(
alignment: Alignment.topLeft,
child: RichText(
text: projectViewModel.isArabic ? TextSpan(
text: widget.data[index].namen,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
)
: TextSpan(
text: widget.data[index].name,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
),
text: projectViewModel.isArabic
? TextSpan(
text: widget.data[index].namen,
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
)
: TextSpan(
text: widget.data[index].name,
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
),
),
),
),
Container(
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic ?
Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: "SAR ${widget.data[index].price.toString()}",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
),
),
):
Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: "SAR ${widget.data[index].price.toString()}",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
),
),
),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: "SAR ${widget.data[index].price.toString()}",
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
),
),
)
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: "SAR ${widget.data[index].price.toString()}",
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
),
),
),
),
Padding(
padding: EdgeInsets.only(top: 8.0),
@ -230,63 +202,43 @@ class _slideDetailState extends State<slideDetail> {
),
),
Container(
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic ?
Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[0].nameN :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
)
),
): Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[0].name :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
)
),
)
),
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[0].nameN : "",
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
)),
)
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[0].name : "",
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
)),
)),
Container(
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic ?
Align(
alignment: Alignment.topRight,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[0].defaultValuen:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
)
),
):Align(
alignment: Alignment.topLeft,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[0].defaultValue:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
)
),
)
),
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[0].defaultValuen : "",
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
)),
)
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[0].defaultValue : "",
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
)),
)),
Padding(
padding: EdgeInsets.only(top: 8.0),
child: Container(
@ -297,62 +249,42 @@ class _slideDetailState extends State<slideDetail> {
),
Container(
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic ?
Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[1].nameN :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
)
),
): Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[1].name :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[1].nameN : "",
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
)),
)
),
)
),
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[1].name : "",
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
)),
)),
Container(
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic ?
Align(
alignment: Alignment.topRight,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[1].defaultValuen:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
)
),
):Align(
alignment: Alignment.topLeft,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[1].defaultValue:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[1].defaultValuen : "",
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
)),
)
),
)
),
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[1].defaultValue : "",
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
)),
)),
Padding(
padding: EdgeInsets.only(top: 8.0),
child: Container(
@ -363,62 +295,42 @@ class _slideDetailState extends State<slideDetail> {
),
Container(
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic ?
Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[2].nameN :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
)
),
): Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[2].name :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[2].nameN : "",
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
)),
)
),
)
),
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[2].name : "",
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
)),
)),
Container(
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic ?
Align(
alignment: Alignment.topRight,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[2].defaultValuen:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
)
),
):Align(
alignment: Alignment.topLeft,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[2].defaultValue:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[2].defaultValuen : "",
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
)),
)
),
)
),
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[2].defaultValue : "",
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
)),
)),
Padding(
padding: EdgeInsets.only(top: 8.0),
child: Container(
@ -429,62 +341,42 @@ class _slideDetailState extends State<slideDetail> {
),
Container(
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic ?
Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[3].nameN :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
)
),
): Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[3].name :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[3].nameN : "",
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
)),
)
),
)
),
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[3].name : "",
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
)),
)),
Container(
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic ?
Align(
alignment: Alignment.topRight,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[3].defaultValuen:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
)
),
):Align(
alignment: Alignment.topLeft,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[3].defaultValue:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[3].defaultValuen : "",
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
)),
)
),
)
),
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[3].defaultValue : "",
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
)),
)),
Padding(
padding: EdgeInsets.only(top: 8.0),
child: Container(
@ -495,62 +387,42 @@ class _slideDetailState extends State<slideDetail> {
),
Container(
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic ?
Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[4].nameN :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
)
),
): Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[4].name :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[4].nameN : "",
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
)),
)
),
)
),
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[4].name : "",
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
)),
)),
Container(
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic ?
Align(
alignment: Alignment.topRight,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[4].defaultValuen:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
)
),
):Align(
alignment: Alignment.topLeft,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[4].defaultValue:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[4].defaultValuen : "",
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
)),
)
),
)
),
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[4].defaultValue : "",
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
)),
)),
Padding(
padding: EdgeInsets.only(top: 8.0),
child: Container(
@ -561,63 +433,42 @@ class _slideDetailState extends State<slideDetail> {
),
Container(
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic ?
Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[5].nameN :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
)
),
): Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[5].name :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[5].nameN : "",
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
)),
)
),
)
),
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[5].name : "",
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
)),
)),
Container(
margin: EdgeInsets.all(5),
child: projectViewModel.isArabic ?
Align(
alignment: Alignment.topRight,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[5].defaultValuen:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
)
),
):Align(
alignment: Alignment.topLeft,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[5].defaultValue:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[5].defaultValuen : "",
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
)),
)
),
)
),
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? widget.data[index].specifications[5].defaultValue : "",
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
)),
)),
],
),
),
@ -628,15 +479,3 @@ class _slideDetailState extends State<slideDetail> {
);
}
}
String returnString(data) {
for (int i = 0; i < data.length; i++) {
print(data[i]);
// if(data[i] == null){
// if(counter == i){
//
// }
// }
}
return "ENAD HILAL";
}

@ -24,6 +24,9 @@ class LakumActivationVidaPage extends StatelessWidget {
isShowAppBar: true,
isPharmacy: true,
isShowDecPage: false,
showPharmacyCart: false,
showHomeAppBarIcon: false,
isBottomBar: false,
backgroundColor: Colors.white,
baseViewModel: model,
body: Container(

@ -18,8 +18,7 @@ class LacumTransferPage extends StatefulWidget {
}
class _LacumTransferPageState extends State<LacumTransferPage> {
TextEditingController _beneficieryAccountController =
new TextEditingController();
TextEditingController _beneficieryAccountController = new TextEditingController();
TextEditingController _transferPointsController = new TextEditingController();
@override
@ -34,8 +33,7 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
final mediaQuery = MediaQuery.of(context);
return BaseView<LacumTranferViewModel>(
onModelReady: (model) => model.setLakumData(
widget.lacumInformation, widget.lacumGroupInformation),
onModelReady: (model) => model.setLakumData(widget.lacumInformation, widget.lacumGroupInformation),
builder: (_, model, wi) => AppScaffold(
appBarTitle: "${TranslationBase.of(context).lakumTransfer}",
isShowAppBar: true,
@ -50,8 +48,7 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
width: double.infinity,
child: SingleChildScrollView(
child: SizedBox(
height:
mediaQuery.size.height - 58 - mediaQuery.padding.top,
height: mediaQuery.size.height - 58 - mediaQuery.padding.top,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
@ -65,23 +62,20 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
Container(
height: 100,
width: mediaQuery.size.width / 2 - 26,
padding: EdgeInsets.only(
top: 12, left: 8, right: 8, bottom: 4),
padding: EdgeInsets.only(top: 12, left: 8, right: 8, bottom: 4),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border: Border.fromBorderSide(BorderSide(
color: Color(0xffe1e1e1),
width: 0.4,
)),
color: Colors.green
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border: Border.fromBorderSide(BorderSide(
color: Color(0xffe1e1e1),
width: 0.4,
)),
color: Colors.green
//(0xff6294ed),
),
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Column(
@ -99,13 +93,10 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
),
Expanded(
child: Container(
padding: EdgeInsets.symmetric(
vertical: 8),
padding: EdgeInsets.symmetric(vertical: 8),
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalance}",
@ -126,8 +117,7 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
Container(
height: 100,
width: mediaQuery.size.width / 2 - 26,
padding: EdgeInsets.only(
top: 12, left: 8, right: 8, bottom: 4),
padding: EdgeInsets.only(top: 12, left: 8, right: 8, bottom: 4),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
@ -138,10 +128,8 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
color: Color(0xff339933),
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Column(
@ -159,13 +147,10 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
),
Expanded(
child: Container(
padding: EdgeInsets.symmetric(
vertical: 8),
padding: EdgeInsets.symmetric(vertical: 8),
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount}",
@ -199,47 +184,34 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
margin: EdgeInsets.only(top: 4),
child: BorderedButton(
TranslationBase.of(context).checkBeneficiary,
backgroundColor:
_beneficieryAccountController.text != ""
? Color(0xff60686b)
: Color(0xffb0b4b5),
backgroundColor: _beneficieryAccountController.text.isNotEmpty ? Color(0xff60686b) : Color(0xffb0b4b5),
textColor: Colors.white,
fontSize: 16,
hPadding: 8,
vPadding: 12,
handler:
_beneficieryAccountController.text != ""
? () {
model.getLacumGroupDataBuAccountId(
_beneficieryAccountController
.text);
}
: (){},
handler: _beneficieryAccountController.text.isNotEmpty
? () {
model.getLacumGroupDataBuAccountId(_beneficieryAccountController.text);
}
: () {},
),
),
(model.lacumReceiverInformation != null &&
model.lacumReceiverInformation
.lakumInquiryInformationObjVersion !=
null)
(model.lacumReceiverInformation != null && model.lacumReceiverInformation.lakumInquiryInformationObjVersion != null)
? Container(
margin: EdgeInsets.only(top: 8),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context)
.beneficiaryName,
TranslationBase.of(context).beneficiaryName,
color: Colors.black,
),
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 8),
padding: const EdgeInsets.symmetric(horizontal: 8),
child: TextField(
enabled: false,
decoration: new InputDecoration(
hintText:
"${model.lacumReceiverInformation.lakumInquiryInformationObjVersion.memberName}",
hintText: "${model.lacumReceiverInformation.lakumInquiryInformationObjVersion.memberName}",
hintStyle: TextStyle(
fontSize: 16,
color: Colors.grey.shade600,
@ -259,11 +231,9 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
color: Colors.black,
),
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 8),
padding: const EdgeInsets.symmetric(horizontal: 8),
child: TextField(
controller:
_transferPointsController,
controller: _transferPointsController,
decoration: new InputDecoration(
focusColor: Colors.green,
hintStyle: TextStyle(
@ -282,10 +252,7 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
: Container()
],
),
if (model.lacumReceiverInformation != null &&
model.lacumReceiverInformation
.lakumInquiryInformationObjVersion !=
null)
if (model.lacumReceiverInformation != null && model.lacumReceiverInformation.lakumInquiryInformationObjVersion != null)
Container(
margin: EdgeInsets.all(8),
child: BorderedButton(
@ -298,14 +265,9 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
vPadding: 16,
fontWeight: FontWeight.w600,
handler: () {
model
.transferYaHalaLoyaltyPoints(
_transferPointsController.text)
.then((status) => {
if (status == 200)
{Navigator.pop(context, "")}
// back to previous page
});
model.transferYaHalaLoyaltyPoints(_transferPointsController.text).then((status) => {
{Navigator.pop(context)}
});
},
),
)

@ -28,13 +28,11 @@ class LakumMainPage extends StatelessWidget {
return BaseView<LacumViewModel>(
onModelReady: (model) async {
await model.getLacumData();
if (model.lacumInformation.yahalaAccountNo == 0 ||
model.lacumInformation.yahalaAccountNo == null) {
if (model.lacumInformation.yahalaAccountNo == 0 || model.lacumInformation.yahalaAccountNo == null) {
navigateToLakumRegister(context);
} else {
if (model.lacumInformation.status == "Hold") {
Navigator.pushReplacement(
context, FadePage(page: LakumActivationVidaPage()));
Navigator.pushReplacement(context, FadePage(page: LakumActivationVidaPage()));
}
}
},
@ -53,10 +51,7 @@ class LakumMainPage extends StatelessWidget {
body: Container(
width: double.infinity,
child: SingleChildScrollView(
child: (model.lacumGroupInformation != null &&
model.lacumGroupInformation
.lakumInquiryInformationObjVersion !=
null)
child: (model.lacumGroupInformation != null && model.lacumGroupInformation.lakumInquiryInformationObjVersion != null)
? Column(
children: [
Stack(
@ -70,11 +65,7 @@ class LakumMainPage extends StatelessWidget {
SizedBox(
height: mediaQuery.size.height * 0.02,
),
Container(
width: mediaQuery.size.width * 1,
height: mediaQuery.size.width * .6,
child: LakumBannerWidget(
model, mediaQuery, true)),
Container(width: mediaQuery.size.width * 1, height: mediaQuery.size.width * .6, child: LakumBannerWidget(model, mediaQuery, true)),
],
)
],
@ -88,43 +79,17 @@ class LakumMainPage extends StatelessWidget {
),
Container(
height: 110,
margin: EdgeInsets.symmetric(
horizontal: 16, vertical: 12.0),
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 12.0),
child: ListView(
scrollDirection: Axis.horizontal,
children: <Widget>[
LacumPointsWidget(
mediaQuery,
1,
TranslationBase.of(context).balance,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalanceAmount,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalance,
null),
LacumPointsWidget(mediaQuery, 1, TranslationBase.of(context).balance, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalance, null),
SizedBox(
width: 8,
),
LacumPointsWidget(
mediaQuery,
2,
TranslationBase.of(context).gained,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalanceAmount,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.gainedPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.gainedPointsAmountPerYear),
LacumPointsWidget(mediaQuery, 2, TranslationBase.of(context).gained, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPoints, model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPointsAmountPerYear),
SizedBox(
width: 8,
),
@ -132,40 +97,16 @@ class LakumMainPage extends StatelessWidget {
mediaQuery,
3,
TranslationBase.of(context).consumed,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmount !=
null
? int.parse(model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmount)
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount != null
? num.parse(model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount)
: 0,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmountPerYear),
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPoints,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmountPerYear),
SizedBox(
width: 8,
),
LacumPointsWidget(
mediaQuery,
4,
TranslationBase.of(context).transferred,
0,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.transferPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.transferPointsAmountPerYear),
LacumPointsWidget(mediaQuery, 4, TranslationBase.of(context).transferred, 0, model.lacumGroupInformation.lakumInquiryInformationObjVersion.transferPoints,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.transferPointsAmountPerYear),
],
),
),
@ -189,8 +130,7 @@ class LakumMainPage extends StatelessWidget {
),
),
Container(
margin:
EdgeInsets.symmetric(vertical: 16, horizontal: 8),
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -226,45 +166,39 @@ class LakumMainPage extends StatelessWidget {
// fontSize: 14,
// ),
Container(
margin:
EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Row(
children: [
Row(
children: [
Image.asset(
"assets/images/pharmacy_module/lakum/waiting_gained_icon.png",
fit: BoxFit.fill,
width: 20,
height: 25,
),
Padding(
padding:
EdgeInsets.symmetric(horizontal: 8),
child: Texts(
TranslationBase.of(context)
.Waitinggained,
// "Waiting gained",
fontSize: 14,
),
)
],
),
Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} ${TranslationBase.of(context).lakumPoint}",
fontWeight: FontWeight.bold,
fontSize: 14,
Image.asset(
"assets/images/pharmacy_module/lakum/waiting_gained_icon.png",
fit: BoxFit.fill,
width: 20,
height: 25,
),
])),
Padding(
padding: EdgeInsets.symmetric(horizontal: 8),
child: Texts(
TranslationBase.of(context).Waitinggained,
// "Waiting gained",
fontSize: 14,
),
)
],
),
Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} ${TranslationBase.of(context).lakumPoint}",
fontWeight: FontWeight.bold,
fontSize: 14,
),
])),
// Texts(
// "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} Points",
// fontWeight: FontWeight.bold,
// fontSize: 14,
// ),
Container(
margin:
EdgeInsets.symmetric(vertical: 16, horizontal: 8),
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -317,11 +251,7 @@ class LakumMainPage extends StatelessWidget {
}
navigateToLakumRegister(BuildContext context) {
Navigator.pushReplacement(
context,
FadePage(
page: LakumRegistrationPage(
projectViewModel.user.patientIdentificationNo)));
Navigator.pushReplacement(context, FadePage(page: LakumRegistrationPage(projectViewModel.user.patientIdentificationNo)));
}
}
@ -331,12 +261,7 @@ List<Widget> _buildAppBarICons(BuildContext context, LacumViewModel model) {
icon: Icon(Icons.settings),
color: Colors.white,
onPressed: () {
Navigator.push(
context,
FadePage(
page: LakumSettingPage(
model.lacumInformation, model.lacumGroupInformation)))
.then((result) => {model.getLacumGroupData()});
Navigator.push(context, FadePage(page: LakumSettingPage(model.lacumInformation, model.lacumGroupInformation))).then((result) => {model.getLacumGroupData()});
},
),
];
@ -402,13 +327,9 @@ class LakumHomeButtons extends StatelessWidget {
Expanded(
child: InkWell(
onTap: () {
print("Lacum transfer click");
Navigator.push(
context,
FadePage(
page: LacumTransferPage(model.lacumInformation,
model.lacumGroupInformation)))
.then((result) => {model.getLacumGroupData()});
Navigator.push(context, FadePage(page: LacumTransferPage(model.lacumInformation, model.lacumGroupInformation))).then((result) {
model.getLacumGroupData();
});
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 8),
@ -460,8 +381,7 @@ class LacumPointsWidget extends StatelessWidget {
Color titleColor;
final List<PointsAmountPerYear> pointsAmountPerYear;
LacumPointsWidget(this.mediaQuery, this.pointType, this.title, this.riyal,
this.point, this.pointsAmountPerYear) {
LacumPointsWidget(this.mediaQuery, this.pointType, this.title, this.riyal, this.point, this.pointsAmountPerYear) {
if (pointType == 1) {
titleColor = Color(0xffefefef);
} else if (pointType == 2) {
@ -480,11 +400,9 @@ class LacumPointsWidget extends StatelessWidget {
onTap: () {
if (pointType != 1) {
if (pointsAmountPerYear != null && pointsAmountPerYear.length > 0) {
Navigator.push(context,
FadePage(page: LakumPointsYearPage(pointsAmountPerYear)));
Navigator.push(context, FadePage(page: LakumPointsYearPage(pointsAmountPerYear)));
} else {
AppToast.showErrorToast(
message: TranslationBase.of(context).lakumMsg);
AppToast.showErrorToast(message: TranslationBase.of(context).lakumMsg);
// show snackBar No Details Points are there
}
}

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/PointsAmountPerMonth.
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/widgets/lakum-point-table-row-widget.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -26,9 +27,13 @@ class _LakumPointsMonthPageState extends State<LakumPointMonthPage> {
return BaseView<LacumViewModel>(
builder: (_, model, wi) => AppScaffold(
title: TranslationBase.of(context).LakumPoint,
appBarTitle: TranslationBase.of(context).LakumPoint,
isShowAppBar: true,
isPharmacy: true,
showPharmacyCart: false,
isShowDecPage: false,
showHomeAppBarIcon: false,
isBottomBar: true,
backgroundColor: Colors.white,
baseViewModel: model,
body: Container(
@ -50,16 +55,14 @@ class _LakumPointsMonthPageState extends State<LakumPointMonthPage> {
children: [
Container(
height: mediaQuery.size.height * 0.06,
margin: EdgeInsets.symmetric(
vertical: 16, horizontal: 24),
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 24),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).month,
@ -78,15 +81,12 @@ class _LakumPointsMonthPageState extends State<LakumPointMonthPage> {
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Expanded(
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Texts(
TranslationBase.of(context).point,
@ -110,10 +110,8 @@ class _LakumPointsMonthPageState extends State<LakumPointMonthPage> {
),
Expanded(
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Texts(
TranslationBase.of(context).riyal,
@ -143,16 +141,14 @@ class _LakumPointsMonthPageState extends State<LakumPointMonthPage> {
SizedBox(
height: 10,
),
LakumPointTableRowWidget(true, "DAY", 0, 0, null, 0),
LakumPointTableRowWidget(true, "DATE", 0, 0, null, 0),
...List.generate(
widget.pointsAmountPerMonth.pointsAmountPerday.length,
(index) => LakumPointTableRowWidget(
false,
widget.pointsAmountPerMonth.pointsAmountPerday[index].day,
widget.pointsAmountPerMonth.pointsAmountPerday[index]
.pointsPerDay,
widget.pointsAmountPerMonth.pointsAmountPerday[index]
.amountPerDay,
DateUtil.getWeekDayMonthDayYearDateFormatted(DateUtil.convertStringToDate(widget.pointsAmountPerMonth.pointsAmountPerday[index].transationDate), "en"),
widget.pointsAmountPerMonth.pointsAmountPerday[index].pointsPerDay,
widget.pointsAmountPerMonth.pointsAmountPerday[index].amountPerDay,
() {
setState(() {
if (widget.expandedItemIndex == index) {
@ -167,22 +163,11 @@ class _LakumPointsMonthPageState extends State<LakumPointMonthPage> {
collapsed: Column(
children: [
...List.generate(
widget.pointsAmountPerMonth.pointsAmountPerday[index]
.pointsDetails.length,
widget.pointsAmountPerMonth.pointsAmountPerday[index].pointsDetails.length,
(index) => DayPointsDetailWidget(
widget
.pointsAmountPerMonth
.pointsAmountPerday[index]
.pointsDetails[index]
.subTransactionTypeDescription,
widget
.pointsAmountPerMonth
.pointsAmountPerday[index]
.pointsDetails[index].purchasePoints,
widget
.pointsAmountPerMonth
.pointsAmountPerday[index]
.pointsDetails[index].amount),
widget.pointsAmountPerMonth.pointsAmountPerday[index].pointsDetails[index].subTransactionTypeDescription,
widget.pointsAmountPerMonth.pointsAmountPerday[index].pointsDetails[index].purchasePoints,
widget.pointsAmountPerMonth.pointsAmountPerday[index].pointsDetails[index].amount),
),
],
),
@ -199,8 +184,8 @@ class _LakumPointsMonthPageState extends State<LakumPointMonthPage> {
class DayPointsDetailWidget extends StatelessWidget {
final String rowTitle;
final double points;
final double riyal;
final num points;
final num riyal;
DayPointsDetailWidget(this.rowTitle, this.points, this.riyal);
@ -237,7 +222,6 @@ class DayPointsDetailWidget extends StatelessWidget {
),
)),
Expanded(
child: Container(
child: Texts(
"$points",

@ -27,9 +27,13 @@ class _LakumPointsYearPageState extends State<LakumPointsYearPage> {
return BaseView<LacumViewModel>(
builder: (_, model, wi) => AppScaffold(
title: TranslationBase.of(context).LakumPoint,
appBarTitle: TranslationBase.of(context).LakumPoint,
isShowAppBar: true,
isPharmacy: true,
showPharmacyCart: false,
isShowDecPage: false,
showHomeAppBarIcon: false,
isBottomBar: true,
backgroundColor: Colors.white,
baseViewModel: model,
body: Container(
@ -103,6 +107,7 @@ class LacumPointsYearWidget extends StatelessWidget {
child: Container(
width: mediaQuery.size.width / 2 - 16,
padding: EdgeInsets.only(top: 12, left: 8, right: 8, bottom: 4),
margin: EdgeInsets.only(right: 8.0),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
@ -175,7 +180,7 @@ class LacumPointsYearWidget extends StatelessWidget {
children: [
Texts(TranslationBase.of(context).sar,
// "RIYAL",
fontSize: 13,
fontSize: 12,
fontWeight: FontWeight.bold,
color: isSelected ? Colors.white : Colors.black,
),

@ -5,8 +5,8 @@ import 'package:flutter/material.dart';
class LakumPointTableRowWidget extends StatefulWidget {
final bool isTableTitle; // true : title , false: row
final String rowTitle;
final double points;
final double riyal;
final num points;
final num riyal;
final Function onTap;
final int rowIndex;
final Widget collapsed;

@ -158,8 +158,6 @@ class _PharmacyAddressesState extends State<PharmacyAddressesPage> {
_navigateToPaymentOption(model) {
if (widget.isUpdate) {
print("sfsf");
widget.orderPreviewViewModel.paymentCheckoutData.address = Addresses.fromJson(model.addresses[model.selectedAddressIndex].toJson());
widget.changeMainState();
Navigator.pop(context);

@ -63,8 +63,6 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
customerId = custID;
customerGUID = custGUID;
});
print("customer Id is" + customerId);
print("customer GUID is" + customerGUID);
return customerId;
}
@ -74,8 +72,6 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
user = AuthenticatedUser.fromJson(userData);
setState(() {
firstName = user.firstName.toString();
print("this is user" + user.firstName.toString());
print("this is user" + user.firstNameN.toString());
});
} else {
if (userData == null) {

@ -134,20 +134,20 @@ class Signaling {
void registerPeerConnectionListeners() {
peerConnection.onIceCandidate = (RTCIceCandidate candidate){
print(json.encode(candidate.toMap()));
// print(json.encode(candidate.toMap()));
signalR.addIceCandidate(json.encode(candidate.toMap()));
};
peerConnection?.onIceGatheringState = (RTCIceGatheringState state) {
print('ICE gathering state changed: $state');
// print('ICE gathering state changed: $state');
};
peerConnection?.onConnectionState = (RTCPeerConnectionState state) {
print('Connection state change: $state ${state.index}');
// print('Connection state change: $state ${state.index}');
};
peerConnection?.onSignalingState = (RTCSignalingState state) {
print('Signaling state change: $state');
// print('Signaling state change: $state');
};
}
}

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/material.dart';
class CancelOrderService extends BaseService{

@ -28,8 +28,6 @@ class ReviewService extends BaseService {
_reviewList.clear();
response['reviews'].forEach((item) {
_reviewList.add(Review.fromJson(item));
print (response);
print (item['reviewText']);
});
}, onFailure: (String error, int statusCode) {
hasError = true;

@ -50,7 +50,7 @@
// await Future.delayed(Duration(seconds: 2));
// _registerIsolatePort();
// _registerGeofences().then((value) {
// debugPrint(value.toString());
// print(value.toString());
// if(_testTrigger) {
// var events = [GeofenceEvent.enter,GeofenceEvent.exit];
// events.shuffle();
@ -91,9 +91,9 @@
// break;
// }
// await Future.delayed(Duration(milliseconds: 100));
// debugPrint("Geofence: ${zone.description} registered");
// print("Geofence: ${zone.description} registered");
// } else {
// debugPrint("Geofence: ${zone.description} registered");
// print("Geofence: ${zone.description} registered");
// }
// }
// }

@ -318,9 +318,6 @@ class DateUtil {
/// [dateTime] convert DateTime to date formatted
static String getWeekDayMonthDayYearDateFormatted(
DateTime dateTime, String lang) {
// print(dateTime);
// print(dateTime.weekday);
// print(dateTime.weekday.getDayOfWeekEnumValue.value);
if (dateTime != null)
return lang == 'en'
? getWeekDayEnglish(dateTime.weekday) +

@ -83,7 +83,7 @@ class LocationUtils {
callBack(LatLng(location.latitude, location.longitude));
setLocation(Position(latitude: location.latitude, longitude: location.longitude, altitude: location.altitude));
}, onLocationAvailability: (locationAvailability) {
debugPrint("onLocationAvailability: $locationAvailability");
print("onLocationAvailability: $locationAvailability");
}));
}).catchError((error) {
if (error.code == "LOCATION_SETTINGS_NOT_AVAILABLE") {

@ -31,9 +31,6 @@ Future<dynamic> backgroundMessageHandler(dynamic message) async{
_incomingCall(message_.data);
return;
}
print("Background message is received, sending local notification.");
h_push.Push.localNotification({
h_push.HMSLocalNotificationAttr.TITLE: 'Background Message',
h_push.HMSLocalNotificationAttr.MESSAGE: "By: BackgroundMessageHandler"
@ -155,7 +152,6 @@ class PushNotificationHandler{
newMessage(RemoteMessage remoteMessage){
print('RemoteMessage.data:: ${remoteMessage.data}');
if(remoteMessage.data['is_call'] == 'true' || remoteMessage.data['is_call'] == true)
_incomingCall(remoteMessage.data);

@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart';
@ -68,10 +69,8 @@ class Utils {
/// Check The Internet Connection
static Future<bool> checkConnection() async {
ConnectivityResult connectivityResult =
await (Connectivity().checkConnectivity());
if ((connectivityResult == ConnectivityResult.mobile) ||
(connectivityResult == ConnectivityResult.wifi)) {
ConnectivityResult connectivityResult = await (Connectivity().checkConnectivity());
if ((connectivityResult == ConnectivityResult.mobile) || (connectivityResult == ConnectivityResult.wifi)) {
return true;
} else {
return false;
@ -135,19 +134,11 @@ class Utils {
}
static String getAppointmentTransID(int projectID, int clinicID, int appoNo) {
return projectID.toString() +
'-' +
clinicID.toString() +
'-' +
appoNo.toString();
return projectID.toString() + '-' + clinicID.toString() + '-' + appoNo.toString();
}
static String getAdvancePaymentTransID(int projectID, int fileNumber) {
return projectID.toString() +
'-' +
fileNumber.toString() +
'-' +
DateTime.now().millisecondsSinceEpoch.toString();
return projectID.toString() + '-' + fileNumber.toString() + '-' + DateTime.now().millisecondsSinceEpoch.toString();
}
bool validateIDBox(String value, type) {
@ -207,22 +198,14 @@ class Utils {
}
static validEmail(email) {
return RegExp(
r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+")
.hasMatch(email);
return RegExp(r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+").hasMatch(email);
}
static List<Widget> myMedicalList(
{ProjectViewModel projectViewModel,
BuildContext context,
bool isLogin,
count}) {
static List<Widget> myMedicalList({ProjectViewModel projectViewModel, BuildContext context, bool isLogin, count}) {
List<Widget> medical = List();
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(5)
? Navigator.push(context, FadePage(page: MyAppointments()))
: null,
onTap: () => projectViewModel.havePrivilege(5) ? Navigator.push(context, FadePage(page: MyAppointments())) : null,
child: isLogin
? Stack(children: [
Container(
@ -249,11 +232,7 @@ class Utils {
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(),
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 12.0)),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
@ -271,11 +250,7 @@ class Utils {
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(),
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 12.0)),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
@ -302,9 +277,7 @@ class Utils {
}
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(7)
? Navigator.push(context, FadePage(page: RadiologyHomePage()))
: null,
onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).radiology,
imagePath: 'radiology.svg',
@ -314,9 +287,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(12)
? Navigator.push(context, FadePage(page: HomePrescriptionsPage()))
: null,
onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).medicines,
imagePath: 'medicine_prescription.svg',
@ -342,8 +313,7 @@ class Utils {
medical.add(InkWell(
onTap: () {
if (projectViewModel.havePrivilege(48))
Navigator.push(context, FadePage(page: ActiveMedicationsPage()));
if (projectViewModel.havePrivilege(48)) Navigator.push(context, FadePage(page: ActiveMedicationsPage()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).myMedical,
@ -362,17 +332,12 @@ class Utils {
),
)
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myDoctor,
imagePath: 'my_doc.svg',
subTitle: TranslationBase.of(context).myDoctorSubtitle,
isEnable: projectViewModel.havePrivilege(6)),
child:
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14)
? Navigator.push(context, FadePage(page: MyInvoices()))
: null,
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).invoicesList,
imagePath: 'invoice_list.svg',
@ -382,9 +347,18 @@ class Utils {
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14)
? Navigator.push(context, FadePage(page: EyeMeasurementsPage()))
: null,
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: AnicllaryOrders())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).anicllaryOrders,
imagePath: 'assets/images/al-habib_online_payment_service_icon.png',
isPngImage: true,
subTitle: TranslationBase.of(context).myInvoice,
isEnable: projectViewModel.havePrivilege(14),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).eye,
imagePath: 'eye_measurement.svg',
@ -394,9 +368,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(22)
? Navigator.push(context, FadePage(page: InsuranceCard()))
: null,
onTap: () => projectViewModel.havePrivilege(22) ? Navigator.push(context, FadePage(page: InsuranceCard())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).insurance,
imagePath: 'insurance_card.svg',
@ -417,9 +389,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(18)
? Navigator.push(context, FadePage(page: InsuranceApproval()))
: null,
onTap: () => projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).insuranceApproval,
imagePath: 'insurance_approval.svg',
@ -429,9 +399,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(23)
? Navigator.push(context, FadePage(page: AllergiesPage()))
: null,
onTap: () => projectViewModel.havePrivilege(23) ? Navigator.push(context, FadePage(page: AllergiesPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).allergies,
imagePath: 'allergies_diagnosed.svg',
@ -441,9 +409,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(26)
? Navigator.push(context, FadePage(page: MyVaccines()))
: null,
onTap: () => projectViewModel.havePrivilege(26) ? Navigator.push(context, FadePage(page: MyVaccines())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myVaccines,
imagePath: 'vaccine_list.svg',
@ -453,9 +419,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(20)
? Navigator.push(context, FadePage(page: HomeReportPage()))
: null,
onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).medical,
imagePath: 'medical_report.svg',
@ -465,9 +429,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(19)
? Navigator.push(context, FadePage(page: MonthlyReportsPage()))
: null,
onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).monthly,
imagePath: 'monthly_report.svg',
@ -477,9 +439,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(16)
? Navigator.push(context, FadePage(page: PatientSickLeavePage()))
: null,
onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).sick,
imagePath: 'sick_leave.svg',
@ -489,9 +449,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(47)
? Navigator.push(context, FadePage(page: MyBalancePage()))
: null,
onTap: () => projectViewModel.havePrivilege(47) ? Navigator.push(context, FadePage(page: MyBalancePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myBalance,
imagePath: 'balance_credit.svg',
@ -508,9 +466,7 @@ class Utils {
// ));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(24)
? Navigator.push(context, FadePage(page: MyTrackers()))
: null,
onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myTrackers,
imagePath: 'tracker.svg',
@ -520,9 +476,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(30)
? Navigator.push(context, FadePage(page: SmartWatchInstructions()))
: null,
onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).smartWatchesSubtitle,
imagePath: 'smart_watch.svg',
@ -532,14 +486,9 @@ class Utils {
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(28)
? Navigator.push(context, FadePage(page: AskDoctorHomPage()))
: null,
onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).askYourSubtitle,
imagePath: 'ask_doctor.svg',
subTitle: TranslationBase.of(context).askYour,
isEnable: projectViewModel.havePrivilege(28)),
title: TranslationBase.of(context).askYourSubtitle, imagePath: 'ask_doctor.svg', subTitle: TranslationBase.of(context).askYour, isEnable: projectViewModel.havePrivilege(28)),
));
if (projectViewModel.havePrivilege(32) || true) {
@ -549,18 +498,13 @@ class Utils {
if (projectViewModel.isLogin && userData_ != null) {
String patientID = userData_.patientID.toString();
GifLoaderDialogUtils.showMyDialog(context);
projectViewModel
.platformBridge()
.connectHMGInternetWifi(patientID)
.then((value) => {GifLoaderDialogUtils.hideDialog(context)})
.catchError((err) {
projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)}).catchError((err) {
print(err.toString());
});
} else {
AlertDialogBox(
context: context,
confirmMessage:
"Please login with your account first to use this feature",
confirmMessage: "Please login with your account first to use this feature",
okText: "OK",
okFunction: () {
AlertDialogBox.closeAlertDialog(context);
@ -577,9 +521,7 @@ class Utils {
}
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(40)
? launch('whatsapp://send?phone=18885521858&text=')
: null,
onTap: () => projectViewModel.havePrivilege(40) ? launch('whatsapp://send?phone=18885521858&text=') : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).chatbot,
imagePath: 'chatbot.svg',
@ -591,17 +533,11 @@ class Utils {
return medical;
}
static List<Widget> myMedicalListHomePage(
{ProjectViewModel projectViewModel,
BuildContext context,
bool isLogin,
count}) {
static List<Widget> myMedicalListHomePage({ProjectViewModel projectViewModel, BuildContext context, bool isLogin, count}) {
List<Widget> medical = List();
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(5)
? Navigator.push(context, FadePage(page: MyAppointments()))
: null,
onTap: () => projectViewModel.havePrivilege(5) ? Navigator.push(context, FadePage(page: MyAppointments())) : null,
child: isLogin
? Stack(children: [
MedicalProfileItem(
@ -624,11 +560,7 @@ class Utils {
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(),
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 12.0)),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
@ -646,11 +578,7 @@ class Utils {
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(),
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 12.0)),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
@ -677,9 +605,7 @@ class Utils {
}
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(7)
? Navigator.push(context, FadePage(page: RadiologyHomePage()))
: null,
onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).radiology,
imagePath: 'radiology.svg',
@ -689,9 +615,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(12)
? Navigator.push(context, FadePage(page: HomePrescriptionsPage()))
: null,
onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).medicines,
imagePath: 'medicine_prescription.svg',
@ -709,24 +633,19 @@ class Utils {
),
)
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myDoctor,
imagePath: 'my_doc.svg',
subTitle: TranslationBase.of(context).myDoctorSubtitle,
isEnable: projectViewModel.havePrivilege(6)),
child:
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
return medical;
}
static Widget loadNetworkImage(
{@required String url, BoxFit fitting = BoxFit.cover}) {
static Widget loadNetworkImage({@required String url, BoxFit fitting = BoxFit.cover}) {
return CachedNetworkImage(
placeholderFadeInDuration: Duration(milliseconds: 250),
fit: fitting,
imageUrl: url,
placeholder: (context, url) =>
Container(child: Center(child: CircularProgressIndicator())),
placeholder: (context, url) => Container(child: Center(child: CircularProgressIndicator())),
errorWidget: (context, url, error) {
return Icon(
Icons.error,
@ -744,11 +663,7 @@ class Utils {
}
static navigateToCartPage() {
Navigator.pushAndRemoveUntil(
locator<NavigationService>().navigatorKey.currentContext,
MaterialPageRoute(
builder: (context) => LandingPagePharmacy(currentTab: 3)),
(Route<dynamic> r) => false);
Navigator.pushAndRemoveUntil(locator<NavigationService>().navigatorKey.currentContext, MaterialPageRoute(builder: (context) => LandingPagePharmacy(currentTab: 3)), (Route<dynamic> r) => false);
}
static Widget tableColumnTitle(String text, {bool showDivider = true}) {
@ -759,12 +674,7 @@ class Utils {
SizedBox(height: 6),
Text(
text,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.48,
height: 18 / 12),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
SizedBox(height: 5),
if (showDivider)
@ -777,27 +687,16 @@ class Utils {
);
}
static Widget tableColumnValue(String text,
{bool isLast = false,
bool isCapitable = true,
ProjectViewModel mProjectViewModel}) {
ProjectViewModel projectViewModel =
mProjectViewModel ?? Provider.of(AppGlobal.context);
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, ProjectViewModel mProjectViewModel}) {
ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context);
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 12),
Text(
isCapitable && !projectViewModel.isArabic
? text.toLowerCase().capitalizeFirstofEach
: text,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff575757),
letterSpacing: -0.4,
height: 16 / 10),
isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),
if (!isLast)
@ -810,8 +709,7 @@ class Utils {
);
}
static Widget tableColumnValueWithUnderLine(String text,
{bool isLast = false, bool isCapitable = true}) {
static Widget tableColumnValueWithUnderLine(String text, {bool isLast = false, bool isCapitable = true}) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
@ -822,13 +720,7 @@ class Utils {
isCapitable ? text.toLowerCase().capitalizeFirstofEach : text,
maxLines: 1,
minFontSize: 6,
style: TextStyle(
decoration: TextDecoration.underline,
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xffD02127),
letterSpacing: -0.48,
height: 18 / 12),
style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffD02127), letterSpacing: -0.48, height: 18 / 12),
),
SizedBox(height: 10),
if (!isLast)
@ -842,13 +734,7 @@ class Utils {
}
}
Widget applyShadow(
{Color color = Colors.grey,
double shadowOpacity = 0.5,
double spreadRadius = 2,
double blurRadius = 7,
Offset offset = const Offset(2, 2),
@required Widget child}) {
Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}) {
return Container(
decoration: BoxDecoration(
boxShadow: [
@ -865,8 +751,7 @@ Widget applyShadow(
}
Future<AuthenticatedUser> userData() async {
var userData = AuthenticatedUser.fromJson(
await AppSharedPreferences().getObject(MAIN_USER));
var userData = AuthenticatedUser.fromJson(await AppSharedPreferences().getObject(MAIN_USER));
return userData;
}
@ -880,12 +765,9 @@ extension IndexedIterable<E> on Iterable<E> {
openAppStore({String androidPackageName, String iOSAppID}) async {
if (Platform.isAndroid) {
assert(!(androidPackageName == null),
"Should have valid value in androidPackageName parameter");
if ((await FlutterHmsGmsAvailability.isGmsAvailable))
launch("market://details?id=com.ejada.hmg");
if ((await FlutterHmsGmsAvailability.isHmsAvailable))
launch("appmarket://details?id=com.ejada.hmg");
assert(!(androidPackageName == null), "Should have valid value in androidPackageName parameter");
if ((await FlutterHmsGmsAvailability.isGmsAvailable)) launch("market://details?id=com.ejada.hmg");
if ((await FlutterHmsGmsAvailability.isHmsAvailable)) launch("appmarket://details?id=com.ejada.hmg");
} else if (Platform.isIOS) {
assert((iOSAppID == null), "Should have valid value in iOSAppID parameter");
launch("https://itunes.apple.com/kr/app/apple-store/$iOSAppID)");
@ -911,11 +793,7 @@ String labelFrom({@required String className}) {
extension StringExtension on String {
String capitalize() {
return this.splitMapJoin(RegExp(r'\w+'),
onMatch: (m) =>
'${m.group(0)}'.substring(0, 1).toUpperCase() +
'${m.group(0)}'.substring(1).toLowerCase(),
onNonMatch: (n) => ' ');
return this.splitMapJoin(RegExp(r'\w+'), onMatch: (m) => '${m.group(0)}'.substring(0, 1).toUpperCase() + '${m.group(0)}'.substring(1).toLowerCase(), onNonMatch: (n) => ' ');
}
}

@ -101,7 +101,7 @@ class MyInAppBrowser extends InAppBrowser {
// @override
// Future<ShouldOverrideUrlLoadingAction> shouldOverrideUrlLoading(ShouldOverrideUrlLoadingRequest shouldOverrideUrlLoadingRequest) async {
// var url = shouldOverrideUrlLoadingRequest.url;
// debugPrint("redirecting/overriding to: $url");
// print("redirecting/overriding to: $url");
//
// if (paymentType == _PAYMENT_TYPE.PACKAGES && [PACKAGES_PAYMENT_SUCCESS_URL, PACKAGES_PAYMENT_FAIL_URL].contains(url)) {
// isPaymentDone = (url == PACKAGES_PAYMENT_SUCCESS_URL);

Loading…
Cancel
Save