Merge branch 'development' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan-patientapp

merge-requests/378/head
Sultan Khan 3 years ago
commit 4325bd3448

@ -0,0 +1,85 @@
[
{
"id": 1,
"questionEN": "Is the test intended for travel?",
"questionAR": "هل تجري التحليل بغرض السفر؟",
"ans": 2
},
{
"id": 2,
"questionEN": "Coming from outside KSA within last 2 weeks?",
"questionAR": "هل قدمت من خارج المملكة خلال الأسبوعين الماضيين؟",
"ans": 2
},
{
"id": 3,
"questionEN": "Do you currently have fever?",
"questionAR": "هل تعاني حاليا من حرارة؟",
"ans": 2
},
{
"id": 4,
"questionEN": "Did you have fever in last 2 weeks?",
"questionAR": "هل عانيت من حرارة في الأسبوعين الماضيين؟",
"ans": 2
},
{
"id": 5,
"questionEN": "Do you have a sore throat?",
"questionAR": "هل لديك التهاب في الحلق؟",
"ans": 2
},
{
"id": 6,
"questionEN": "Do you have a runny nose?",
"questionAR": "هل لديك سيلان بالأنف؟"
},
{
"id": 7,
"questionEN": "Do you have a cough?",
"questionAR": "هل لديك سعال؟",
"ans": 2
},
{
"id": 8,
"questionEN": "Do you have shortness of breath?",
"questionAR": "هل تعانين من ضيق في التنفس؟",
"ans": 2
},
{
"id": 9,
"questionEN": "Do you have nausea?",
"questionAR": "هل تعانين من غثيان؟",
"ans": 2
},
{
"id": 10,
"questionEN": "Do you have vomiting?",
"questionAR": "هل تعاني من القيء؟",
"ans": 2
},
{
"id": 11,
"questionEN": "Do you have a headache?",
"questionAR": "هل تعاني من صداع في الرأس؟",
"ans": 2
},
{
"id": 12,
"questionEN": "Do you have muscle pain?",
"questionAR": "هل تعانين من آلام عضلية؟",
"ans": 2
},
{
"id": 13,
"questionEN": "Do you have joint pain?",
"questionAR": "هل تعانين من آلام المفاصل؟",
"ans": 2
},
{
"id": 14,
"questionEN": "Do you have diarrhea?",
"questionAR": "هل لديك اسهال؟",
"ans": 2
}
]

@ -1 +1 @@
269226e53e3ba1b1460fd3df51f89f77
e52eba3667a38bec777870899c15ae7d

