Merge branch 'haroon-new-design' into 'development_new_design_2.0'

Haroon new design

See merge request Cloud_Solution/diplomatic-quarter!447
merge-requests/448/merge
haroon amjad 4 years ago
commit 0eeaa5e301

@ -6,7 +6,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
const MAX_SMALL_SCREEN = 660;
// PACKAGES and OFFERS
const EXA_CART_API_BASE_URL = 'http://10.200.101.75:9000';
const EXA_CART_API_BASE_URL = 'http://10.50.100.217:1010/offersdiscounts'; // http://10.200.101.75:9000
const PACKAGES_CATEGORIES = '/api/categories';
const PACKAGES_PRODUCTS = '/api/products';
const PACKAGES_CUSTOMER = '/api/customers';
@ -16,12 +16,12 @@ const PACKAGES_ORDERS = '/api/orders';
const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// // Pharmacy Production URLs
// const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';
@ -441,11 +441,13 @@ const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/
// HHC RC SERVICES
const HHC_GET_ALL_SERVICES_RC = "rc/api/HHC/getallhhc";
const ADD_HHC_ORDER_RC = "rc/api/HHC/add";
const GET_ALL_HHC_ORDERS_RC = 'rc/api/hhc/list';
// CMC RC SERVICES
const GET_ALL_CMC_SERVICES_RC = 'rc/api/cmc/getallcmc';
const ADD_CMC_ORDER_RC = 'rc/api/cmc/add';
const GET_ALL_CMC_ORDERS_RC = 'rc/api/cmc/list';
const UPDATE_CMC_ORDER_RC = 'rc/api/cmc/update';
// RRT RC SERVICES
const ADD_RRT_ORDER_RC = "rc/api/rrt/add";