@ -277,6 +277,11 @@ PODS:
- Flutter
- file_picker_web (0.0.1):
- Flutter
- Firebase/Analytics (6.33.0):
- Firebase/Core
- Firebase/Core (6.33.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 6.8.3)
- Firebase/CoreOnly (6.33.0):
- FirebaseCore (= 6.10.3)
- Firebase/Firestore (6.33.0):
@ -285,6 +290,13 @@ PODS:
- Firebase/Messaging (6.33.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 4.7.0)
- firebase_analytics (6.3.0):
- Firebase/Analytics (~> 6.33.0)
- Firebase/CoreOnly (~> 6.33.0)
- firebase_core
- Flutter
- firebase_analytics_web (0.1.0):
- Flutter
- firebase_core (0.5.3):
- Firebase/CoreOnly (~> 6.33.0)
- Flutter
@ -295,6 +307,15 @@ PODS:
- Firebase/Messaging (~> 6.33.0)
- firebase_core
- Flutter
- FirebaseAnalytics (6.8.3):
- FirebaseCore (~> 6.10)
- FirebaseInstallations (~> 1.6)
- GoogleAppMeasurement (= 6.8.3)
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- GoogleUtilities/MethodSwizzler (~> 6.7)
- GoogleUtilities/Network (~> 6.7)
- "GoogleUtilities/NSData+zlib (~> 6.7)"
- nanopb (~> 1.30906.0)
- FirebaseCore (6.10.3):
- FirebaseCoreDiagnostics (~> 1.6)
- GoogleUtilities/Environment (~> 6.7)
@ -352,11 +373,17 @@ PODS:
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- geolocator (6.1.9):
- geolocator (6.2.0):
- Flutter
- google_maps_flutter (0.0.1):
- Flutter
- GoogleMaps (< 3.10)
- GoogleAppMeasurement (6.8.3):
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- GoogleUtilities/MethodSwizzler (~> 6.7)
- GoogleUtilities/Network (~> 6.7)
- "GoogleUtilities/NSData+zlib (~> 6.7)"
- nanopb (~> 1.30906.0)
- GoogleDataTransport (7.5.1):
- nanopb (~> 1.30906.0)
- GoogleMaps (3.9.0):
@ -372,6 +399,8 @@ PODS:
- PromisesObjC (~> 1.2)
- GoogleUtilities/Logger (6.7.2):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (6.7.2):
- GoogleUtilities/Logger
- GoogleUtilities/Network (6.7.2):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
@ -435,6 +464,8 @@ PODS:
- nanopb/encode (1.30906.0)
- native_device_orientation (0.0.1):
- Flutter
- nfc_in_flutter (1.0.0):
- Flutter
- NVActivityIndicatorView (5.1.1):
- NVActivityIndicatorView/Base (= 5.1.1)
- NVActivityIndicatorView/Base (5.1.1)
@ -446,7 +477,7 @@ PODS:
- Flutter
- path_provider_windows (0.0.1):
- Flutter
- "permission_handler (5.0.1+1)":
- "permission_handler (5.1.0+2)":
- Flutter
- PromisesObjC (1.2.11)
- Protobuf (3.13.0)
@ -477,9 +508,9 @@ PODS:
- SwiftyGif (5.4.0)
- TOCropViewController (2.5.5)
- Try (2.1.1)
- "twilio_programmable_video (0.5.0+4)":
- "twilio_programmable_video (0.6.4+1)":
- Flutter
- TwilioVideo (~> 3.4)
- TwilioVideo (~> 3.7)
- TwilioVideo (3.8.0)
- url_launcher (0.0.1):
- Flutter
@ -518,6 +549,8 @@ DEPENDENCIES:
- device_info (from `.symlinks/plugins/device_info/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- file_picker_web (from `.symlinks/plugins/file_picker_web/ios`)
- firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)
- firebase_analytics_web (from `.symlinks/plugins/firebase_analytics_web/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_core_web (from `.symlinks/plugins/firebase_core_web/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
@ -542,6 +575,7 @@ DEPENDENCIES:
- map_launcher (from `.symlinks/plugins/map_launcher/ios`)
- maps_launcher (from `.symlinks/plugins/maps_launcher/ios`)
- native_device_orientation (from `.symlinks/plugins/native_device_orientation/ios`)
- nfc_in_flutter (from `.symlinks/plugins/nfc_in_flutter/ios`)
- NVActivityIndicatorView
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
@ -578,6 +612,7 @@ SPEC REPOS:
- DKImagePickerController
- DKPhotoGallery
- Firebase
- FirebaseAnalytics
- FirebaseCore
- FirebaseCoreDiagnostics
- FirebaseFirestore
@ -585,6 +620,7 @@ SPEC REPOS:
- FirebaseInstanceID
- FirebaseMessaging
- FMDB
- GoogleAppMeasurement
- GoogleDataTransport
- GoogleMaps
- GoogleUtilities
@ -626,6 +662,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/file_picker/ios"
file_picker_web:
:path: ".symlinks/plugins/file_picker_web/ios"
firebase_analytics:
:path: ".symlinks/plugins/firebase_analytics/ios"
firebase_analytics_web:
:path: ".symlinks/plugins/firebase_analytics_web/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
firebase_core_web:
@ -674,6 +714,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/maps_launcher/ios"
native_device_orientation:
:path: ".symlinks/plugins/native_device_orientation/ios"
nfc_in_flutter:
:path: ".symlinks/plugins/nfc_in_flutter/ios"
path_provider:
:path: ".symlinks/plugins/path_provider/ios"
path_provider_linux:
@ -746,9 +788,12 @@ SPEC CHECKSUMS:
file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1
file_picker_web: 37b10786e88885124fac99dc899866e78a132ef3
Firebase: 8db6f2d1b2c5e2984efba4949a145875a8f65fe5
firebase_analytics: 36a619088c46224900829f14f4daa71585693a6f
firebase_analytics_web: 7d539061ea4af07563a0e21044af89cab70efec0
firebase_core: 5d6a02f3d85acd5f8321c2d6d62877626a670659
firebase_core_web: d501d8b946b60c8af265428ce483b0fff5ad52d1
firebase_messaging: 0aea2cd5885b65e19ede58ee3507f485c992cc75
FirebaseAnalytics: 5dd088bd2e67bb9d13dbf792d1164ceaf3052193
FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd
FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1
FirebaseFirestore: adff4877869ca91a11250cc0989a6cd56bad163f
@ -764,8 +809,9 @@ SPEC CHECKSUMS:
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
flutter_tts: 0f492aab6accf87059b72354fcb4ba934304771d
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
geolocator: 057a0c63a43e9c5296d8ad845a3ac8e6df23d899
geolocator: f5e3de65e241caba7ce3e8a618803387bda73384
google_maps_flutter: c7f9c73576de1fbe152a227bfd6e6c4ae8088619
GoogleAppMeasurement: 966e88df9d19c15715137bb2ddaf52373f111436
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
GoogleMaps: 4b5346bddfe6911bb89155d43c903020170523ac
GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
@ -785,12 +831,13 @@ SPEC CHECKSUMS:
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
native_device_orientation: e24d00be281de72996640885d80e706142707660
nfc_in_flutter: c656fbfb1ec5b9d021da87b0c87629d62fd5264d
NVActivityIndicatorView: 1f6c5687f1171810aa27a3296814dc2d7dec3667
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0
path_provider_windows: a2b81600c677ac1959367280991971cb9a1edb3b
permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
PromisesObjC: 8c196f5a328c2cba3e74624585467a557dcb482f
Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
@ -807,7 +854,7 @@ SPEC CHECKSUMS:
SwiftyGif: 5d4af95df24caf1c570dbbcb32a3b8a0763bc6d7
TOCropViewController: da59f531f8ac8a94ef6d6c0fc34009350f9e8bfe
Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96
twilio_programmable_video: 6a41593640f3d86af60b22541fd457b22deaae7f
twilio_programmable_video: ce33772ea8275b413c0ab5c5aa2e35f9da2d4066
TwilioVideo: c13a51ceca375e91620eb7578d2573c90cf53b46
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0
@ -822,6 +869,6 @@ SPEC CHECKSUMS:
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
wifi: d7d77c94109e36c4175d845f0a5964eadba71060
PODFILE CHECKSUM: ac5efa1ac3c9555d0008dc18004313c84746da62
PODFILE CHECKSUM: 900f7dc480de5b961c031ed418407e0e40ed455c
COCOAPODS: 1.10.0.rc.1
COCOAPODS: 1.10.1

@ -220,6 +220,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
EFDAD5E1235DCA1DB6187148 /* [CP] Embed Pods Frameworks */,
29B24CD65FDFD6111DD04897 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@ -305,6 +306,23 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
29B24CD65FDFD6111DD04897 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;

@ -127,11 +127,14 @@ const INSERT_ER_INERT_PRES_ORDER =
/// ER RRT
const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation';
const GET_ALL_TRANSPORTATIONS_RC = 'rc/api/Transportation/getalltransportation';
const GET_ALL_RRT_QUESTIONS =
'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions';
const GET_RRT_SERVICE_PRICE =
'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice';
const INSERT_TRANSPORTATION_ORDER_RC = "rc/api/Transportation/add";
///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';

File diff suppressed because it is too large Load Diff

@ -8,7 +8,7 @@ class PatientER {
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
dynamic patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
@ -164,7 +164,7 @@ class PatientER {
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['PatientID'] = this.patientID.toString();
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;

@ -1,79 +1,56 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class PatientERTransportationMethod {
dynamic id;
DateTime createDate;
DateTime lastEditDate;
dynamic createdBy;
dynamic lastEditBy;
bool isActive;
String title;
String titleAR;
int id;
String serviceID;
int orderServiceID;
String text;
String textN;
dynamic price;
dynamic isDefault;
dynamic visibility;
dynamic durationId;
String description;
String descriptionAR;
dynamic totalPrice;
dynamic vAT;
dynamic priceVAT;
dynamic priceTotal;
bool isEnabled;
int orderId;
int quantity;
PatientERTransportationMethod(
{
this.id,
this.createDate,
this.lastEditDate,
this.createdBy,
this.lastEditBy,
this.isActive,
this.title,
this.titleAR,
{this.id,
this.serviceID,
this.orderServiceID,
this.text,
this.textN,
this.price,
this.isDefault,
this.visibility,
this.durationId,
this.description,
this.descriptionAR,
this.totalPrice,
this.vAT});
this.priceVAT,
this.priceTotal,
this.isEnabled,
this.orderId,
this.quantity});
PatientERTransportationMethod.fromJson(
Map<String, dynamic> json) {
id = json['Id'];
createDate = DateUtil.convertStringToDate(json['CreateDate']);
lastEditDate = DateUtil.convertStringToDate(json['LastEditDate']);
createdBy = json['CreatedBy'];
lastEditBy = json['LastEditBy'];
isActive = json['IsActive'];
title = json['Title'];
titleAR = json['TitleAR'];
price = json['Price'];
isDefault = json['isDefault'];
visibility = json['Visibility'];
durationId = json['DurationId'];
description = json['Description'];
descriptionAR = json['DescriptionAR'];
totalPrice = json['TotalPrice'];
vAT = json['VAT'];
PatientERTransportationMethod.fromJson(Map<String, dynamic> json) {
id = json['id'];
serviceID = json['serviceID'];
orderServiceID = json['orderServiceID'];
text = json['text'];
textN = json['textN'];
price = json['price'];
priceVAT = json['priceVAT'];
priceTotal = json['priceTotal'];
isEnabled = json['isEnabled'];
orderId = json['orderId'];
quantity = json['quantity'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Id'] = this.id;
data['CreateDate'] = this.createDate;
data['LastEditDate'] = this.lastEditDate;
data['CreatedBy'] = this.createdBy;
data['LastEditBy'] = this.lastEditBy;
data['IsActive'] = this.isActive;
data['Title'] = this.title;
data['TitleAR'] = this.titleAR;
data['Price'] = this.price;
data['isDefault'] = this.isDefault;
data['Visibility'] = this.visibility;
data['DurationId'] = this.durationId;
data['Description'] = this.description;
data['DescriptionAR'] = this.descriptionAR;
data['TotalPrice'] = this.totalPrice;
data['VAT'] = this.vAT;
data['id'] = this.id;
data['serviceID'] = this.serviceID;
data['orderServiceID'] = this.orderServiceID;
data['text'] = this.text;
data['textN'] = this.textN;
data['price'] = this.price;
data['priceVAT'] = this.priceVAT;
data['priceTotal'] = this.priceTotal;
data['isEnabled'] = this.isEnabled;
data['orderId'] = this.orderId;
data['quantity'] = this.quantity;
return data;
}
}
}

@ -118,7 +118,8 @@ class BaseAppClient {
}
print("URL : $url");
print("Body : ${json.encode(body)}");
final jsonBody = json.encode(body);
print(jsonBody);
if (await Utils.checkConnection()) {
final response = await http.post(url.trim(), body: json.encode(body), headers: headers);

@ -1,11 +1,11 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:flutter/cupertino.dart';
import '../base_service.dart';
class AmService extends BaseService {
@ -22,16 +22,27 @@ class AmService extends BaseService {
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
body['IdentificationNo'] = user.patientIdentificationNo;
await baseAppClient.post(GET_AMBULANCE_REQUEST,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.get(
GET_ALL_TRANSPORTATIONS_RC + "?patientID=" + user.patientID.toString(),
isExternal: false, onSuccess: (dynamic response, int statusCode) {
amModelList.clear();
response['PatientER_RRT_GetAllTransportationMethodList'].forEach((item) {
response['data']['transportationservices'].forEach((item) {
amModelList.add(PatientERTransportationMethod.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
});
// await baseAppClient.post(GET_AMBULANCE_REQUEST,
// onSuccess: (dynamic response, int statusCode) {
// amModelList.clear();
// response['PatientER_RRT_GetAllTransportationMethodList'].forEach((item) {
// amModelList.add(PatientERTransportationMethod.fromJson(item));
// });
// }, onFailure: (String error, int statusCode) {
// hasError = true;
// super.error = error;
// }, body: body);
}
Future getPatientAllPresOrdersList() async {
@ -85,9 +96,8 @@ class AmService extends BaseService {
body['PresOrderStatus'] = OrderService.AMBULANCE.getIdOrderService();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(UPDATE_PRESS_ORDER,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
@ -96,10 +106,9 @@ class AmService extends BaseService {
Future insertERPressOrder({@required PatientER patientER}) async {
hasError = false;
await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
await baseAppClient.post(INSERT_TRANSPORTATION_ORDER_RC,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patientER.toJson());

@ -40,6 +40,7 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
return AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
baseViewModel: widget.model,
body: SingleChildScrollView(
physics: ScrollPhysics(),

@ -65,6 +65,7 @@ class _NewCMCStepThreePageState extends State<NewCMCStepThreePage> {
return AppScaffold(
isShowDecPage: false,
baseViewModel: widget.model,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(

@ -71,6 +71,7 @@ class _NewCMCStepTowPageState extends State<NewCMCStepTowPage> {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
isShowBottomNavBar: false,
body: Stack(
children: [
PlacePicker(

@ -51,6 +51,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
return AppScaffold(
isShowAppBar: false,
baseViewModel: model,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -93,6 +93,7 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
onModelReady: (model) => model.getRelationTypes(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -52,6 +52,7 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
return BaseView<EReferralViewModel>(
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -60,6 +60,7 @@ class _NewEReferralStepTowPageState extends State<NewEReferralStepTowPage> {
onModelReady: (model) => model.getAllCities(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -38,6 +38,7 @@ class _EReferralPageState extends State<EReferralPage>
return BaseView<EReferralViewModel>(
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).ereferral,
description: TranslationBase.of(context).eReferralInfo,
imagesInfo: [

@ -47,6 +47,7 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
onModelReady: (model) => model.getAllCities(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -52,6 +52,7 @@ class _NewHomeHealthCareStepOnePageState
return AppScaffold(
isShowAppBar: false,
baseViewModel: widget.model,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -71,6 +71,7 @@ class _NewHomeHealthCareStepThreePageState
return AppScaffold(
isShowDecPage: false,
baseViewModel: widget.model,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(

@ -74,6 +74,7 @@ class _NewHomeHealthCareStepTowPageState
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
isShowBottomNavBar: false,
body: Stack(
children: [
PlacePicker(

@ -1,69 +0,0 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'home_health_care_page.dart';
class HomeHealthCareIndexPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).serviceInformation,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
TranslationBase.of(context).homeHealthCare,
fontWeight: FontWeight.normal,
fontSize: 25,
color: Color(0xff60686b),
),
SizedBox(
height: 12,
),
Texts(
TranslationBase.of(context).homeHealthCareText,
fontWeight: FontWeight.normal,
fontSize: 17,
),
SizedBox(
height: 22,
),
Center(
child: Image.asset(
'assets/images/AlHabibMedicalService/Wifi-AR.png')),
SizedBox(
height: 77,
),
],
)),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
onTap: () => Navigator.push(
context,
FadePage(
page: HomeHealthCarePage(),
),
),
label: TranslationBase.of(context).loginRegister,
textColor: Theme.of(context).backgroundColor),
),
],
),
));
}
}

@ -51,6 +51,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
return AppScaffold(
isShowAppBar: false,
baseViewModel: model,
isShowBottomNavBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -169,7 +169,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.push(
context,
FadePage(
page: MedicalProfilePage(),
page: MedicalProfilePage(isFromAllServicePage: true),
),
);
},

@ -13,6 +13,7 @@ class H2OPageIndexPage extends StatelessWidget {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
//isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).serviceInformation,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),

@ -48,6 +48,7 @@ class _H2OPageState extends State<H2OPage> with SingleTickerProviderStateMixin {
onModelReady: (model) => model.getUserDetail(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).waterTracker,
showHomeAppBarIcon: false,
baseViewModel: model,

@ -19,6 +19,8 @@ class MonthPage extends StatelessWidget {
onModelReady: (model) => model.getUserProgressForMonthData(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).h2o,
baseViewModel: model,
body: Padding(

@ -22,6 +22,7 @@ class TodayPage extends StatelessWidget {
onModelReady: (model) => model.getUserProgressForTodayData(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).h2o,
baseViewModel: model,
body: SingleChildScrollView(

@ -19,6 +19,7 @@ class WeekPage extends StatelessWidget {
onModelReady: (model) => model.getUserProgressForWeekData(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).h2o,
baseViewModel: model,
body: Padding(

@ -32,6 +32,8 @@ class _BookingOptionsState extends State<BookingOptions> {
return AppScaffold(
isShowAppBar: widget.isAppbar,
isShowDecPage: false,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).bookAppo,
body: Container(
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),

@ -68,6 +68,7 @@ class _DoctorProfileState extends State<DoctorProfile>
return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true,
isShowBottomNavBar: false,
isShowDecPage: false,
bottomSheet: showFooterButton
? Container(

@ -76,13 +76,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
});
},
),
Text(TranslationBase.of(context).nearestAppo,
style: TextStyle(fontSize: 16.0, letterSpacing: 0.9)),
Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 16.0, letterSpacing: 0.9)),
],
),
widget.clnicIds != null &&
widget.clnicIds.length > 1 &&
isLoaded == true
widget.clnicIds != null && widget.clnicIds.length > 1 && isLoaded == true
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: clinicsList.map<Widget>((result) {
@ -95,14 +92,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
if (!isDentalSelectedAndSupported()) {
projectDropdownValue = "";
getDoctorsList(context);
}
} else {}
});
},
title: Text(result.clinicDescription,
style: TextStyle(
fontSize: 14.0,
color: Colors.grey[700],
letterSpacing: 1.0))));
title: Text(result.clinicDescription, style: TextStyle(fontSize: 14.0, color: Colors.grey[700], letterSpacing: 1.0))));
}).toList())
: Container(
height: 60.0,
@ -123,25 +116,11 @@ class _SearchByClinicState extends State<SearchByClinic> {
value: dropdownValue,
items: clinicsList.map((item) {
return new DropdownMenuItem<String>(
value: item.clinicID.toString() +
"-" +
item.isLiveCareClinicAndOnline.toString() +
"-" +
item.liveCareClinicID.toString() +
"-" +
item.liveCareServiceID.toString(),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(item.clinicDescription),
item.isLiveCareClinicAndOnline
? SvgPicture.asset(
'assets/images/new-design/video_icon_green_right.svg',
height: 15,
width: 15,
fit: BoxFit.cover)
: Container(),
]),
value: item.clinicID.toString() + "-" + item.isLiveCareClinicAndOnline.toString() + "-" + item.liveCareClinicID.toString() + "-" + item.liveCareServiceID.toString(),
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Text(item.clinicDescription),
item.isLiveCareClinicAndOnline ? SvgPicture.asset('assets/images/new-design/video_icon_green_right.svg', height: 15, width: 15, fit: BoxFit.cover) : Container(),
]),
);
}).toList(),
onChanged: (newValue) {
@ -151,13 +130,14 @@ class _SearchByClinicState extends State<SearchByClinic> {
if (!isDentalSelectedAndSupported() && !nearestAppo) {
projectDropdownValue = "";
getDoctorsList(context);
} else {
print("Dental");
}
});
},
),
)),
isDentalSelectedAndSupported() == true ||
(nearestAppo && isProjectLoaded)
isDentalSelectedAndSupported() == true || (nearestAppo && isProjectLoaded)
? Container(
height: 60.0,
decoration: BoxDecoration(
@ -196,9 +176,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
}
bool isDentalSelectedAndSupported() {
return dropdownValue != "" &&
(dropdownValue == "17") &&
isMobileAppDentalAllow;
if (dropdownValue != null)
return dropdownValue != "" && (dropdownValue.split("-")[0] == "17") && isMobileAppDentalAllow;
else
return false;
}
getClinicsList() {
@ -245,9 +226,9 @@ class _SearchByClinicState extends State<SearchByClinic> {
// TODO Mosa_REMARk to come back later
getDoctorsList(BuildContext context) {
SearchInfo searchInfo = new SearchInfo();
if (dropdownValue == "17") {
if (dropdownValue.split("-")[0] == "17") {
searchInfo.ProjectID = int.parse(projectDropdownValue);
searchInfo.ClinicID = int.parse(dropdownValue);
searchInfo.ClinicID = int.parse(dropdownValue.split("-")[0]);
searchInfo.date = DateTime.now();
navigateToDentalComplaints(context, searchInfo);
@ -258,10 +239,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
Navigator.push(
context,
FadePage(
page: LiveCareBookAppointment(
clinicName: "Family Medicine",
liveCareClinicID: dropdownValue.split("-")[2],
liveCareServiceID: dropdownValue.split("-")[3]),
page: LiveCareBookAppointment(clinicName: "Family Medicine", liveCareClinicID: dropdownValue.split("-")[2], liveCareServiceID: dropdownValue.split("-")[3]),
),
).then((value) {
print(value);
@ -285,17 +263,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
List<String> arrDistance = [];
List<String> result;
int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List();
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
DoctorsListService service = new DoctorsListService();
service
.getDoctorsList(
int.parse(dropdownValue.split("-")[0]),
projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0,
nearestAppo,
context)
.then((res) {
service.getDoctorsList(int.parse(dropdownValue.split("-")[0]), projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, nearestAppo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
@ -305,27 +276,17 @@ class _SearchByClinicState extends State<SearchByClinic> {
doctorsList.add(new DoctorList.fromJson(v));
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
.toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList
.add(element);
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
} else {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.projectName,
distanceInKMs:
element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
}
});
} else {}
@ -333,8 +294,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
result = LinkedHashSet<String>.from(arr).toList();
numAll = result.length;
navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
@ -345,8 +305,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
});
}
Future navigateToDentalComplaints(
BuildContext context, SearchInfo searchInfo) async {
Future navigateToDentalComplaints(BuildContext context, SearchInfo searchInfo) async {
Navigator.push(
context,
FadePage(
@ -355,20 +314,9 @@ class _SearchByClinicState extends State<SearchByClinic> {
);
}
Future navigateToSearchResults(
context,
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
isProjectLoaded = false;
Navigator.push(
context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
doctorsList: docList,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)))
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)))
.then((value) {
getProjectsList();
});
@ -377,9 +325,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
filterClinic() {
setState(() {
if (widget.clnicIds != null && widget.clnicIds.length > 0) {
clinicsList = clinicsList
.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1)
.toList();
clinicsList = clinicsList.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1).toList();
isLoaded = true;
}
});

@ -41,6 +41,7 @@ class _LiveChatPageState extends State<LiveChatPage>
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
isShowBottomNavBar: false,
imagesInfo: imagesInfo,
title: TranslationBase.of(context).liveChat,
description: TranslationBase.of(context).infoChat,

@ -39,6 +39,7 @@ class _FindUsPageState extends State<FindUsPage>
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
appBarTitle: 'Locations',
baseViewModel: model,
body: Scaffold(

@ -0,0 +1,165 @@
import 'dart:collection';
import 'dart:convert';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'covid-payment-details.dart';
class CovidDirveThruQuestions extends StatefulWidget{
final String projectId;
final List<CovidTestProceduresResponse> proceduresList;
CovidDirveThruQuestions({@required this.projectId, @required this.proceduresList});
@override
CovidDirveThruQuestionsState createState() => CovidDirveThruQuestionsState();
}
class CovidDirveThruQuestionsState extends State<CovidDirveThruQuestions>{
List qa;
@override
void initState() {
super.initState();
qa = getQuestionsFromJson();
}
TranslationBase localize;
@override
Widget build(BuildContext context) {
localize = TranslationBase.of(context);
var isArabic = localize.isArabic();
return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true,
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(20),
child: Text(localize.covidSelectProcedure, style: TextStyle(fontSize: 17, letterSpacing: 1, fontWeight: FontWeight.bold)),
),
Expanded(
child: ListView.separated(
padding: EdgeInsets.symmetric(horizontal: 20),
itemCount: qa.length,
itemBuilder: (ctx, idx){
var obj = qa[idx];
var qtext = isArabic ? obj["questionAR"] : obj["questionEN"];
return Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(qtext, style: TextStyle(fontSize: 15, letterSpacing: 1.5)),
Row(
children: [
Radio<int>(
value: 1,
groupValue: obj["ans"],
onChanged: (newValue){
setState(() {
obj["ans"] = newValue;
});
}
),
Text(localize.yes),
],
),
Row(
children: [
Radio<int>(
value: 0,
groupValue: obj["ans"],
onChanged: (newValue){
setState(() {
obj["ans"] = newValue;
});
}
),
Text(localize.no),
],
)
],
),
);
},
separatorBuilder: (ctx, idx) => Divider(height: 0.25, color: Colors.grey.withOpacity(0.5)),
)
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
child: FractionallySizedBox(
widthFactor: 1,
child: MaterialButton(
height: 50,
color: Theme.of(context).appBarTheme.color,
disabledColor: Theme.of(context).appBarTheme.color.withOpacity(0.25),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ),
child: Text(localize.next, style: TextStyle(color: Colors.white, fontSize: 13, letterSpacing: 1),),
onPressed: next
),
),
),
],
)
);
}
next() async{
bool all = true;
qa.forEach((element) {
all = all && (element["ans"] == 1 || element["ans"] == 0);
});
if(all)
getPaymentInfo(context,widget.projectId);
else
AppToast.showErrorToast(message: localize.pleaseSelectAllQuestionToContinue);
}
List getQuestionsFromJson(){
var questionsJson =
"""
[{"id":1,"questionEN":"Is the test intended for travel?","questionAR":"هل تجري التحليل بغرض السفر؟","ans":2},{"id":2,"questionEN":"Coming from outside KSA within last 2 weeks?","questionAR":"هل قدمت من خارج المملكة خلال الأسبوعين الماضيين؟","ans":2},{"id":3,"questionEN":"Do you currently have fever?","questionAR":"هل تعاني حاليا من حرارة؟","ans":2},{"id":4,"questionEN":"Did you have fever in last 2 weeks?","questionAR":"هل عانيت من حرارة في الأسبوعين الماضيين؟","ans":2},{"id":5,"questionEN":"Do you have a sore throat?","questionAR":"هل لديك التهاب في الحلق؟","ans":2},{"id":6,"questionEN":"Do you have a runny nose?","questionAR":"هل لديك سيلان بالأنف؟"},{"id":7,"questionEN":"Do you have a cough?","questionAR":"هل لديك سعال؟","ans":2},{"id":8,"questionEN":"Do you have shortness of breath?","questionAR":"هل تعانين من ضيق في التنفس؟","ans":2},{"id":9,"questionEN":"Do you have nausea?","questionAR":"هل تعانين من غثيان؟","ans":2},{"id":10,"questionEN":"Do you have vomiting?","questionAR":"هل تعاني من القيء؟","ans":2},{"id":11,"questionEN":"Do you have a headache?","questionAR":"هل تعاني من صداع في الرأس؟","ans":2},{"id":12,"questionEN":"Do you have muscle pain?","questionAR":"هل تعانين من آلام عضلية؟","ans":2},{"id":13,"questionEN":"Do you have joint pain?","questionAR":"هل تعانين من آلام المفاصل؟","ans":2},{"id":14,"questionEN":"Do you have diarrhea?","questionAR":"هل لديك اسهال؟","ans":2}]""";
var map = json.decode(questionsJson) as List;
return map;
}
getPaymentInfo(BuildContext context, String projectID) {
CovidDriveThruService service = new CovidDriveThruService();
CovidPaymentInfoResponse covidPaymentInfoResponse =
new CovidPaymentInfoResponse();
GifLoaderDialogUtils.showMyDialog(context);
service.getCovidPaymentInformation(context, int.parse(projectID), widget.proceduresList[0].procedureID)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
// setState(() {
// covidPaymentInfoResponse =
// CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
// });
Navigator.push(
context,
FadePage(
page: CovidPaymentDetails(
covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID),
proceduresList: widget.proceduresList,
)));
} else {}
}).catchError((err) {
print(err);
});
}
}

@ -16,6 +16,8 @@ import 'package:maps_launcher/maps_launcher.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'covid-dirvethru-questions.dart';
class CovidDrivethruLocation extends StatefulWidget {
@override
_CovidDrivethruLocationState createState() => _CovidDrivethruLocationState();
@ -36,9 +38,6 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
@override
void initState() {
WidgetsBinding.instance
.addPostFrameCallback((_) => getProjectsList(context));
imagesInfo.add(
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png',
@ -270,7 +269,9 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
next() {
if (isLocationSelected) {
getPaymentInfo(context, projectID);
Navigator.push(
context,
FadePage(page: CovidDirveThruQuestions(projectId: projectID, proceduresList: proceduresList,)));
} else {
Utils.showErrorToast(
"Please select address from the dropdown menu to continue");
@ -353,6 +354,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
service.getCovidProjectsList(context).then((res) {
projectsList.clear();
if (res['MessageStatus'] == 1) {
setState(() {
res['List_COVID19_ProjectDriveThroughTestingCenter'].forEach((v) {

@ -38,7 +38,10 @@ import 'package:provider/provider.dart';
class MyFamily extends StatefulWidget {
final bool isAppbarVisible;
MyFamily({this.isAppbarVisible = true});
final bool isFromAllServicePage;
MyFamily({this.isAppbarVisible = true, this.isFromAllServicePage = false});
@override
_MyFamily createState() => _MyFamily();
}
@ -92,6 +95,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
isShowAppBar: widget.isAppbarVisible,
imagesInfo: imagesInfo,
description: TranslationBase.of(context).familyInfo,
isShowBottomNavBar: widget.isFromAllServicePage,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(

@ -51,6 +51,7 @@ class _AmbulanceReqState extends State<AmbulanceReq>
onModelReady: (model) => model.getAmRequestOrders(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).transportationService,
description: TranslationBase.of(context).infoAmbulance,
imagesInfo: imagesInfo,

@ -126,7 +126,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.vAT}',
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.priceVAT}',
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
@ -167,7 +167,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.totalPrice}',
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.priceTotal}',
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,

@ -97,9 +97,9 @@ class _SelectTransportationMethodState
child: ListTile(
title: Texts(projectViewModel.isArabic
? widget.amRequestViewModel
.amRequestModeList[index].titleAR
.amRequestModeList[index].textN
: widget.amRequestViewModel
.amRequestModeList[index].title),
.amRequestModeList[index].text),
leading: Radio(
value: widget
.amRequestViewModel.amRequestModeList[index],
@ -317,10 +317,10 @@ class _SelectTransportationMethodState
_orderService.getIdOrderService();
widget.patientER.pickupUrgency = 1;
widget.patientER.lineItemNo = 1;
widget.patientER.cost = _erTransportationMethod.price;
widget.patientER.vAT = _erTransportationMethod.vAT ?? 0;
widget.patientER.cost = _erTransportationMethod.price.toDouble();
widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
widget.patientER.totalPrice =
_erTransportationMethod.totalPrice;
_erTransportationMethod.priceTotal.toDouble();
widget.changeCurrentTab(1);
});
},

@ -44,7 +44,7 @@ class _SummaryState extends State<Summary> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(TranslationBase.of(context).transportMethod,color: Colors.grey,),
Texts('${widget.patientER.patientERTransportationMethod.title}',bold: true,),
Texts('${widget.patientER.patientERTransportationMethod.text}',bold: true,),
SizedBox(height: 8,),
Texts(TranslationBase.of(context).directions,color: Colors.grey,),
@ -84,7 +84,7 @@ class _SummaryState extends State<Summary> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(TranslationBase.of(context).patientShareTotal+':'),
Texts(TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.totalPrice}')
Texts(TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.priceTotal}')
],
),
),

@ -65,6 +65,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
return AppScaffold(
appBarTitle: widget.appo.doctorNameObj,
isShowAppBar: true,
isShowBottomNavBar: false,
bottomSheet: AppointmentDetails.showFooterButton
? Container(
width: MediaQuery.of(context).size.width,

@ -81,6 +81,8 @@ class _ToDoState extends State<ToDo> {
isShowAppBar: widget.isShowAppBar,
isShowDecPage: true,
description: TranslationBase.of(context).infoTodo,
isShowBottomNavBar: false,
body: SingleChildScrollView(
child: Column(
children: <Widget>[

@ -42,6 +42,7 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
isShowAppBar: true,
isBottomBar: false,
isShowDecPage: false,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).feedbackTitle,
body: Scaffold(
extendBodyBehindAppBar: true,

@ -50,6 +50,7 @@ class _HomePageState extends State<HomePage> {
builder: (_, model, wi) => AppScaffold(
isShowDecPage: false,
isHelp: true,
isShowBottomNavBar: false,
body: Container(
width: double.infinity,
child: SingleChildScrollView(

@ -32,6 +32,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:firebase_analytics/observer.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart';
@ -49,8 +50,11 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class LandingPage extends StatefulWidget {
static LandingPage shared;
int currentTab = 0;
_LandingPageState state;
LandingPage() {
LandingPage({currentTabLocal}) {
currentTab = currentTabLocal ?? 0;
LandingPage.shared = this;
}
@ -69,7 +73,6 @@ class LandingPage extends StatefulWidget {
class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var authProvider = new AuthProvider();
int currentTab = 0;
PageController pageController;
ProjectViewModel projectViewModel;
ToDoCountProviderModel model;
@ -102,7 +105,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
changeCurrentTab(int tab) {
setState(() {
if (currentTab > 0 && tab == 2)
if (widget.currentTab > 0 && tab == 2)
pageController.jumpToPage(0);
else if (tab != 0) {
if (tab == 4 && model.count == 0) {
@ -116,7 +119,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
pageController.jumpToPage(tab);
}
currentTab = tab;
widget.currentTab = tab;
});
}
@ -175,7 +178,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
AppGlobal.context = context;
_requestIOSPermissions();
pageController = PageController(keepPage: true);
pageController =
PageController(keepPage: true, initialPage: widget.currentTab);
_firebaseMessaging.setAutoInitEnabled(true);
locationUtils =
@ -484,94 +488,84 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
projectViewModel = Provider.of(context);
model = Provider.of<ToDoCountProviderModel>(context);
return Scaffold(
appBar: AppBar(
elevation: 0,
textTheme: TextTheme(
headline6: TextStyle(
color: Theme.of(context).textTheme.headline1.color,
fontWeight: FontWeight.bold),
),
title: Text(
getText(currentTab).toUpperCase(),
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).textTheme.headline1.color,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
// bold: true,
// color: Colors.white,
),
leading: Builder(
builder: (BuildContext context) {
return new Stack(
children: <Widget>[
currentTab == 0
? IconButton(
icon: Icon(Icons.menu),
color: Theme.of(context).textTheme.headline1.color,
onPressed: () => Scaffold.of(context).openDrawer(),
)
: IconButton(
icon: Icon(Icons.arrow_back),
color: Theme.of(context).textTheme.headline1.color,
onPressed: () {
setState(() {
currentTab = 0;
});
pageController.jumpToPage(0);
},
),
notificationCount != ''
? new Positioned(
right: projectViewModel.isArabic ? 35 : 0,
top: 5,
child: new Container(
padding: EdgeInsets.all(4),
decoration: new BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
notificationCount,
style: new TextStyle(
color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 9,
),
textAlign: TextAlign.center,
return AppScaffold(
isShowAppBar: true,
showHomeAppBarIcon: false,
appBarTitle: getText(widget.currentTab).toUpperCase(),
leading: Builder(
builder: (BuildContext context) {
return new Stack(
children: <Widget>[
widget.currentTab == 0
? IconButton(
icon: Icon(Icons.menu),
color: Theme.of(context).textTheme.headline1.color,
onPressed: () => Scaffold.of(context).openDrawer(),
)
: IconButton(
icon: Icon(Icons.arrow_back),
color: Theme.of(context).textTheme.headline1.color,
onPressed: () {
setState(() {
widget.currentTab = 0;
});
pageController.jumpToPage(0);
},
),
notificationCount != ''
? new Positioned(
right: projectViewModel.isArabic ? 35 : 0,
top: 5,
child: new Container(
padding: EdgeInsets.all(4),
decoration: new BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
notificationCount,
style: new TextStyle(
color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 9,
),
textAlign: TextAlign.center,
),
)
: SizedBox()
],
);
},
),
actions: [
IconButton(
//iconSize: 70,
icon: Icon(
projectViewModel.isLogin ? Icons.settings : Icons.login,
color: Theme.of(context).textTheme.headline1.color,
),
onPressed: () {
if (projectViewModel.isLogin)
Navigator.of(context).pushNamed(
SETTINGS,
);
else
login();
}, //do something,
)
],
centerTitle: true,
),
)
: SizedBox()
],
);
},
),
drawer: SafeArea(child: AppDrawer()),
extendBody: true,
isShowDrawer: true,
appBarIcons: [
IconButton(
//iconSize: 70,
icon: Icon(
projectViewModel.isLogin ? Icons.settings : Icons.login,
color: Theme.of(context).textTheme.headline1.color,
),
onPressed: () {
if (projectViewModel.isLogin)
Navigator.of(context).pushNamed(
SETTINGS,
);
else
login();
}, //do something,
)
],
// drawer: SafeArea(child: AppDrawer()),
// extendBody: true,
isShowDecPage: false,
changeTab: changeCurrentTab,
isFromLandingPage: true,
currentTab: widget.currentTab,
body: PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,
@ -587,13 +581,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
ToDo(isShowAppBar: false),
], // Please do not remove the BookingOptions from this array
),
bottomNavigationBar: BottomNavBar(
changeIndex: changeCurrentTab,
index: currentTab,
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton:
(projectViewModel.havePrivilege(34) && currentTab == 0)
(projectViewModel.havePrivilege(34) && widget.currentTab == 0)
? FloatingButton(
elevation: true,
onTap: () {

@ -110,35 +110,6 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
centerTitle: true,
)
: null,
// : AppBar(
// backgroundColor: Color(0xff5AB145),
// elevation: 0,
// textTheme: TextTheme(
// headline6: TextStyle(
// color: Colors.white, fontWeight: FontWeight.bold),
// ),
// title: Text(getText(currentTab).toUpperCase()),
// leading: Builder(
// builder: (BuildContext context) {
// return IconButton(
// icon: Icon(Icons.arrow_back),
// color: Colors.white,
// onPressed: () => Scaffold.of(context).openDrawer(),
// );
// },
// ),
// actions: [
// // IconButton(
// // iconSize: 70,
// // icon: SvgPicture.asset('assets/images/svg/robort_svg.svg',
// // height: 100, width: 100, fit: BoxFit.cover),
// // onPressed: () {
// // triggerRobot();
// // } //do something,
// // )
// ],
// centerTitle: true,
// ),
extendBody: false,
body: PageView(
physics: NeverScrollableScrollPhysics(),

@ -51,6 +51,7 @@ class _LiveCareHomeState extends State<LiveCareHome>
return AppScaffold(
appBarTitle: "LiveCare",
isShowAppBar: true,
isShowBottomNavBar: false,
imagesInfo: imagesInfo,
description: TranslationBase.of(context).erConsultation,
body: Container(

@ -101,6 +101,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
appBarTitle: TranslationBase.of(context).confirm,
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.all(20),

@ -31,6 +31,7 @@ class _ForgotPassword extends State<ForgotPassword> {
appBarTitle: TranslationBase.of(context).forgotFileNoTitle,
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.only(top: 10, left: 20, right: 20),

@ -21,6 +21,7 @@ class LoginType extends StatelessWidget {
appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
child: Container(
padding:

@ -85,6 +85,7 @@ class _Login extends State<Login> {
appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),

@ -74,6 +74,7 @@ class _RegisterInfo extends State<RegisterInfo> {
appBarTitle: TranslationBase.of(context).register,
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
padding: EdgeInsets.all(20),
child: Column(children: <Widget>[

@ -49,6 +49,7 @@ class _Register extends State<Register> {
appBarTitle: TranslationBase.of(context).register,
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),

@ -30,6 +30,7 @@ class _WelcomeLogin extends State<WelcomeLogin> {
appBarTitle: TranslationBase.of(context).welcome,
isShowDecPage: false,
isShowAppBar: true,
isShowBottomNavBar: false,
body: Padding(
padding: EdgeInsets.all(20),
child: Column(

@ -39,6 +39,7 @@ class _AskDoctorHomPageState extends State<AskDoctorHomPage>
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).askDoctor,
body: Scaffold(
extendBodyBehindAppBar: true,

@ -44,6 +44,7 @@ class _EyeHomePageState extends State<EyeHomePage>
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).measurements,
body: Scaffold(
extendBodyBehindAppBar: true,

@ -13,6 +13,10 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class MedicalProfilePage extends StatefulWidget {
final bool isFromAllServicePage;
const MedicalProfilePage({ this.isFromAllServicePage = false}) ;
@override
_MedicalProfilePageState createState() => _MedicalProfilePageState();
}
@ -25,6 +29,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
var appoCountProvider = Provider.of<ToDoCountProviderModel>(context);
List<Widget> myMedicalList = Utils.myMedicalList(
projectViewModel: projectViewModel,
@ -33,10 +38,12 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
isLogin: projectViewModel.isLogin);
return BaseView<MedicalViewModel>(
onModelReady: (model) => model.getAppointmentHistory(),
builder: (_, model, widget) => AppScaffold(
builder: (_, model, x) => AppScaffold(
isShowDecPage: false,
baseViewModel: model,
isHelp: true,
isShowBottomNavBar: widget.isFromAllServicePage,
body: Container(
child: SingleChildScrollView(
child: Column(

@ -42,6 +42,7 @@ class _WeightHomePageState extends State<WeightHomePage> with SingleTickerProvid
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).weight,
appBarIcons: [
IconButton(
@ -100,26 +101,29 @@ class _WeightHomePageState extends State<WeightHomePage> with SingleTickerProvid
)
],
),
floatingActionButton: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: AddWeightPage(
model: model,
)));
},
child: Container(
width: 55,
height: 55,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Theme.of(context).primaryColor,
),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
floatingActionButton: Container(
margin: EdgeInsets.only(bottom: 70),
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: AddWeightPage(
model: model,
)));
},
child: Container(
width: 55,
height: 55,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Theme.of(context).primaryColor,
),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
),
),

@ -42,6 +42,7 @@ class _BloodPressureHomePageState extends State<BloodPressureHomePage>
onModelReady: (model) => model.getBloodPressure(),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).bloodPressure,
baseViewModel: model,
appBarIcons: [IconButton(
@ -94,19 +95,22 @@ class _BloodPressureHomePageState extends State<BloodPressureHomePage>
)
],
),
floatingActionButton: InkWell(
onTap: () {
Navigator.push(context, FadePage(page: AddBloodPressurePage(model: model,)));
},
child: Container(
width: 55,
height: 55,
decoration: BoxDecoration(
shape: BoxShape.circle, color: Theme.of(context).primaryColor),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
floatingActionButton: Container(
margin: EdgeInsets.only(bottom: 70),
child: InkWell(
onTap: () {
Navigator.push(context, FadePage(page: AddBloodPressurePage(model: model,)));
},
child: Container(
width: 55,
height: 55,
decoration: BoxDecoration(
shape: BoxShape.circle, color: Theme.of(context).primaryColor),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
),
),

@ -47,6 +47,7 @@ class _BloodSugarHomePageState extends State<BloodSugarHomePage>
return BaseView<BloodSugarViewMode>(
onModelReady: (model) => model.getBloodSugar(),
builder: (_, model, w) => AppScaffold(
isShowBottomNavBar: false,
appBarIcons: [IconButton(
icon: Icon(Icons.email),
color: Colors.white,
@ -105,19 +106,22 @@ class _BloodSugarHomePageState extends State<BloodSugarHomePage>
)
],
),
floatingActionButton: InkWell(
onTap: () {
Navigator.push(context, FadePage(page: AddBloodSugarPage(bloodSugarViewMode: model,)));
},
child: Container(
width: 55,
height: 55,
decoration: BoxDecoration(
shape: BoxShape.circle, color:Theme.of(context).primaryColor),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
floatingActionButton: Container(
margin: EdgeInsets.only(bottom: 70),
child: InkWell(
onTap: () {
Navigator.push(context, FadePage(page: AddBloodSugarPage(bloodSugarViewMode: model,)));
},
child: Container(
width: 55,
height: 55,
decoration: BoxDecoration(
shape: BoxShape.circle, color:Theme.of(context).primaryColor),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
),
),

@ -47,6 +47,7 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
description: TranslationBase.of(context).infoPrescriptions,
infoList: TranslationBase.of(context).infoPrescriptionsPoints,
imagesInfo: imagesInfo,
isShowBottomNavBar: false,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(

@ -59,6 +59,7 @@ class _HomeReportPageState extends State<HomeReportPage>
onModelReady: (model) => model.getReports(), //model.getPrescriptions(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
isShowBottomNavBar: false,
appBarTitle: TranslationBase.of(context).newMedReport,
title: TranslationBase.of(context).medReport,
description: TranslationBase.of(context).infoMonthReport,

@ -44,6 +44,7 @@ class _StepsTrackerState extends State<StepsTracker>
isShowAppBar: true,
appBarTitle: "Steps",
isShowDecPage: false,
isShowBottomNavBar: false,
body: Container(
child: Column(
mainAxisSize: MainAxisSize.min,

@ -80,6 +80,7 @@ class _PharmacyPageState extends State<PharmacyPage> {
isShowAppBar: false,
isShowDecPage: false,
baseViewModel: model,
isPharmacy:true,
backgroundColor: Colors.white,
body: Container(
width: double.infinity,

@ -35,6 +35,7 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
AppScaffold(
isShowDecPage: false,
baseViewModel: model,
isPharmacy:true,
body: Column(
children: [
Expanded(

@ -92,7 +92,7 @@ class AppToast {
double fontSize = 16,
ToastGravity toastGravity = ToastGravity.TOP,
Color textColor = Colors.white,
int radius,
int radius = 15,
int elevation,
int imageSize = 32,
}) {
@ -107,7 +107,9 @@ class AppToast {
icon: ICON.CLOSE,
radius: radius,
elevation: elevation,
imageSize: imageSize);
imageSize: imageSize
);
}
/// cancel toast

File diff suppressed because it is too large Load Diff

@ -12,7 +12,9 @@ import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-order-page.da
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_loader_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -44,6 +46,7 @@ class AppScaffold extends StatelessWidget {
final BaseViewModel baseViewModel;
final bool isBottomBar;
final Widget floatingActionButton;
final FloatingActionButtonLocation floatingActionButtonLocation;
final bool isPharmacy;
final bool isOfferPackages;
final bool showPharmacyCart;
@ -58,10 +61,19 @@ class AppScaffold extends StatelessWidget {
final List<Widget> appBarIcons;
final List<ImagesInfo> imagesInfo;
final bool isHelp;
final int currentTab;
final bool isShowBottomNavBar;
final bool isFromLandingPage;
final bool isShowDrawer;
final Function(int tab) changeTab;
final Widget leading;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
AppBarWidget appBar;
AppScaffold(
{@required this.body,
this.appBarTitle = '',
@ -85,7 +97,14 @@ class AppScaffold extends StatelessWidget {
this.infoList,
this.isHelp = false,
this.showHomeAppBarIcon = true,
this.imagesInfo});
this.imagesInfo,
this.currentTab,
this.isShowBottomNavBar = true,
this.isFromLandingPage = false,
this.changeTab,
this.floatingActionButtonLocation,
this.leading,
this.isShowDrawer = false});
AppScaffold setOnAppBarCartClick(VoidCallback onClick) {
_onCartClick = onClick;
@ -98,6 +117,7 @@ class AppScaffold extends StatelessWidget {
return Scaffold(
backgroundColor:
backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
drawer: isShowDrawer ? SafeArea(child: AppDrawer()) : null,
appBar: isShowAppBar
? appBar = AppBarWidget(
appBarTitle: appBarTitle,
@ -108,15 +128,21 @@ class AppScaffold extends StatelessWidget {
isOfferPackages: isOfferPackages,
showOfferPackagesCart: showOfferPackagesCart,
isShowDecPage: isShowDecPage,
leading: leading,
)
: null,
bottomSheet: bottomSheet,
bottomNavigationBar: isShowBottomNavBar && !getIsShowDecPageValue(context) && !isPharmacy
? BottomNavBar(
changeIndex: changeCurrentTab,
index: currentTab,
)
: null,
body: SafeArea(
top: true,
bottom: true,
child:
(!Provider.of<ProjectViewModel>(context, listen: false).isLogin &&
isShowDecPage)
getIsShowDecPageValue(context)
? NotAutPage(
title: title ?? appBarTitle,
description: description,
@ -131,9 +157,15 @@ class AppScaffold extends StatelessWidget {
: buildBodyWidget(context),
),
floatingActionButton: floatingActionButton,
floatingActionButtonLocation: floatingActionButtonLocation,
);
}
getIsShowDecPageValue(context){
return (!Provider.of<ProjectViewModel>(context, listen: false).isLogin &&
isShowDecPage);
}
buildAppLoaderWidget(bool isLoading) {
return isLoading ? AppLoaderWidget() : Container();
}
@ -142,6 +174,18 @@ class AppScaffold extends StatelessWidget {
return Stack(
children: <Widget>[body, isHelp == true ? RobotIcon() : Container()]);
}
void changeCurrentTab(int value) {
if (isFromLandingPage) {
changeTab(value);
} else {
Navigator.pushAndRemoveUntil(
AppGlobal.context,
MaterialPageRoute(
builder: (context) => LandingPage(currentTabLocal: value)),
(Route<dynamic> r) => false);
}
}
}
class AppBarWidget extends StatefulWidget with PreferredSizeWidget {
@ -159,6 +203,8 @@ class AppBarWidget extends StatefulWidget with PreferredSizeWidget {
Function(String) badgeUpdater;
final Widget leading;
AppBarWidget(
{this.appBarTitle,
this.showHomeAppBarIcon,
@ -167,7 +213,8 @@ class AppBarWidget extends StatefulWidget with PreferredSizeWidget {
this.showPharmacyCart = true,
this.isOfferPackages = false,
this.showOfferPackagesCart = false,
this.isShowDecPage = true});
this.isShowDecPage = true,
this.leading});
@override
State<StatefulWidget> createState() => AppBarWidgetState();
@ -178,6 +225,7 @@ class AppBarWidget extends StatefulWidget with PreferredSizeWidget {
class AppBarWidgetState extends State<AppBarWidget> {
String badgeText = "0";
@override
Widget build(BuildContext context) {
widget.badgeUpdater = badgeUpdateBlock;
@ -210,11 +258,12 @@ class AppBarWidgetState extends State<AppBarWidget> {
fontWeight: FontWeight.bold,
color: Theme.of(context).textTheme.headline1.color,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack();
},
),
leading: widget.leading ??
Builder(
builder: (BuildContext context) {
return ArrowBack();
},
),
centerTitle: true,
actions: <Widget>[
(widget.isPharmacy && widget.showPharmacyCart)
@ -356,6 +405,7 @@ class _RobotIcon extends State<RobotIcon> {
)))
: Container(),
FloatingSearchButton()
],
)
],
@ -364,10 +414,10 @@ class _RobotIcon extends State<RobotIcon> {
bottom: -15);
}
// setAnimation() async {
// /// await sharedPref.getBool(IS_ROBOT_VISIBLE) ||
// // var animation =
// // IS_TEXT_COMPLETED == ? true : false;
// setAnimation() async {
// /// await sharedPref.getBool(IS_ROBOT_VISIBLE) ||
// // var animation =
// // IS_TEXT_COMPLETED == ? true : false;
// }
// }
}

Loading…
Cancel
Save