@ -1368,7 +1368,7 @@ const Map localizedValues = {
"ar": "تتيح لك هذه الخدمة إجراء استشارة عبر مكالمة فيديو مباشرة مع الطبيب من أي مكان وفي أي وقت"
},
"my-invoice": {"en": "List", "ar": "فواتيري"},
"invoice-list": {"en": "My Invoice", "ar": "فائمة"},
"invoice-list": {"en": "My Invoice", "ar": "قائمة"},
"thisItemIsNotAvailable": {"en": "This item is not available", "ar": "هذا العنصر غير متوفر"},
"beforeAfterImages": {"en": "Before & After Images", "ar": "الصور قبل وبعد"},
"clinic-accept-livecare": {

@ -5,8 +5,8 @@ class GetCMCAllOrdersResponseModel {
bool isOutPatient;
int projectId;
int nearestProjectId;
double longitude;
double latitude;
dynamic longitude;
dynamic latitude;
dynamic appointmentNo;
dynamic dischargeId;
int statusId;
@ -27,7 +27,7 @@ class GetCMCAllOrdersResponseModel {
dynamic paymentStatusText;
String projectName;
String nearestProjectName;
int paymentAmount;
dynamic paymentAmount;
WFOrder wFOrder;
String serviceText;
bool isSentForApproval;
@ -43,8 +43,7 @@ class GetCMCAllOrdersResponseModel {
dynamic approvalStatus;
bool isActive;
int clickButton;
Null orderHistory;
List<Null> procedures;
List<dynamic> procedures;
dynamic pickupLocation;
dynamic dropOffLocation;
dynamic clinicName;
@ -98,7 +97,6 @@ class GetCMCAllOrdersResponseModel {
this.approvalStatus,
this.isActive,
this.clickButton,
this.orderHistory,
this.procedures,
this.pickupLocation,
this.dropOffLocation,
@ -157,7 +155,6 @@ class GetCMCAllOrdersResponseModel {
approvalStatus = json['ApprovalStatus'];
isActive = json['isActive'];
clickButton = json['ClickButton'];
orderHistory = json['OrderHistory'];
pickupLocation = json['PickupLocation'];
dropOffLocation = json['DropOffLocation'];
clinicName = json['clinicName'];
@ -218,7 +215,6 @@ class GetCMCAllOrdersResponseModel {
data['ApprovalStatus'] = this.approvalStatus;
data['isActive'] = this.isActive;
data['ClickButton'] = this.clickButton;
data['OrderHistory'] = this.orderHistory;
data['PickupLocation'] = this.pickupLocation;
data['DropOffLocation'] = this.dropOffLocation;
data['clinicName'] = this.clinicName;
@ -234,7 +230,7 @@ class Orderpayment {
int iD;
int orderId;
dynamic clientRequestId;
int totalAmount;
dynamic totalAmount;
int paymentStatus;
dynamic order;
String created;

@ -71,7 +71,8 @@ class UpdatePresOrderRequestModel {
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['PresOrderID'] = this.presOrderID;
data['Id'] = this.presOrderID;
data['ClickButton'] = 14;
data['PresOrderStatus'] = this.presOrderStatus;
data['EditedBy'] = this.editedBy;
data['RejectionReason'] = this.rejectionReason;

@ -7,7 +7,6 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/Comprehens
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
@ -56,14 +55,9 @@ class CMCService extends BaseService {
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS, onSuccess: (dynamic response, int statusCode) {
cmcAllPresOrdersList.clear();
cmcAllOrderDetail.clear();
response['response'].forEach((data) {
if (data['ServiceID'] == OrderService.Comprehensive_Medical_Checkup.getIdOrderService()) cmcAllPresOrdersList.add(GetCMCAllOrdersResponseModel.fromJson(data));
});
// response['PatientER_GetPatientAllPresOrdersList'].forEach((data) {
// if (data['ServiceID'] == OrderService.Comprehensive_Medical_Checkup.getIdOrderService()) cmcAllPresOrdersList.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
// });
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
@ -77,6 +71,10 @@ class CMCService extends BaseService {
cmcAllPresOrdersList.clear();
cmcAllOrderDetail.clear();
response['response'].forEach((data) {
cmcAllPresOrdersList.add(GetCMCAllOrdersResponseModel.fromJson(data));
});
// response['PatientER_GetPatientAllPresOrdersList'].forEach((data) {
// if (data['ServiceID'] == OrderService.Comprehensive_Medical_Checkup.getIdOrderService()) cmcAllPresOrdersList.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
// });
@ -122,12 +120,22 @@ class CMCService extends BaseService {
}, body: updatePresOrderRequestModel.toJson());
}
Future updateCmcPresOrderRC(UpdatePresOrderRequestModel updatePresOrderRequestModel) async {
hasError = false;
await baseAppClient.post(UPDATE_CMC_ORDER_RC, onSuccess: (dynamic response, int statusCode) {
isOrderUpdated = true;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: updatePresOrderRequestModel.toJson());
}
Future<String> insertCMCOrderRC({CMCInsertPresOrderRequestModel order}) async {
hasError = false;
String reqId = "";
await baseAppClient.post(ADD_CMC_ORDER_RC, onSuccess: (dynamic response, int statusCode) {
isOrderUpdated = true;
reqId = response['RequestNo'].toString();
reqId = response['response'].toString();
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart';
@ -13,7 +14,7 @@ import '../base_service.dart';
class HomeHealthCareService extends BaseService {
List<HHCGetAllServicesResponseModel> hhcAllServicesList = List();
List<GetHHCAllPresOrdersResponseModel> hhcAllPresOrdersList = List();
List<GetCMCAllOrdersResponseModel> hhcAllPresOrdersList = List();
List<GetOrderDetailByOrderIDResponseModel> hhcAllOrderDetail = List();
List<AddressInfo> addressesList = List();
@ -48,14 +49,29 @@ class HomeHealthCareService extends BaseService {
}, body: hHCGetAllServicesRequestModel.toJson());
}
Future getHHCAllPresOrdersRC() async {
GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel = GetHHCAllPresOrdersRequestModel();
hasError = false;
await baseAppClient.post(GET_ALL_HHC_ORDERS_RC, onSuccess: (dynamic response, int statusCode) {
hhcAllPresOrdersList.clear();
hhcAllOrderDetail.clear();
response['response'].forEach((data) {
hhcAllPresOrdersList.add(GetCMCAllOrdersResponseModel.fromJson(data));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getHHCAllPresOrdersRequestModel.toJson());
}
Future getHHCAllPresOrders() async {
GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel = GetHHCAllPresOrdersRequestModel();
hasError = false;
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORD, onSuccess: (dynamic response, int statusCode) {
hhcAllPresOrdersList.clear();
response['PatientER_GetPatientAllPresOrdersList'].forEach((data) {
if (data['ServiceID'] == OrderService.HOME_HEALTH_CARE.getIdOrderService()) hhcAllPresOrdersList.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
});
// response['PatientER_GetPatientAllPresOrdersList'].forEach((data) {
// if (data['ServiceID'] == OrderService.HOME_HEALTH_CARE.getIdOrderService()) hhcAllPresOrdersList.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
// });
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -114,6 +114,9 @@ class BaseAppClient {
}
}
// body['PatientID'] = 1018977;
// body['TokenID'] = "@dm!n";
print("URL : $url");
final jsonBody = json.encode(body);
print(jsonBody);

@ -83,9 +83,24 @@ class FeedbackService extends BaseService {
Future searchFeedback(String countryCode, String phoneNumber, int type, String idNumber) async {
hasError = false;
Map<String, dynamic> body = new Map<String, dynamic>();
body['IdentificationNo'] = idNumber;
if (type == 1) {
body['IdentificationNo'] = 0;
body['PatientID'] = num.tryParse(idNumber);
body['ItemID'] = 0;
} else if (type == 2) {
body['IdentificationNo'] = idNumber;
body['PatientID'] = 0;
body['ItemID'] = 0;
} else {
body['IdentificationNo'] = 0;
body['PatientID'] = 0;
body['ItemID'] = idNumber;
}
body['PatientOutSA'] = countryCode.contains("966") ? 0 : 1;
body['MobileNo'] = countryCode + Utils.getPhoneNumberWithoutZero(phoneNumber);
body['Searching_type'] = "$type";
body['Searching_type'] = type;
if (BASE_URL.contains('uat')) {
body['ForDemo'] = true;
}

@ -67,7 +67,7 @@ class CMCViewModel extends BaseViewModel {
} else {
pendingOrder = _cMCService.cmcAllPresOrdersList.firstWhere((element) => element.statusId == 1 || element.statusId == 2, orElse: () => null);
if (pendingOrder != null) {
await getOrderDetailByOrderID(pendingOrder);
// await getOrderDetailByOrderID(pendingOrder);
setState(ViewState.Idle);
} else {
getCMCAllServices();
@ -77,7 +77,8 @@ class CMCViewModel extends BaseViewModel {
Future updateCmcPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async {
setState(ViewState.BusyLocal);
await _cMCService.updateCmcPresOrder(updatePresOrderRequestModel);
// await _cMCService.updateCmcPresOrder(updatePresOrderRequestModel);
await _cMCService.updateCmcPresOrderRC(updatePresOrderRequestModel);
if (_cMCService.hasError) {
error = _cMCService.error;
setState(ViewState.ErrorLocal);

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart';
@ -24,7 +25,7 @@ class HomeHealthCareViewModel extends BaseViewModel {
List<AddressInfo> get addressesList => _customerAddressesService.addressesList;
List<GetHHCAllPresOrdersResponseModel> get hhcAllPresOrders => _homeHealthCareService.hhcAllPresOrdersList;
List<GetCMCAllOrdersResponseModel> get hhcAllPresOrders => _homeHealthCareService.hhcAllPresOrdersList;
List<GetOrderDetailByOrderIDResponseModel> get hhcAllOrderDetail => _homeHealthCareService.hhcAllOrderDetail;
@ -33,7 +34,7 @@ class HomeHealthCareViewModel extends BaseViewModel {
bool get isOrderUpdated => _homeHealthCareService.isOrderUpdated;
int get orderId => _homeHealthCareService.requestNo;
GetHHCAllPresOrdersResponseModel pendingOrder;
GetCMCAllOrdersResponseModel pendingOrder;
List<PatientERHHCInsertServicesList> patientERHHCInsertServicesList = List();
dynamic get hhcResponse => _homeHealthCareService.hhcResponse;
@ -53,14 +54,14 @@ class HomeHealthCareViewModel extends BaseViewModel {
Future getHHCAllPresOrders() async {
pendingOrder = null;
setState(ViewState.Busy);
await _homeHealthCareService.getHHCAllPresOrders();
await _homeHealthCareService.getHHCAllPresOrdersRC();
if (_homeHealthCareService.hasError) {
error = _homeHealthCareService.error;
setState(ViewState.Error);
} else {
pendingOrder = _homeHealthCareService.hhcAllPresOrdersList.firstWhere((element) => element.status == 1 || element.status == 2, orElse: () => null);
pendingOrder = _homeHealthCareService.hhcAllPresOrdersList.firstWhere((element) => element.statusId == 1 || element.statusId == 2, orElse: () => null);
if (pendingOrder != null) {
await _homeHealthCareService.getOrderDetailByOrderID(pendingOrder.iD);
// await _homeHealthCareService.getOrderDetailByOrderID(pendingOrder.iD);
setState(ViewState.Idle);
} else {
getHHCAllServices();

@ -39,9 +39,10 @@ class BloodPressureViewMode extends BaseViewModel {
});
for (int index = 0; index < bloodPressureService.monthDiabtectResultAverageList.length; index++) {
weighMonthTimeSeriesDataTop.add(TimeSeriesSales3(index, bloodPressureService.monthDiabtectResultAverageList[index].weekDiastolicPressureAverageResult.toDouble()));
weighMonthTimeSeriesDataLow.add(TimeSeriesSales3(index, bloodPressureService.monthDiabtectResultAverageList[index].weekSystolicePressureAverageResult.toDouble()));
// weighMonthTimeSeriesDataTop.add(TimeSeriesSales3("Week " + (index + 1).toString(), bloodPressureService.monthDiabtectResultAverageList[index].weekDiastolicPressureAverageResult.toDouble()));
// weighMonthTimeSeriesDataLow.add(TimeSeriesSales3("Week " + (index + 1).toString(), bloodPressureService.monthDiabtectResultAverageList[index].weekSystolicePressureAverageResult.toDouble()));
weighMonthTimeSeriesDataTop.add(TimeSeriesSales3(bloodPressureService.monthDiabtectResultAverageList[index].weekDesc, bloodPressureService.monthDiabtectResultAverageList[index].weekDiastolicPressureAverageResult.toDouble()));
weighMonthTimeSeriesDataLow.add(TimeSeriesSales3(bloodPressureService.monthDiabtectResultAverageList[index].weekDesc, bloodPressureService.monthDiabtectResultAverageList[index].weekSystolicePressureAverageResult.toDouble()));
}
bloodPressureService.yearDiabtecResultAverageList.forEach((element) {

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'dart:io';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/routes.dart';
@ -14,6 +15,7 @@ import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:in_app_update/in_app_update.dart';
import 'package:provider/provider.dart';
import 'config/size_config.dart';
@ -36,12 +38,27 @@ class MyApp extends StatefulWidget {
}
class _MyApp extends State<MyApp> {
AppUpdateInfo _updateInfo;
Future<void> checkForUpdate() async {
InAppUpdate.checkForUpdate().then((info) {
if (info.updateAvailable) {
InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString()));
}
}).catchError((e) {
print(e.toString());
});
}
@override
void initState() {
// ProjectViewModel projectProvider;
// projectProvider = Provider.of(context);
// var font = projectProvider.isArabic ? 'Cairo' : 'WorkSans';
// Re-enable once going live
// if (Platform.isAndroid) checkForUpdate();
ThemeNotifier(defaultTheme());
super.initState();
}
@ -83,16 +100,14 @@ class _MyApp extends State<MyApp> {
value: RobotProvider().intStream(),
initialData: RobotProvider().setValue({}),
),
ChangeNotifierProvider<CompareList>(
create: (context) => CompareList()),
ChangeNotifierProvider<OrderPreviewViewModel>(
create: (context) => OrderPreviewViewModel()),
ChangeNotifierProvider<CompareList>(create: (context) => CompareList()),
ChangeNotifierProvider<OrderPreviewViewModel>(create: (context) => OrderPreviewViewModel()),
],
child: Consumer<ProjectViewModel>(
builder: (context, projectProvider, child) => MaterialApp(
navigatorObservers: [
GAnalytics.shared.navObserver()
],
// navigatorObservers: [
// GAnalytics.shared.navObserver()
// ],
navigatorKey: locator<NavigationService>().navigatorKey,
showSemanticsDebugger: false,
title: 'Diplomatic Quarter App',

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
@ -11,7 +12,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:provider/provider.dart';
@ -85,13 +86,13 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
_context = context;
ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage(CMCViewModel model, GetOrderDetailByOrderIDResponseModel order) {
void showConfirmMessage(CMCViewModel model, GetCMCAllOrdersResponseModel order) {
showDialog(
context: context,
child: ConfirmCancelOrderDialog(
model: model,
child: ConfirmWithMessageDialog(
message: TranslationBase.of(context).cancelOrderMsg,
onTap: () async {
UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.presOrderID, rejectionReason: "", presOrderStatus: 4, editedBy: 3);
UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.iD, rejectionReason: "", presOrderStatus: 4, editedBy: 3);
Future.delayed(new Duration(milliseconds: 300)).then((value) async {
GifLoaderDialogUtils.showMyDialog(_context);
await model.updateCmcPresOrder(updatePresOrderRequestModel);
@ -108,11 +109,27 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
));
}
// ' ' +
int status = widget.model.pendingOrder != null ? widget.model.pendingOrder.statusId : 0;
String _statusDisp = widget.model.pendingOrder != null ? widget.model.pendingOrder.statusText : "";
Color _color;
if (status == 1) {
//pending
_color = Color(0xffCC9B14);
} else if (status == 2) {
//processing
_color = Color(0xff2E303A);
} else if (status == 3) {
//completed
_color = Color(0xff359846);
} else if (status == 4 || status == 6 || status == 7) {
//cancel // Rejected
_color = Color(0xffD02127);
}
return Scaffold(
body: SafeArea(
child: Container(
child: widget.model.cmcAllOrderDetail.length != 0 && widget.model.pendingOrder != null
child: widget.model.pendingOrder != null
? Column(
children: [
Container(
@ -124,21 +141,21 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
clipBehavior: Clip.antiAlias,
child: Container(
// decoration: containerColorRadiusLeft(Colors.white, 12),
margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 8, right: projectViewModel.isArabic ? 8 : 0),
padding: EdgeInsets.all(12),
// color: Colors.white,
margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0),
padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.zero : Radius.circular(12.0),
topRight: projectViewModel.isArabic ? Radius.circular(12.0) : Radius.zero,
bottomLeft: projectViewModel.isArabic ? Radius.zero : Radius.circular(12.0),
bottomRight: projectViewModel.isArabic ? Radius.circular(12.0) : Radius.zero,
bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
),
),
// clipBehavior: Clip.antiAlias,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Column(
@ -146,69 +163,82 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
// TranslationBase.of(context).OrderStatus +
widget.model.pendingOrder.statusText,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
color: Color(0xffcd9e1b),
fontWeight: FontWeight.w700,
),
_statusDisp,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10),
),
mHeight(12),
SizedBox(height: 6),
Text(
TranslationBase.of(context).requestID + ' ' + widget.model.pendingOrder.iD.toString(),
style: TextStyle(
fontSize: 16,
letterSpacing: -0.48,
fontWeight: FontWeight.w700,
),
'${TranslationBase.of(context).requestID}: ${widget.model.pendingOrder.iD}',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
Text(
TranslationBase.of(context).serviceName,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w500,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).hospital + ": ",
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
Expanded(
child: Text(
// !projectViewModel.isArabic ? order.nearestProjectDescription.trim().toString() : order.nearestProjectDescriptionN.toString(),
widget.model.pendingOrder.projectName.trim().toString(),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
),
),
],
),
Text(
!projectViewModel.isArabic ? widget.model.cmcAllOrderDetail[0].description.toString() : widget.model.cmcAllOrderDetail[0].descriptionN.toString(),
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w700,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).serviceName + ": ",
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
Expanded(
child: Text(
widget.model.pendingOrder.serviceText.trim().toString(),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
),
),
],
),
],
),
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.model.cmcAllOrderDetail[0].createdOn)),
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w700,
),
DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.model.pendingOrder.created)),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
),
mHeight(8),
SecondaryButton(
onTap: () {
showConfirmMessage(widget.model, widget.model.cmcAllOrderDetail[0]);
},
label: TranslationBase.of(context).cancel,
color: Colors.red[900],
small: true,
)
SizedBox(height: 12),
if (widget.model.pendingOrder.statusId == 1 || widget.model.pendingOrder.statusId == 2)
InkWell(
onTap: () {
showConfirmMessage(widget.model, widget.model.pendingOrder);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
decoration: BoxDecoration(
color: Color(0xffD02127),
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.circular(10),
),
child: Text(
TranslationBase.of(context).cancel_nocaps,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
),
),
),
],
),
],
),
),
),
),
)
],
)
: Container(

@ -104,7 +104,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
} else if (status == 3) {
//completed
_color = Color(0xff359846);
} else if (status == 4) {
} else if (status == 4 || status == 6 || status == 7) {
//cancel // Rejected
_color = Color(0xffD02127);
}
@ -178,7 +178,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.created)),
DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(order.created)),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),

@ -44,57 +44,58 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
baseViewModel: widget.model,
body: Column(
children: [
ListView.separated(
physics: BouncingScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.only(left: 21, right: 21, top: 12, bottom: 12),
itemBuilder: (context, index) {
HHCGetAllServicesResponseModel service = widget.model.hhcAllServicesList[index];
return Padding(
padding: const EdgeInsets.only(top: 4, bottom: 4),
child: Row(
children: [
Checkbox(
value: isServiceSelected(num.tryParse(service.serviceID)),
activeColor: Color(0xffD02127),
tristate: false,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: (bool newValue) {
setState(() {
if (!isServiceSelected(num.tryParse(service.serviceID)))
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.add(PatientERHHCInsertServicesList(
recordID: widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length,
serviceID: num.tryParse(service.serviceID),
serviceName: projectViewModel.isArabic ? service.textN : service.text));
else
removeSelected(num.tryParse(service.serviceID));
// widget.patientERInsertPresOrderRequestModel
// isPatientInsured = newValue;
});
}),
SizedBox(width: 6),
Expanded(
child: Text(
projectViewModel.isArabic ? service.textN : service.text.toLowerCase()?.capitalize(),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64),
Expanded(
child: ListView.separated(
physics: BouncingScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.only(left: 21, right: 21, top: 12, bottom: 12),
itemBuilder: (context, index) {
HHCGetAllServicesResponseModel service = widget.model.hhcAllServicesList[index];
return Padding(
padding: const EdgeInsets.only(top: 4, bottom: 4),
child: Row(
children: [
Checkbox(
value: isServiceSelected(num.tryParse(service.serviceID)),
activeColor: Color(0xffD02127),
tristate: false,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: (bool newValue) {
setState(() {
if (!isServiceSelected(num.tryParse(service.serviceID)))
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.add(PatientERHHCInsertServicesList(
recordID: widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length,
serviceID: num.tryParse(service.serviceID),
serviceName: projectViewModel.isArabic ? service.textN : service.text));
else
removeSelected(num.tryParse(service.serviceID));
// widget.patientERInsertPresOrderRequestModel
// isPatientInsured = newValue;
});
}),
SizedBox(width: 6),
Expanded(
child: Text(
projectViewModel.isArabic ? service.textN : service.text.toLowerCase()?.capitalize(),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64),
),
),
),
],
),
);
},
separatorBuilder: (context, index) => Divider(
height: 1,
color: Color(0xffE5E5E5),
),
itemCount: widget.model.hhcAllServicesList.length),
],
),
);
},
separatorBuilder: (context, index) => Divider(
height: 1,
color: Color(0xffE5E5E5),
),
itemCount: widget.model.hhcAllServicesList.length),
),
Container(
color: Colors.white,
padding: EdgeInsets.only(top: 0, bottom: 16, right: 21, left: 21),
margin: EdgeInsets.only(top: 50.0),
margin: EdgeInsets.only(bottom: 50.0),
child: DefaultButton(
TranslationBase.of(context).next,
(this.widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length == 0 || widget.model.state == ViewState.BusyLocal)

@ -147,7 +147,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
(projectViewModel.isArabic ? widget.model.pendingOrder.descriptionN : widget.model.pendingOrder.description),
widget.model.pendingOrder.statusText,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffCC9B14), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 6),
@ -188,11 +188,11 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.model.pendingOrder.createdOn)),
DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.model.pendingOrder.created)),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),
if (widget.model.pendingOrder.status == 1 || widget.model.pendingOrder.status == 2)
if (widget.model.pendingOrder.statusId == 1 || widget.model.pendingOrder.statusId == 2)
InkWell(
onTap: () {
showConfirmMessage(widget.model, widget.model.hhcAllOrderDetail[0]);

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
@ -24,7 +25,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage(HomeHealthCareViewModel model, GetHHCAllPresOrdersResponseModel order) {
void showConfirmMessage(HomeHealthCareViewModel model, GetCMCAllOrdersResponseModel order) {
showDialog(
context: context,
child: ConfirmWithMessageDialog(
@ -75,10 +76,10 @@ class OrdersLogDetailsPage extends StatelessWidget {
padding: EdgeInsets.all(21),
physics: BouncingScrollPhysics(),
itemBuilder: (context, index) {
GetHHCAllPresOrdersResponseModel order = model.hhcAllPresOrders[index];
GetCMCAllOrdersResponseModel order = model.hhcAllPresOrders[index];
int status = order.status;
String _statusDisp = projectViewModel.isArabic ? order.descriptionN : order.description;
int status = order.statusId;
String _statusDisp = order.statusText;
Color _color;
if (status == 1) {
//pending
@ -148,7 +149,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
),
Expanded(
child: Text(
!projectViewModel.isArabic ? order.nearestProjectDescription.trim().toString() : order.nearestProjectDescriptionN.toString(),
order.nearestProjectName.trim().toString(),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
),
),
@ -162,11 +163,11 @@ class OrdersLogDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.createdOn)),
DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(order.created)),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),
if (order.status == 1 || order.status == 2)
if (order.statusId == 1 || order.statusId == 2)
InkWell(
onTap: () {
showConfirmMessage(model, order);

@ -224,7 +224,7 @@ class _TodayPageState extends State<TodayPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).amount,
TranslationBase.of(context).amount_,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,

@ -321,7 +321,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
cancel();
},
child: Text(
TranslationBase.of(context).cancel,
TranslationBase.of(context).cancel_nocaps,
style: TextStyle(
fontSize: 16.0,
letterSpacing: -0.48,

@ -85,18 +85,14 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold(
appBarTitle: TranslationBase
.of(context)
.myFamilyFiles,
appBarTitle: TranslationBase.of(context).myFamilyFiles,
isShowAppBar: widget.isAppbarVisible,
imagesInfo: imagesInfo,
showNewAppBar: true,
showNewAppBarTitle: true,
onTap: widget.isAppbarVisible == false ? widget.onBackClick : null,
icon: "assets/images/new/bottom_nav/family_files.svg",
description: TranslationBase
.of(context)
.familyInfo,
description: TranslationBase.of(context).familyInfo,
body: Column(
children: [
TabBar(
@ -118,35 +114,26 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
tabs: [Text(TranslationBase
.of(context)
.family), Text(TranslationBase
.of(context)
.request)
],
tabs: [Text(TranslationBase.of(context).family), Text(TranslationBase.of(context).request)],
),
Expanded(
child: (user != null && projectViewModel.isLogin)
? TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: [myFamilyDetails(context), myFamilyRequest(context)],
)
physics: BouncingScrollPhysics(),
controller: _tabController,
children: [myFamilyDetails(context), myFamilyRequest(context)],
)
: Container(child: AppText('')),
),
],
),
bottomSheet: Container(
color: Theme
.of(context)
.scaffoldBackgroundColor,
color: Theme.of(context).scaffoldBackgroundColor,
width: double.infinity,
padding: EdgeInsets.all(14),
child: DefaultButton(
TranslationBase
.of(context)
.addFamilyMember,
() async {
TranslationBase.of(context).addFamilyMember,
() async {
Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER_TYPE);
},
),
@ -169,25 +156,21 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
return Padding(padding: EdgeInsets.only(top: 50), child: Text('Loading...'));
default:
if (snapshot.hasError)
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase
.of(context)
.noDataAvailable));
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
else
return ListView.separated(
itemBuilder: (context, index) {
snapshot.data.getAllSharedRecordsByStatusList[index].gender = 2;
if (snapshot.data.getAllSharedRecordsByStatusList[index].status == 3)
return Container(
margin: EdgeInsets.all(5),
decoration: cardRadius(15, elevation: 0, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0xffFDA4B0) : Color(0xff6EA8FF),),
decoration: cardRadius(
15,
elevation: 0,
color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0xffFDA4B0) : Color(0xff6EA8FF),
),
child: Container(
// height: 130,0xffFDA4B0
width: MediaQuery
.of(context)
.size
.width,
// height: 130,0xffFDA4B0
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -196,23 +179,17 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
snapshot.data.getAllSharedRecordsByStatusList[index].patientName
.toLowerCase()
.capitalizeFirstofEach,
fontSize: 22,
snapshot.data.getAllSharedRecordsByStatusList[index].patientName.toLowerCase().capitalizeFirstofEach,
fontSize: 18,
fontWeight: FontWeight.bold,
color: Colors.white,
),
Texts(TranslationBase
.of(context)
.fileNumber + ': ' + snapshot.data.getAllSharedRecordsByStatusList[index].responseID.toString(),
Texts(TranslationBase.of(context).fileNumber + ': ' + snapshot.data.getAllSharedRecordsByStatusList[index].responseID.toString(),
fontSize: 12, color: Colors.white),
Texts(
snapshot.data.getAllSharedRecordsByStatusList[index].age.toString() +
' ' +
TranslationBase
.of(context)
.years +
TranslationBase.of(context).years +
', ' +
snapshot.data.getAllSharedRecordsByStatusList[index].genderDescription,
fontSize: 12,
@ -233,7 +210,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset("assets/images/new-design/switch.svg",
height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white),
height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0Xff5A282E) : Colors.white),
SizedBox(
width: 5,
),
@ -246,10 +223,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
// if (isSwitchUser == true) switchUser(snapshot.data.getAllSharedRecordsByStatusList[index], context);
// },
// ),
Texts(TranslationBase
.of(context)
.switchUser,
color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white,
Texts(TranslationBase.of(context).switchUser,
color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0Xff5A282E) : Colors.white,
fontSize: 12,
fontWeight: FontWeight.w600)
],
@ -268,14 +243,12 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset("assets/images/new-design/delete.svg",
height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white),
height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0Xff5A282E) : Colors.white),
SizedBox(
width: 5,
),
Texts(TranslationBase
.of(context)
.delete,
color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white,
Texts(TranslationBase.of(context).delete,
color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0Xff5A282E) : Colors.white,
fontSize: 12,
fontWeight: FontWeight.w600),
],
@ -302,406 +275,373 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
}
int checkActive(List<GetAllSharedRecordsByStatusList> list) {
return list
.where((o) => o.status == 3)
.toList()
.length;
return list.where((o) => o.status == 3).toList().length;
}
Widget myFamilyRequest(context) {
return //Padding(
// padding: const EdgeInsets.symmetric(horizontal: 10.0),
// child:
SingleChildScrollView(
child: Container(
height: MediaQuery
.of(context)
.size
.height,
margin: EdgeInsets.only(top: 10),
child: Column(
children: <Widget>[
FractionallySizedBox(
widthFactor: 1.0,
child: AppExpandableNotifier(
title: TranslationBase
.of(context)
.userViewRequest,
bodyWidget: FutureBuilder(
future: getUserViewRequest(), // async work
builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return SizedBox();
default:
if (snapshot.hasError)
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase
.of(context)
.noDataAvailable));
else
return ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
itemBuilder: (context, _index) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
// padding: const EdgeInsets.symmetric(horizontal: 10.0),
// child:
SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height,
margin: EdgeInsets.only(top: 10),
child: Column(
children: <Widget>[
FractionallySizedBox(
widthFactor: 1.0,
child: AppExpandableNotifier(
title: TranslationBase.of(context).userViewRequest,
bodyWidget: FutureBuilder(
future: getUserViewRequest(), // async work
builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return SizedBox();
default:
if (snapshot.hasError)
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
else
return ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
itemBuilder: (context, _index) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(width: 1, color: Color(0xffEFEFEF)),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
border: Border.all(width: 1, color: Color(0xffEFEFEF)),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
],
color: Colors.white),
child: Column(
children: [
Column(children: [
Padding(
padding: EdgeInsets.all(10),
child: Row(children: [
Expanded(flex: 3, child: AppText(TranslationBase
.of(context)
.name, fontWeight: FontWeight.w600)),
Expanded(flex: 1, child: AppText(TranslationBase
.of(context)
.allow, fontWeight: FontWeight.w600)),
Expanded(flex: 1, child: AppText(TranslationBase
.of(context)
.reject, fontWeight: FontWeight.w600)),
])),
Padding(
padding: const EdgeInsets.only(left: 10.0, right: 10.0),
child: Divider(color: Colors.black, height: 1.5, thickness: 1.5),
),
Column(
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
return Container(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child: Texts(
result.patientName,
fontWeight: FontWeight.w600,
fontSize: 12,
)),
Expanded(
flex: 1,
child: IconButton(
icon: SvgPicture.asset("assets/images/new-design/allow.svg", height: 22),
onPressed: () {
acceptRemoveRequest(result.iD, 3, context);
},
)),
Expanded(
flex: 1,
child: IconButton(
icon: SvgPicture.asset("assets/images/new-design/reject.svg", height: 22),
color: Colors.white,
onPressed: () {
acceptRemoveRequest(result.iD, 4, context);
},
))
],
));
}).toList())
])
],
));
},
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: 1);
}
},
))),
// RoundedContainer(
// child: ExpansionTile(
// title: Text(
// TranslationBase.of(context).userViewRequest,
// style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, color: Colors.black),
// ),
// children: <Widget>[
// FutureBuilder(
// future: getUserViewRequest(), // async work
// builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
// switch (snapshot.connectionState) {
// case ConnectionState.waiting:
// return Padding(padding: EdgeInsets.only(top: 50), child: Text('Loading....'));
// default:
// if (snapshot.hasError)
// return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
// else
// return Container(
// padding: EdgeInsets.all(15),
// child: Card(
// elevation: 3,
// shape: cardRadius(8),
// child: Column(
// children: [
// Column(children: [
// Padding(
// padding: EdgeInsets.all(10),
// child: Row(children: [
// Expanded(flex: 3, child: AppText(TranslationBase.of(context).name, fontWeight: FontWeight.w600)),
// Expanded(flex: 1, child: AppText(TranslationBase.of(context).allow, fontWeight: FontWeight.w600)),
// Expanded(flex: 1, child: AppText(TranslationBase.of(context).reject, fontWeight: FontWeight.w600)),
// ])),
// Divider(color: Colors.black, height: 1.5, thickness: 1.5),
// Column(
// children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
// return Container(
// padding: EdgeInsets.all(10),
// child: Row(
// children: <Widget>[
// Expanded(
// flex: 3,
// child: Texts(
// result.patientName,
// fontWeight: FontWeight.w600,
// fontSize: 12,
// )),
// Expanded(
// flex: 1,
// child: IconButton(
// icon: Icon(
// Icons.check_circle,
// color: Color(0xff349745),
// ),
// onPressed: () {
// acceptRemoveRequest(result.iD, 3, context);
// },
// )),
// Expanded(
// flex: 1,
// child: IconButton(
// icon: Icon(
// Icons.close,
// color: Colors.red[900],
// ),
// onPressed: () {
// acceptRemoveRequest(result.iD, 4, context);
// },
// ))
// ],
// ));
// }).toList())
// ])
// ],
// )));
// }
// })
// ],
// ),
// ),
SizedBox(height: 15),
FractionallySizedBox(
widthFactor: 1.0,
child: AppExpandableNotifier(
title: TranslationBase
.of(context)
.sentRequest,
bodyWidget: FutureBuilder(
future: getSentRequest(), // async work
builder: (BuildContext context, AsyncSnapshot<GetAllSharedRecordsByStatusResponse> snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return SizedBox();
default:
if (snapshot.hasError)
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase
.of(context)
.noDataAvailable));
else
return ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
itemBuilder: (context, _index) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(width: 1, color: Color(0xffEFEFEF)),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
],
color: Colors.white),
child: Column(
children: [
color: Colors.white),
child: Column(
children: [
Column(children: [
Padding(
padding: EdgeInsets.all(10),
child: Row(children: [
Expanded(flex: 3, child: AppText(TranslationBase
.of(context)
.name, fontWeight: FontWeight.w600)),
Expanded(flex: 1, child: AppText(TranslationBase
.of(context)
.status, fontWeight: FontWeight.w600))
Expanded(flex: 3, child: AppText(TranslationBase.of(context).name, fontWeight: FontWeight.w600)),
Expanded(flex: 1, child: AppText(TranslationBase.of(context).allow, fontWeight: FontWeight.w600)),
Expanded(flex: 1, child: AppText(TranslationBase.of(context).reject, fontWeight: FontWeight.w600)),
])),
Padding(
padding: const EdgeInsets.only(left: 10.0, right: 10.0),
child: Divider(color: Colors.black, height: 1.5, thickness: 1.5),
),
Column(
children: snapshot.data.getAllSharedRecordsByStatusList.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child: Texts(
result.patientName,
fontWeight: FontWeight.w600,
fontSize: 12,
)),
Expanded(
flex: 1,
child: Container(
decoration: cardRadius(10, color: result.status == 3 ? Color(0xff349745) : Color(0xffD02127), elevation: 3,),
child: Padding(
padding: EdgeInsets.all(5),
child: AppText(
result.statusDescription,
color: Colors.white,
textAlign: TextAlign.center,
fontSize: 12,
)))),
],
));
}).toList(),
)
],
));
},
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: 1,
);
}
}))),
SizedBox(
height: 15,
),
FractionallySizedBox(
widthFactor: 1.0,
child: AppExpandableNotifier(
title: TranslationBase
.of(context)
.userView,
bodyWidget: FutureBuilder(
future: getUserViewRequest(), // async work
builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(padding: EdgeInsets.only(top: 50), child: Text(''));
default:
if (snapshot.hasError)
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase
.of(context)
.noDataAvailable));
else
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(width: 1, color: Color(0xffEFEFEF)),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
return Container(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child: Texts(
result.patientName,
fontWeight: FontWeight.w600,
fontSize: 12,
)),
Expanded(
flex: 1,
child: IconButton(
icon: SvgPicture.asset("assets/images/new-design/allow.svg", height: 22),
onPressed: () {
acceptRemoveRequest(result.iD, 3, context);
},
)),
Expanded(
flex: 1,
child: IconButton(
icon: SvgPicture.asset("assets/images/new-design/reject.svg", height: 22),
color: Colors.white,
onPressed: () {
acceptRemoveRequest(result.iD, 4, context);
},
))
],
));
}).toList())
])
],
color: Colors.white),
child: Column(
children: [
Column(children: [
));
},
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: 1);
}
},
))),
// RoundedContainer(
// child: ExpansionTile(
// title: Text(
// TranslationBase.of(context).userViewRequest,
// style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, color: Colors.black),
// ),
// children: <Widget>[
// FutureBuilder(
// future: getUserViewRequest(), // async work
// builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
// switch (snapshot.connectionState) {
// case ConnectionState.waiting:
// return Padding(padding: EdgeInsets.only(top: 50), child: Text('Loading....'));
// default:
// if (snapshot.hasError)
// return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
// else
// return Container(
// padding: EdgeInsets.all(15),
// child: Card(
// elevation: 3,
// shape: cardRadius(8),
// child: Column(
// children: [
// Column(children: [
// Padding(
// padding: EdgeInsets.all(10),
// child: Row(children: [
// Expanded(flex: 3, child: AppText(TranslationBase.of(context).name, fontWeight: FontWeight.w600)),
// Expanded(flex: 1, child: AppText(TranslationBase.of(context).allow, fontWeight: FontWeight.w600)),
// Expanded(flex: 1, child: AppText(TranslationBase.of(context).reject, fontWeight: FontWeight.w600)),
// ])),
// Divider(color: Colors.black, height: 1.5, thickness: 1.5),
// Column(
// children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
// return Container(
// padding: EdgeInsets.all(10),
// child: Row(
// children: <Widget>[
// Expanded(
// flex: 3,
// child: Texts(
// result.patientName,
// fontWeight: FontWeight.w600,
// fontSize: 12,
// )),
// Expanded(
// flex: 1,
// child: IconButton(
// icon: Icon(
// Icons.check_circle,
// color: Color(0xff349745),
// ),
// onPressed: () {
// acceptRemoveRequest(result.iD, 3, context);
// },
// )),
// Expanded(
// flex: 1,
// child: IconButton(
// icon: Icon(
// Icons.close,
// color: Colors.red[900],
// ),
// onPressed: () {
// acceptRemoveRequest(result.iD, 4, context);
// },
// ))
// ],
// ));
// }).toList())
// ])
// ],
// )));
// }
// })
// ],
// ),
// ),
SizedBox(height: 15),
FractionallySizedBox(
widthFactor: 1.0,
child: AppExpandableNotifier(
title: TranslationBase.of(context).sentRequest,
bodyWidget: FutureBuilder(
future: getSentRequest(), // async work
builder: (BuildContext context, AsyncSnapshot<GetAllSharedRecordsByStatusResponse> snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return SizedBox();
default:
if (snapshot.hasError)
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
else
return ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
itemBuilder: (context, _index) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(width: 1, color: Color(0xffEFEFEF)),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
],
color: Colors.white),
child: Column(
children: [
Padding(
padding: EdgeInsets.all(10),
child: Row(children: [
Expanded(
flex: 3,
child: AppText(
TranslationBase
.of(context)
.name,
fontWeight: FontWeight.w600,
)),
Expanded(
flex: 1,
child: AppText(
TranslationBase
.of(context)
.delete,
fontWeight: FontWeight.w600,
textAlign: TextAlign.center,
)),
Expanded(flex: 3, child: AppText(TranslationBase.of(context).name, fontWeight: FontWeight.w600)),
Expanded(flex: 1, child: AppText(TranslationBase.of(context).status, fontWeight: FontWeight.w600))
])),
Padding(
padding: const EdgeInsets.only(left: 10.0, right: 10.0),
child: Divider(color: Colors.black, height: 1.5, thickness: 1.5),
),
Column(
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child: Texts(
result.patientName,
fontWeight: FontWeight.w600,
fontSize: 12,
)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.delete,
color: Colors.red,
),
onPressed: () {
deactivateRequest(result.iD, 5, context);
},
)),
],
));
}).toList())
])
children: snapshot.data.getAllSharedRecordsByStatusList.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child: Texts(
result.patientName,
fontWeight: FontWeight.w600,
fontSize: 12,
)),
Expanded(
flex: 1,
child: Card(
// shape: cardRadius(10),
color: result.status == 3 ? Color(0xff349745) : Color(0xffD02127),
child: Padding(
padding: EdgeInsets.all(5),
child: AppText(
result.statusDescription,
color: Colors.white,
textAlign: TextAlign.center,
fontSize: 12,
)))),
],
));
}).toList(),
)
],
));
},
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: 1,
);
}
}))),
SizedBox(
height: 15,
),
FractionallySizedBox(
widthFactor: 1.0,
child: AppExpandableNotifier(
title: TranslationBase.of(context).userView,
bodyWidget: FutureBuilder(
future: getUserViewRequest(), // async work
builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(padding: EdgeInsets.only(top: 50), child: Text(''));
default:
if (snapshot.hasError)
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
else
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(width: 1, color: Color(0xffEFEFEF)),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
],
));
}
})))
],
),
color: Colors.white),
child: Column(
children: [
Column(children: [
Padding(
padding: EdgeInsets.all(10),
child: Row(children: [
Expanded(
flex: 3,
child: AppText(
TranslationBase.of(context).name,
fontWeight: FontWeight.w600,
)),
Expanded(
flex: 1,
child: AppText(
TranslationBase.of(context).delete,
fontWeight: FontWeight.w600,
textAlign: TextAlign.center,
)),
])),
Padding(
padding: const EdgeInsets.only(left: 10.0, right: 10.0),
child: Divider(color: Colors.black, height: 1.5, thickness: 1.5),
),
Column(
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child: Texts(
result.patientName,
fontWeight: FontWeight.w600,
fontSize: 12,
)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.delete,
color: Colors.red,
),
onPressed: () {
deactivateRequest(result.iD, 5, context);
},
)),
],
));
}).toList())
])
],
));
}
})))
],
),
);
),
);
}
String isAvailable() {
if (isVaiable == false) {
this.isVaiable = true;
return TranslationBase
.of(context)
.noDataAvailable;
return TranslationBase.of(context).noDataAvailable;
} else {
return "";
}
@ -728,15 +668,9 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
deleteFamily(family, context) {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: TranslationBase
.of(context)
.removeFamilyMember,
okText: TranslationBase
.of(context)
.confirm,
cancelText: TranslationBase
.of(context)
.cancel_nocaps,
confirmMessage: TranslationBase.of(context).removeFamilyMember,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {ConfirmDialog.closeAlertDialog(context), removeFamily(family, context)},
cancelFunction: () => {});
dialog.showAlertDialog(context);
@ -797,29 +731,26 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
_vitalSignService.heightCm = "";
_vitalSignService.weightKg = "";
await authenticatedUserObject.getUser(getUser: true);
Provider
.of<ProjectViewModel>(AppGlobal.context, listen: false)
.user = authenticatedUserObject.user;
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).user = authenticatedUserObject.user;
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).setUser(authenticatedUserObject.user);
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) =>
{
getToDoCount(),
GifLoaderDialogUtils.hideDialog(context),
if (appointmentRateViewModel.isHaveAppointmentNotRate)
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: RateAppointmentDoctor(),
),
(r) => false)
}
else
{Navigator.pushAndRemoveUntil(AppGlobal.context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false)}
})
.then((value) => {
getToDoCount(),
GifLoaderDialogUtils.hideDialog(context),
if (appointmentRateViewModel.isHaveAppointmentNotRate)
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: RateAppointmentDoctor(),
),
(r) => false)
}
else
{Navigator.pushAndRemoveUntil(AppGlobal.context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false)}
})
.catchError((err) {
print(err);
// Utils.hideProgressDialog();

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notificatio
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/gif_loader_dialog_utils.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';
@ -15,25 +16,6 @@ import 'package:provider/provider.dart';
// ignore: must_be_immutable
class NotificationsPage extends StatelessWidget {
getDateForm(String date) {
DateTime d = DateUtil.convertStringToDate(date);
String monthName = DateUtil.getMonth(d.month).toString();
TimeOfDay timeOfDay = TimeOfDay(hour: d.hour, minute: d.minute);
String minute = timeOfDay.minute < 10 ? timeOfDay.minute.toString().padLeft(2, '0') : timeOfDay.minute.toString();
String hour = '${timeOfDay.hourOfPeriod}:$minute';
if (timeOfDay.period == DayPeriod.am) {
hour = hour + "AM";
} else {
{
hour = hour + "PM";
}
}
//DayPeriod.am
return monthName + ',${d.day},${d.year}, $hour';
}
int currentIndex = 0;
@override
@ -41,7 +23,11 @@ class NotificationsPage extends StatelessWidget {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<NotificationViewModel>(
onModelReady: (model) {
GetNotificationsRequestModel getNotificationsRequestModel = new GetNotificationsRequestModel(currentPage: currentIndex, pagingSize: 14, notificationStatusID: 2);
GetNotificationsRequestModel getNotificationsRequestModel =
new GetNotificationsRequestModel(
currentPage: currentIndex,
pagingSize: 14,
notificationStatusID: 2);
model.getNotifications(getNotificationsRequestModel, context);
},
@ -53,6 +39,28 @@ class NotificationsPage extends StatelessWidget {
baseViewModel: model,
body: ListView.separated(
itemBuilder: (context, index) {
if (index == model.notifications.length) {
return InkWell(
onTap: () async {
GifLoaderDialogUtils.showMyDialog(context);
currentIndex++;
GetNotificationsRequestModel
getNotificationsRequestModel =
new GetNotificationsRequestModel(
currentPage: currentIndex,
pagingSize: 14,
notificationStatusID: 2);
await model.getNotifications(
getNotificationsRequestModel, context);
GifLoaderDialogUtils.hideDialog(context);
},
child: Center(
child: Image.asset('assets/images/notf.png'),
),
);
}
return InkWell(
onTap: () async {
if (!model.notifications[index].isRead) {
@ -69,17 +77,23 @@ class NotificationsPage extends StatelessWidget {
width: double.infinity,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: model.notifications[index].isRead ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor.withOpacity(0.05),
color: model.notifications[index].isRead
? Theme.of(context).scaffoldBackgroundColor
: CustomColors.accentColor.withOpacity(0.05),
border: projectViewModel.isArabic
? Border(
right: BorderSide(
color: model.notifications[index].isRead ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor,
color: model.notifications[index].isRead
? Theme.of(context).scaffoldBackgroundColor
: CustomColors.accentColor,
width: 5.0,
),
)
: Border(
left: BorderSide(
color: model.notifications[index].isRead ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor,
color: model.notifications[index].isRead
? Theme.of(context).scaffoldBackgroundColor
: CustomColors.accentColor,
width: 5.0,
),
),
@ -92,16 +106,25 @@ class NotificationsPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.notifications[index].createdOn)) +
Texts(DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(model
.notifications[index].createdOn)) +
" " +
DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(model.notifications[index].createdOn), false)),
DateUtil.formatDateToTimeLang(
DateUtil.convertStringToDate(model
.notifications[index].createdOn),
false)),
SizedBox(
height: 5,
),
Row(
children: [
Expanded(child: Texts(model.notifications[index].message)),
if (model.notifications[index].messageType == "image")
Expanded(
child: Texts(model
.notifications[index].message)),
if (model
.notifications[index].messageType ==
"image")
Icon(
FontAwesomeIcons.images,
color: CustomColors.grey,
@ -130,7 +153,7 @@ class NotificationsPage extends StatelessWidget {
],
);
},
itemCount: model.notifications.length)),
itemCount: model.notifications.length + 1)),
// ListView(
// children: model.notifications
// .map(

@ -65,8 +65,8 @@ class _PaymentMethodState extends State<PaymentMethod> {
),
mWidth(12),
Container(
height: 60.0,
width: 60,
height: 70.0,
width: 70.0,
padding: EdgeInsets.all(7.0),
child: Image.asset("assets/images/new/payment/Mada.png"),
),

@ -33,7 +33,11 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<FeedbackViewModel>(
onModelReady: (model) => model.getCOC(),
allowAny: true,
onModelReady: (model) {
model.cOCItemList.clear();
if (projectViewModel.isLogin) model.getCOC();
},
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
isShowDecPage: false,
@ -160,6 +164,7 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
countryCode = value;
});
}),
if (model.cOCItemList.length > 0) listData(model.cOCItemList, projectViewModel.isArabic, false),
],
),
),
@ -178,9 +183,7 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
Future.delayed(Duration(seconds: 1), () {
AppToast.showErrorToast(message: model.error);
});
} else {
listData(model.cOCItemList, projectViewModel.isArabic, false);
}
} else {}
});
},
disabledColor: Colors.grey,

@ -31,7 +31,11 @@ class ConfirmPaymentPage extends StatefulWidget {
final String selectedPaymentMethod;
AuthenticatedUser authenticatedUser;
ConfirmPaymentPage({this.advanceModel, this.patientInfoAndMobileNumber, this.selectedPaymentMethod, this.authenticatedUser});
ConfirmPaymentPage(
{this.advanceModel,
this.patientInfoAndMobileNumber,
this.selectedPaymentMethod,
this.authenticatedUser});
@override
_ConfirmPaymentPageState createState() => _ConfirmPaymentPageState();
@ -47,12 +51,16 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
void submit(MyBalanceViewModel model, code) {
final activationCode = code;
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
model.checkActivationCodeForAdvancePayment(activationCode: activationCode).then((value) {
model
.checkActivationCodeForAdvancePayment(activationCode: activationCode)
.then((value) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
Navigator.pop(context, true);
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
AppoitmentAllHistoryResultList appo =
new AppoitmentAllHistoryResultList();
appo.projectID = widget.patientInfoAndMobileNumber.projectID;
openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null);
openPayment(widget.selectedPaymentMethod, widget.authenticatedUser,
double.parse(widget.advanceModel.amount), null);
});
}
@ -70,22 +78,6 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
Navigator.pop(context),
},
).displayDialog(context);
// showDialog(
// context: context,
// barrierDismissible: false,
// child: ConfirmSMSDialog(
// phoneNumber: patientInfoAndMobileNumber.mobileNumber,
// ),
// ).then((value) {
// print("dialog dismissed");
// print(value);
// if (value != null && value) {
// AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
// appo.projectID = patientInfoAndMobileNumber.projectID;
// openPayment(selectedPaymentMethod, authenticatedUser, double.parse(advanceModel.amount), null);
// }
// });
}
return BaseView<MyBalanceViewModel>(
@ -120,11 +112,13 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
Container(
height: 100.0,
padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45,
child: widget.selectedPaymentMethod == "ApplePay" ? SvgPicture.asset(getImagePath(widget.selectedPaymentMethod)) : Image.asset(getImagePath(widget.selectedPaymentMethod)),
width: MediaQuery.of(context).size.width * 0.30,
child: Image.asset(
getImagePath(widget.selectedPaymentMethod)),
),
Text(
'${widget.advanceModel.amount} SAR',
'${widget.advanceModel.amount} ' +
TranslationBase.of(context).sar,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w900,
@ -153,7 +147,8 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
margin: EdgeInsets.all(3),
child: NewTextFields(
hintText: TranslationBase.of(context).name,
initialValue: widget.patientInfoAndMobileNumber.firstName,
initialValue:
widget.patientInfoAndMobileNumber.firstName,
isEnabled: false,
),
),
@ -173,7 +168,11 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
),
NewTextFields(
hintText: TranslationBase.of(context).depositorName,
initialValue: model.user.firstName + " " + model.user.middleName + " " + model.user.lastName,
initialValue: model.user.firstName +
" " +
model.user.middleName +
" " +
model.user.lastName,
isEnabled: false,
),
SizedBox(
@ -198,9 +197,14 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
TranslationBase.of(context).confirm.toUpperCase(),
() {
GifLoaderDialogUtils.showMyDialog(context);
model.sendActivationCodeForAdvancePayment(patientID: int.parse(widget.advanceModel.fileNumber), projectID: widget.advanceModel.hospitalsModel.iD).then((value) {
model
.sendActivationCodeForAdvancePayment(
patientID: int.parse(widget.advanceModel.fileNumber),
projectID: widget.advanceModel.hospitalsModel.iD)
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(model);
if (model.state != ViewState.ErrorLocal &&
model.state != ViewState.Error) showSMSDialog(model);
});
},
),
@ -213,35 +217,54 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
String getImagePath(String paymentMethod) {
switch (paymentMethod) {
case "MADA":
return 'assets/images/new-design/mada.png';
return 'assets/images/new/payment/Mada.png';
break;
case "SADAD":
return 'assets/images/new-design/sadad.png';
break;
case "VISA":
return 'assets/images/new-design/visa.png';
return 'assets/images/new/payment/visa.png';
break;
case "MASTERCARD":
return 'assets/images/new-design/mastercard.png';
return 'assets/images/new/payment/Mastercard.png';
break;
case "Installment":
return 'assets/images/new-design/installment.png';
return 'assets/images/new/payment/installments.png';
break;
case "ApplePay":
return 'assets/images/new-design/applepay.svg';
return 'assets/images/new/payment/Apple_Pay.png';
break;
}
return 'assets/images/new-design/mada.png';
}
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser,
double amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(
onExitCallback: onBrowserExit,
appo: appo,
onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(widget.advanceModel.hospitalsModel.iD, int.parse(widget.advanceModel.fileNumber));
transID = Utils.getAdvancePaymentTransID(
widget.advanceModel.hospitalsModel.iD,
int.parse(widget.advanceModel.fileNumber));
browser.openPaymentBrowser(amount, "Advance Payment", transID, widget.advanceModel.hospitalsModel.iD.toString(), widget.advanceModel.email, paymentMethod,
widget.patientInfoAndMobileNumber.patientType, widget.advanceModel.patientName, widget.advanceModel.fileNumber, authenticatedUser, browser, false, "3", "");
browser.openPaymentBrowser(
amount,
"Advance Payment",
transID,
widget.advanceModel.hospitalsModel.iD.toString(),
widget.advanceModel.email,
paymentMethod,
widget.patientInfoAndMobileNumber.patientType,
widget.advanceModel.patientName,
widget.advanceModel.fileNumber,
authenticatedUser,
browser,
false,
"3",
"");
}
onBrowserLoadStart(String url) {
@ -293,11 +316,23 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
service.HIS_createAdvancePayment(appo, widget.advanceModel.hospitalsModel.iD.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], widget.patientInfoAndMobileNumber.patientType,
widget.advanceModel.patientName, widget.advanceModel.fileNumber, AppGlobal.context)
service.HIS_createAdvancePayment(
appo,
widget.advanceModel.hospitalsModel.iD.toString(),
res['Amount'],
res['Fort_id'],
res['PaymentMethod'],
widget.patientInfoAndMobileNumber.patientType,
widget.advanceModel.patientName,
widget.advanceModel.fileNumber,
AppGlobal.context)
.then((res) {
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, 0, appo);
addAdvancedNumberRequest(
res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference,
0,
appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);
@ -305,9 +340,13 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
});
}
addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo) {
addAdvancedNumberRequest(String advanceNumber, String paymentReference,
dynamic appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) {
service
.addAdvancedNumberRequest(
advanceNumber, paymentReference, appointmentID, AppGlobal.context)
.then((res) {
print(res);
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
navigateToHome(AppGlobal.context);

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';

@ -27,12 +27,13 @@ class BloodPressureMonthlyPage extends StatelessWidget {
Container(
margin: EdgeInsets.only(top: 12, left: 8, right: 8),
color: Colors.white,
child: MonthCurvedChartBloodPressure(
child:
MonthCurvedChartBloodPressure(
horizontalInterval: 20.0,
title: TranslationBase.of(context).bloodPressure,
timeSeries1: model.weighMonthTimeSeriesDataTop.isEmpty ? [TimeSeriesSales3(0, 0.0)] : model.weighMonthTimeSeriesDataTop,
timeSeries2: model.weighMonthTimeSeriesDataLow.isEmpty ? [TimeSeriesSales3(0, 0.0)] : model.weighMonthTimeSeriesDataLow,
indexes: model.weightWeekTimeSeriesDataLow.length ~/ 5.5,
indexes: model.weighMonthTimeSeriesDataLow.length ~/ 5.5,
),
),
SizedBox(
@ -87,7 +88,7 @@ class BloodPressureMonthlyPage extends StatelessWidget {
Utils.tableColumnTitle(TranslationBase.of(context).date),
Utils.tableColumnTitle(TranslationBase.of(context).time),
Utils.tableColumnTitle(TranslationBase.of(context).arm),
Utils.tableColumnTitle(TranslationBase.of(context).sysdias),
Utils.tableColumnTitle(TranslationBase.of(context).value),
],
),
);

@ -2,6 +2,7 @@ import "package:collection/collection.dart";
import 'package:diplomaticquarterapp/core/viewModels/medical/blood_pressure_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -28,9 +29,7 @@ class BloodPressureYearPage extends StatelessWidget {
Container(
margin: EdgeInsets.only(top: 12, left: 8, right: 8),
color: Colors.white,
child: CurvedChartBloodPressure(
horizontalInterval: 3.0,
// model.weightWeekTimeSeriesDataLow.length==1 ?1 :20.0,
child: LineChartCurvedBloodPressure(
title: TranslationBase.of(context).bloodPressure,
timeSeries1: model.weightYearTimeSeriesDataTop.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightYearTimeSeriesDataTop,
timeSeries2: model.weightYearTimeSeriesDataLow.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightYearTimeSeriesDataLow,
@ -85,7 +84,7 @@ class BloodPressureYearPage extends StatelessWidget {
Utils.tableColumnTitle(TranslationBase.of(context).date),
Utils.tableColumnTitle(TranslationBase.of(context).time),
Utils.tableColumnTitle(TranslationBase.of(context).arm),
Utils.tableColumnTitle(TranslationBase.of(context).sysdias),
Utils.tableColumnTitle(TranslationBase.of(context).value),
],
),
);

@ -12,8 +12,7 @@ class MonthCurvedChartBloodPressure extends StatelessWidget {
final int indexes;
final double horizontalInterval;
MonthCurvedChartBloodPressure(
{this.title, this.timeSeries1, this.indexes, this.timeSeries2, this.horizontalInterval = 20.0});
MonthCurvedChartBloodPressure({this.title, this.timeSeries1, this.indexes, this.timeSeries2, this.horizontalInterval = 20.0});
List<int> xAxixs = List();
List<double> yAxixs = List();
@ -38,8 +37,7 @@ class MonthCurvedChartBloodPressure extends StatelessWidget {
),
Text(
title,
style: TextStyle(
color: Colors.black, fontSize: 15, letterSpacing: 2),
style: TextStyle(color: Colors.black, fontSize: 15, letterSpacing: 2),
textAlign: TextAlign.center,
),
SizedBox(
@ -47,8 +45,7 @@ class MonthCurvedChartBloodPressure extends StatelessWidget {
),
Expanded(
child: Padding(
padding:
const EdgeInsets.only(right: 18.0, left: 16.0, top: 15),
padding: const EdgeInsets.only(right: 18.0, left: 16.0, top: 15),
child: LineChart(
sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250),
@ -67,9 +64,7 @@ class MonthCurvedChartBloodPressure extends StatelessWidget {
Container(
width: 20,
height: 20,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Theme.of(context).primaryColor),
decoration: BoxDecoration(shape: BoxShape.rectangle, color: Theme.of(context).primaryColor),
),
SizedBox(
width: 5,
@ -85,8 +80,7 @@ class MonthCurvedChartBloodPressure extends StatelessWidget {
Container(
width: 20,
height: 20,
decoration: BoxDecoration(
shape: BoxShape.rectangle, color: secondaryColor),
decoration: BoxDecoration(shape: BoxShape.rectangle, color: secondaryColor),
),
SizedBox(
width: 5,
@ -122,8 +116,7 @@ class MonthCurvedChartBloodPressure extends StatelessWidget {
touchCallback: (LineTouchResponse touchResponse) {},
handleBuiltInTouches: true,
),
gridData: FlGridData(
show: true, drawVerticalLine: true, drawHorizontalLine: true),
gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true, horizontalInterval: 14, verticalInterval: 14),
titlesData: FlTitlesData(
bottomTitles: SideTitles(
showTitles: true,
@ -133,12 +126,17 @@ class MonthCurvedChartBloodPressure extends StatelessWidget {
),
margin: 22,
getTitles: (value) {
return '';
return timeSeries1[value.toInt()].time;
// return '';
},
),
leftTitles: SideTitles(
showTitles: true,
interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200,
interval: getMaxY() - getMinY() <= 500
? 10
: getMaxY() - getMinY() <= 1000
? 30
: 40,
getTextStyles: (value) => const TextStyle(
color: Colors.black,
@ -227,7 +225,7 @@ class MonthCurvedChartBloodPressure extends StatelessWidget {
spots: spots,
isCurved: true,
colors: [Colors.red],
barWidth: 5,
barWidth: 1.5,
isStrokeCapRound: true,
dotData: FlDotData(
show: false,
@ -240,7 +238,7 @@ class MonthCurvedChartBloodPressure extends StatelessWidget {
spots: spots2,
isCurved: true,
colors: [Theme.of(context).primaryColor],
barWidth: 5,
barWidth: 1.5,
isStrokeCapRound: true,
dotData: FlDotData(
show: false,

@ -146,7 +146,7 @@ class Utils {
}
String loginIDPattern(loginType) {
var length = loginType == 1 ? 10 : 6;
var length = loginType == 1 ? 10 : 4;
return "([0-9]{" + length.toString() + "})";
}

@ -70,7 +70,7 @@ class TimeSeriesSales2 {
TimeSeriesSales2(this.time, this.sales);
}
class TimeSeriesSales3 {
final int time;
final dynamic time;
final double sales;
TimeSeriesSales3(this.time, this.sales);

@ -137,7 +137,7 @@ class ShowChart extends StatelessWidget {
fontWeight: FontWeight.bold,
fontSize: 10,
),
interval: null,
interval: _fetchLeftTileInterval(),
margin: 12,
),
),
@ -177,6 +177,11 @@ class ShowChart extends StatelessWidget {
minY -= increasingY.abs();
}
double _fetchLeftTileInterval() {
final interval = ((lastY - intialY) / 5).toDouble();
return interval < 1.0 ? 1.0 : interval;
}
double getMaxY() {
maxY = 0;
timeSeries.forEach((element) {

@ -46,7 +46,7 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
tableRow.add(
TableRow(
children: [
Utils.tableColumnValue(DateUtil.formatDateToDate(DateUtil.convertStringToDate(labOrderResultList[i].verifiedOnDateTime), false), isLast: i == (labOrderResultList.length - 1)),
Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(labOrderResultList[i].verifiedOnDateTime)), isLast: i == (labOrderResultList.length - 1)),
Utils.tableColumnValue(labOrderResultList[i].resultValue, isLast: i == (labOrderResultList.length - 1)),
],
),

@ -19,6 +19,7 @@ import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doct
import 'package:diplomaticquarterapp/pages/webRTC/call_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
@ -35,7 +36,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import '../../config/size_config.dart';
import '../../locator.dart';
import 'drawer_item_widget.dart';
@ -46,10 +47,10 @@ class AppDrawer extends StatefulWidget {
}
class _AppDrawerState extends State<AppDrawer> {
@override
void initState() {
super.initState();
checkUserData();
}

@ -229,46 +229,49 @@ class _MobileNo extends State<MobileNo> {
),
],
),
Container(
padding: EdgeInsets.all(5),
decoration: BoxDecoration(color: Colors.white, border: Border.all(color: Colors.grey), borderRadius: BorderRadius.circular(10)),
child: Row(children: <Widget>[
Expanded(
flex: 1,
child: Icon(
Icons.phone,
color: secondaryColor,
Directionality(
textDirection: TextDirection.ltr,
child: Container(
padding: EdgeInsets.all(5),
decoration: BoxDecoration(color: Colors.white, border: Border.all(color: Colors.grey), borderRadius: BorderRadius.circular(10)),
child: Row(children: <Widget>[
Expanded(
flex: 1,
child: Icon(
Icons.phone,
color: secondaryColor,
),
),
),
Expanded(
flex: 1,
child: Text(
countryCode,
overflow: TextOverflow.clip,
Expanded(
flex: 1,
child: Text(
countryCode,
overflow: TextOverflow.clip,
),
),
),
Expanded(
flex: 4,
child: Container(
margin: widget.margin != null ? EdgeInsets.all(widget.margin) : EdgeInsets.only(top: widget.marginTop, right: widget.marginRight, bottom: widget.marginBottom, left: widget.marginLeft),
child: TextField(
controller: widget.controller,
keyboardType: TextInputType.number,
maxLength: 10,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.allow(RegExp("[0-9]")),
],
// maxLengthEnforced: true,
// onChanged: (value) {
// widget.controller.text = countryCode;
// },
onChanged: (value) => widget.onNumberChange(value),
Expanded(
flex: 4,
child: Container(
margin: widget.margin != null ? EdgeInsets.all(widget.margin) : EdgeInsets.only(top: widget.marginTop, right: widget.marginRight, bottom: widget.marginBottom, left: widget.marginLeft),
child: TextField(
controller: widget.controller,
keyboardType: TextInputType.number,
maxLength: 10,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.allow(RegExp("[0-9]")),
],
// maxLengthEnforced: true,
// onChanged: (value) {
// widget.controller.text = countryCode;
// },
onChanged: (value) => widget.onNumberChange(value),
decoration: InputDecoration(counterText: "", border: InputBorder.none, hintText: '5xxxxxxxx'),
decoration: InputDecoration(counterText: "", border: InputBorder.none, hintText: '5xxxxxxxx'),
),
),
),
)
]),
)
]),
),
)
]),
);

@ -2,7 +2,7 @@ name: diplomaticquarterapp
description: A new Flutter application.
version: 1.0.4+5
version: 4.3.5+1
environment:
sdk: ">=2.9.0 <3.0.0"
@ -32,7 +32,7 @@ dependencies:
#chart
fl_chart: ^0.12.1
fl_chart: ^0.12.3
# Permissions
permission_handler: ^5.0.0+hotfix.3
@ -187,6 +187,8 @@ dependencies:
speech_to_text:
path: speech_to_text
in_app_update: ^1.1.15
badges: ^1.1.4
# open_settings: ^2.0.1
# Dep by Zohaib

Loading…
Cancel
Save