Merge branches 'master' and 'my_trackers' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into my_trackers
Conflicts: lib/config/localized_values.dart lib/core/service/client/base_app_client.dart lib/locator.dart lib/pages/landing/landing_page.darter_location
commit
3946f0355c
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
@ -0,0 +1,80 @@
|
||||
class GetHMGLocationsModel {
|
||||
dynamic cityID;
|
||||
String cityName;
|
||||
dynamic cityNameN;
|
||||
dynamic distanceInKilometers;
|
||||
bool isActive;
|
||||
String latitude;
|
||||
int locationID;
|
||||
String locationName;
|
||||
dynamic locationNameN;
|
||||
dynamic locationType;
|
||||
String longitude;
|
||||
int pharmacyLocationID;
|
||||
String phoneNumber;
|
||||
int projectID;
|
||||
String projectImageURL;
|
||||
int setupID;
|
||||
dynamic sortOrder;
|
||||
|
||||
GetHMGLocationsModel(
|
||||
{this.cityID,
|
||||
this.cityName,
|
||||
this.cityNameN,
|
||||
this.distanceInKilometers,
|
||||
this.isActive,
|
||||
this.latitude,
|
||||
this.locationID,
|
||||
this.locationName,
|
||||
this.locationNameN,
|
||||
this.locationType,
|
||||
this.longitude,
|
||||
this.pharmacyLocationID,
|
||||
this.phoneNumber,
|
||||
this.projectID,
|
||||
this.projectImageURL,
|
||||
this.setupID,
|
||||
this.sortOrder});
|
||||
|
||||
GetHMGLocationsModel.fromJson(Map<String, dynamic> json) {
|
||||
cityID = json['CityID'];
|
||||
cityName = json['CityName'];
|
||||
cityNameN = json['CityNameN'];
|
||||
distanceInKilometers = json['DistanceInKilometers'];
|
||||
isActive = json['IsActive'];
|
||||
latitude = json['Latitude'];
|
||||
locationID = json['LocationID'];
|
||||
locationName = json['LocationName'];
|
||||
locationNameN = json['LocationNameN'];
|
||||
locationType = json['LocationType'];
|
||||
longitude = json['Longitude'];
|
||||
pharmacyLocationID = json['PharmacyLocationID'];
|
||||
phoneNumber = json['PhoneNumber'];
|
||||
projectID = json['ProjectID'];
|
||||
projectImageURL = json['ProjectImageURL'];
|
||||
setupID = json['SetupID'];
|
||||
sortOrder = json['SortOrder'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['CityID'] = this.cityID;
|
||||
data['CityName'] = this.cityName;
|
||||
data['CityNameN'] = this.cityNameN;
|
||||
data['DistanceInKilometers'] = this.distanceInKilometers;
|
||||
data['IsActive'] = this.isActive;
|
||||
data['Latitude'] = this.latitude;
|
||||
data['LocationID'] = this.locationID;
|
||||
data['LocationName'] = this.locationName;
|
||||
data['LocationNameN'] = this.locationNameN;
|
||||
data['LocationType'] = this.locationType;
|
||||
data['Longitude'] = this.longitude;
|
||||
data['PharmacyLocationID'] = this.pharmacyLocationID;
|
||||
data['PhoneNumber'] = this.phoneNumber;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ProjectImageURL'] = this.projectImageURL;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['SortOrder'] = this.sortOrder;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||
|
||||
class GetPatientICProjectsModel {
|
||||
int id;
|
||||
String projectName;
|
||||
String projectNameN;
|
||||
String value;
|
||||
dynamic languageId;
|
||||
DateTime createdOn;
|
||||
String createdBy;
|
||||
dynamic editedOn;
|
||||
dynamic editedBy;
|
||||
bool isActive;
|
||||
|
||||
GetPatientICProjectsModel(
|
||||
{this.id,
|
||||
this.projectName,
|
||||
this.projectNameN,
|
||||
this.value,
|
||||
this.languageId,
|
||||
this.createdOn,
|
||||
this.createdBy,
|
||||
this.editedOn,
|
||||
this.editedBy,
|
||||
this.isActive});
|
||||
|
||||
GetPatientICProjectsModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
projectName = json['ProjectName'];
|
||||
projectNameN = json['ProjectNameN'];
|
||||
value = json['Value'];
|
||||
languageId = json['LanguageId'];
|
||||
createdOn = DateUtil.convertStringToDate(json['CreatedOn']);
|
||||
createdBy = json['CreatedBy'];
|
||||
editedOn = json['EditedOn'];
|
||||
editedBy = json['EditedBy'];
|
||||
isActive = json['IsActive'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['ProjectName'] = this.projectName;
|
||||
data['ProjectNameN'] = this.projectNameN;
|
||||
data['Value'] = this.value;
|
||||
data['LanguageId'] = this.languageId;
|
||||
data['CreatedOn'] = this.createdOn;
|
||||
data['CreatedBy'] = this.createdBy;
|
||||
data['EditedOn'] = this.editedOn;
|
||||
data['EditedBy'] = this.editedBy;
|
||||
data['IsActive'] = this.isActive;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart';
|
||||
import '../base_service.dart';
|
||||
|
||||
class FindusService extends BaseService {
|
||||
|
||||
|
||||
List<GetHMGLocationsModel> FindusModelList = List();
|
||||
List<GetHMGLocationsModel> FindusHospitalModelList = List();
|
||||
List<GetHMGLocationsModel> FindusPharmaciesModelList = List();
|
||||
Map<String, dynamic> body = Map();
|
||||
|
||||
Future getAllFindUsOrders() async {
|
||||
hasError = false;
|
||||
|
||||
await baseAppClient.post(GET_FINDUS_REQUEST,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
FindusModelList.clear();
|
||||
FindusHospitalModelList.clear();
|
||||
FindusPharmaciesModelList.clear();
|
||||
|
||||
response['ListHMGLocation'].forEach((vital) {
|
||||
if (GetHMGLocationsModel.fromJson(vital).locationType == 1) {
|
||||
FindusHospitalModelList.add(GetHMGLocationsModel.fromJson(vital));
|
||||
} else {
|
||||
FindusPharmaciesModelList.add(GetHMGLocationsModel.fromJson(vital));
|
||||
}
|
||||
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/contactus/get_patientI_cprojects.dart';
|
||||
import '../base_service.dart';
|
||||
|
||||
class LiveChatService extends BaseService{
|
||||
|
||||
|
||||
|
||||
|
||||
List<GetPatientICProjectsModel> LivechatModelList=List();
|
||||
|
||||
|
||||
Map<String, dynamic> body = Map();
|
||||
|
||||
|
||||
|
||||
Future getAllLiveChatOrders() async {
|
||||
hasError = false;
|
||||
body['List_PatientICProjects'] =false;
|
||||
await baseAppClient.post(GET_LIVECHAT_REQUEST,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
LivechatModelList.clear();
|
||||
|
||||
|
||||
response['List_PatientICProjects'].forEach((vital) {
|
||||
|
||||
LivechatModelList.add(GetPatientICProjectsModel.fromJson(vital));
|
||||
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/contactus/finadus_service.dart';
|
||||
import '../base_view_model.dart';
|
||||
import '../../../locator.dart';
|
||||
|
||||
class FindusViewModel extends BaseViewModel {
|
||||
FindusService _findusService = locator<FindusService>();
|
||||
|
||||
List<GetHMGLocationsModel> get FindusModelList =>
|
||||
_findusService.FindusModelList;
|
||||
|
||||
List<GetHMGLocationsModel> get FindusHospitalModelList=>
|
||||
_findusService.FindusHospitalModelList;
|
||||
|
||||
List<GetHMGLocationsModel> get FindusPharmaciesModelList=>
|
||||
_findusService.FindusPharmaciesModelList;
|
||||
|
||||
getFindUsRequestOrders() async {
|
||||
setState(ViewState.Busy);
|
||||
|
||||
await _findusService.getAllFindUsOrders();
|
||||
|
||||
if (_findusService.hasError) {
|
||||
error = _findusService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/contactus/get_patientI_cprojects.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/contactus/livechat_service.dart';
|
||||
import '../base_view_model.dart';
|
||||
import '../../../locator.dart';
|
||||
|
||||
|
||||
class LiveChatViewModel extends BaseViewModel{
|
||||
|
||||
|
||||
|
||||
LiveChatService _liveChatService =locator<LiveChatService>();
|
||||
|
||||
List<GetPatientICProjectsModel> get LiveChatModelList=>
|
||||
|
||||
_liveChatService.LivechatModelList;
|
||||
|
||||
|
||||
getLiveChatRequestOrders() async {
|
||||
setState(ViewState.Busy);
|
||||
|
||||
await _liveChatService.getAllLiveChatOrders();
|
||||
|
||||
if (_liveChatService.hasError) {
|
||||
error = _liveChatService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
// import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
// import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
|
||||
// import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
// import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||
// import 'package:flutter/material.dart';
|
||||
//
|
||||
// import 'health_converter/blood_sugar.dart';
|
||||
//
|
||||
// class HealthConverter extends StatefulWidget {
|
||||
// @override
|
||||
// _HealthConverterState createState() => _HealthConverterState();
|
||||
// }
|
||||
//
|
||||
// class _HealthConverterState extends State<HealthConverter> {
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return AppScaffold(
|
||||
// isShowAppBar: true,
|
||||
// appBarTitle: 'Health Converter',
|
||||
// body: Column(
|
||||
// children: [
|
||||
// Container(
|
||||
// width: double.infinity,
|
||||
// height: 30,
|
||||
// ),
|
||||
// Row(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// flex: 1,
|
||||
// child: InkWell(
|
||||
// onTap: () {
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// FadePage(page: BloodSugar()),
|
||||
// );
|
||||
// },
|
||||
// child: MedicalProfileItem(
|
||||
// title: 'Blood',
|
||||
// imagePath: 'blood_sugar_icon.png',
|
||||
// subTitle: 'Sugar',
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Expanded(
|
||||
// flex: 1,
|
||||
// child: InkWell(
|
||||
// onTap: () {
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// FadePage(
|
||||
// // page: [](),
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// child: MedicalProfileItem(
|
||||
// title: 'Blood',
|
||||
// imagePath: 'blood_cholesterol_icon.png',
|
||||
// subTitle: 'Cholesterol',
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// Row(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// flex: 1,
|
||||
// child: InkWell(
|
||||
// onTap: () {
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// FadePage(
|
||||
// // page: [](),
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// child: MedicalProfileItem(
|
||||
// title: 'Triglycerides',
|
||||
// imagePath: 'triglycerides_blood_icon.png',
|
||||
// subTitle: 'Fat in blood',
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Expanded(
|
||||
// flex: 1,
|
||||
// child: Container(),
|
||||
// ),
|
||||
// ],
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@ -0,0 +1,208 @@
|
||||
// import 'package:diplomaticquarterapp/widgets/buttons/button.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:flutter/material.dart';
|
||||
// import 'package:flutter/services.dart';
|
||||
//
|
||||
// const activeCardColor = Color(0xff70777A);
|
||||
// const inactiveCardColor = Color(0xffFAFAFd);
|
||||
//
|
||||
// class BloodSugar extends StatefulWidget {
|
||||
// @override
|
||||
// _BloodSugarState createState() => _BloodSugarState();
|
||||
// }
|
||||
//
|
||||
// Color color;
|
||||
//
|
||||
// class _BloodSugarState extends State<BloodSugar> {
|
||||
// Color cardMGColor = inactiveCardColor;
|
||||
// Color cardMMOLColor = inactiveCardColor;
|
||||
//
|
||||
// void updateColor(int type) {
|
||||
// //MG/DLT card
|
||||
// if (type == 1) {
|
||||
// if (cardMGColor == inactiveCardColor) {
|
||||
// cardMGColor = activeCardColor;
|
||||
// cardMMOLColor = inactiveCardColor;
|
||||
// } else {
|
||||
// cardMGColor = inactiveCardColor;
|
||||
// }
|
||||
// }
|
||||
// if (type == 2) {
|
||||
// if (cardMMOLColor == inactiveCardColor) {
|
||||
// cardMMOLColor = activeCardColor;
|
||||
// cardMGColor = inactiveCardColor;
|
||||
// } else {
|
||||
// cardMMOLColor = inactiveCardColor;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// bool _visible = false;
|
||||
//
|
||||
// TextEditingController textController = new TextEditingController();
|
||||
// String finalValue;
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return AppScaffold(
|
||||
// isShowAppBar: true,
|
||||
// appBarTitle: 'Blood Sugar Conversion',
|
||||
// body: Padding(
|
||||
// padding: const EdgeInsets.all(16.0),
|
||||
// child: Column(
|
||||
// //crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Container(
|
||||
// width: 350.0,
|
||||
// child: Text(
|
||||
// 'Convert blood sugar/glucose from mmol/l (UK standard) to mg/dlt (US standard) and vice versa.',
|
||||
// //textAlign: TextAlign.center,
|
||||
// style: TextStyle(fontSize: 20.0),
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// height: 15.0,
|
||||
// ),
|
||||
// Container(
|
||||
// color: Colors.white,
|
||||
// height: 120.0,
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Column(
|
||||
// //crossAxisAlignment: CrossAxisAlignment.end,
|
||||
// children: [
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 15.0),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// Texts(
|
||||
// 'Convert from',
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// height: 9.0,
|
||||
// ),
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
// children: [
|
||||
// GestureDetector(
|
||||
// onTap: () {
|
||||
// setState(() {
|
||||
// updateColor(1);
|
||||
// finalValue = textController.text * 3;
|
||||
// });
|
||||
// },
|
||||
// child: Container(
|
||||
// height: 55.0,
|
||||
// width: 150.0,
|
||||
// decoration: BoxDecoration(
|
||||
// color: cardMGColor,
|
||||
// borderRadius: BorderRadius.circular(10.0),
|
||||
// ),
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.symmetric(
|
||||
// vertical: 0.0, horizontal: 18.0),
|
||||
// child: Texts('MG/DLt TO \nMMOL/L'),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// GestureDetector(
|
||||
// onTap: () {
|
||||
// setState(() {
|
||||
// updateColor(2);
|
||||
// finalValue = textController.text * 6;
|
||||
// });
|
||||
// },
|
||||
// child: Container(
|
||||
// height: 55.0,
|
||||
// width: 150.0,
|
||||
// decoration: BoxDecoration(
|
||||
// color: cardMMOLColor,
|
||||
// borderRadius: BorderRadius.circular(10.0),
|
||||
// ),
|
||||
// child: Padding(
|
||||
// padding:
|
||||
// const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
// child: Texts('MG/DLt TO\n MMOL/L'),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// height: 25.0,
|
||||
// ),
|
||||
// Container(
|
||||
// height: 55.0,
|
||||
// color: Colors.white,
|
||||
// child: TextFormField(
|
||||
// controller: textController,
|
||||
// inputFormatters: <TextInputFormatter>[
|
||||
// FilteringTextInputFormatter.digitsOnly
|
||||
// ],
|
||||
// keyboardType: TextInputType.number,
|
||||
// decoration: InputDecoration(
|
||||
// labelText: " Enter the reading value",
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// height: 5.0,
|
||||
// ),
|
||||
// Visibility(
|
||||
// visible: _visible,
|
||||
// child: Container(
|
||||
// height: 95.0,
|
||||
// width: 350.0,
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.white,
|
||||
// border: Border.all(color: Colors.black),
|
||||
// borderRadius: BorderRadius.circular(15.0),
|
||||
// ),
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// children: [
|
||||
// Texts('Result:'),
|
||||
// Text(
|
||||
// finalValue.toString(),
|
||||
// style: TextStyle(fontSize: 35.0),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// height: 15.0,
|
||||
// ),
|
||||
// Flexible(
|
||||
// child: Container(
|
||||
// height: 100.0,
|
||||
// width: 150.0,
|
||||
// child: Button(
|
||||
// label: 'CALCULATE',
|
||||
// onTap: () {
|
||||
// setState(() {
|
||||
// _visible = !_visible;
|
||||
// });
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@ -0,0 +1,38 @@
|
||||
import 'dart:async';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
import 'package:tweet_webview/tweet_webview.dart';
|
||||
|
||||
class MyWebView extends StatelessWidget {
|
||||
final String title;
|
||||
final String selectedUrl;
|
||||
|
||||
final Completer<WebViewController> _controller =
|
||||
Completer<WebViewController>();
|
||||
|
||||
MyWebView({
|
||||
@required this.title,
|
||||
@required this.selectedUrl,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: title,
|
||||
|
||||
body:
|
||||
WebView(
|
||||
initialUrl: selectedUrl,
|
||||
javascriptMode: JavascriptMode.unrestricted,
|
||||
onWebViewCreated: (WebViewController webViewController) {
|
||||
_controller.complete(webViewController);
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,196 @@
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class HospitalsLiveChatPage extends StatefulWidget {
|
||||
@override
|
||||
_HospitalsLiveChatPageState createState() => _HospitalsLiveChatPageState();
|
||||
}
|
||||
|
||||
class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
|
||||
int tappedIndex;
|
||||
String chat;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
tappedIndex = -1;
|
||||
chat = "";
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<LiveChatViewModel>(
|
||||
onModelReady: (model) => model.getLiveChatRequestOrders(),
|
||||
builder: (_, model, widget) => AppScaffold(
|
||||
baseViewModel: model,
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 15, right: 15),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Stack(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 200,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: ExactAssetImage(
|
||||
'assets/images/dashboard_top_bg.png'),
|
||||
fit: BoxFit.cover),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Texts(
|
||||
'You can now talk directly to the appointments department by chat or request a call back\n \nChoose Hospital :',
|
||||
color: Colors.white,
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: MediaQuery.of(context).size.height * 0.85,
|
||||
),
|
||||
SizedBox(
|
||||
height: 100,
|
||||
),
|
||||
],
|
||||
),
|
||||
Positioned(
|
||||
left: 13,
|
||||
right: 13,
|
||||
top: 200,
|
||||
child: Container(
|
||||
width: double.maxFinite,
|
||||
child: Column(
|
||||
children: [
|
||||
...List.generate(
|
||||
model.LiveChatModelList.length,
|
||||
(index) => Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 0, right: 0, bottom: 20),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: Colors.white, width: 0.5),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(5)),
|
||||
color: tappedIndex == index
|
||||
? Colors.red
|
||||
: Colors.white,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
tappedIndex = index;
|
||||
chat =
|
||||
"http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=en&WorkGroup=${model.LiveChatModelList[index].value}";
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.spaceAround,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
margin:
|
||||
EdgeInsets.only(
|
||||
left: 5,
|
||||
right: 5),
|
||||
child: Texts(
|
||||
'${model.LiveChatModelList[index].projectName}',
|
||||
color:
|
||||
tappedIndex ==
|
||||
index
|
||||
? Colors
|
||||
.white
|
||||
: Colors
|
||||
.black,
|
||||
textAlign: TextAlign
|
||||
.center,
|
||||
))), //model.cOCItemList[index].cOCTitl
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons
|
||||
.arrow_forward_rounded,
|
||||
color:
|
||||
tappedIndex == index
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
),
|
||||
tooltip: '',
|
||||
onPressed: () {
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
height: MediaQuery.of(context).size.height * 0.20,
|
||||
width: double.maxFinite,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
bottomSheet: Container(
|
||||
height: MediaQuery.of(context).size.height * 0.13,
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: Container(
|
||||
height: MediaQuery.of(context).size.height * 0.1,
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: Button(
|
||||
label: 'ٍStart',
|
||||
loading: model.state == ViewState.BusyLocal,
|
||||
onTap: () {
|
||||
print("chat=" + chat);
|
||||
launch(chat);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,121 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'hospitalsLivechat_page.dart';
|
||||
|
||||
class LiveChatPage extends StatefulWidget {
|
||||
@override
|
||||
_LiveChatPageState createState() => _LiveChatPageState();
|
||||
}
|
||||
|
||||
class _LiveChatPageState extends State<LiveChatPage>
|
||||
with SingleTickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_tabController = TabController(length: 2, vsync: this);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_tabController.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: 'Locations',
|
||||
body: Scaffold(
|
||||
extendBodyBehindAppBar: true,
|
||||
appBar: PreferredSize(
|
||||
preferredSize: Size.fromHeight(65.0),
|
||||
child: Stack(
|
||||
children: <Widget>[
|
||||
Positioned(
|
||||
bottom: 1,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
|
||||
child: Container(
|
||||
color: Theme.of(context)
|
||||
.scaffoldBackgroundColor
|
||||
.withOpacity(0.8),
|
||||
height: 70.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Center(
|
||||
child: Container(
|
||||
height: 60.0,
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
width: MediaQuery.of(context).size.width * 0.92, // 0.9,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 0.9), //width: 0.7
|
||||
),
|
||||
color: Colors.white),
|
||||
child: Center(
|
||||
child: TabBar(
|
||||
isScrollable: true,
|
||||
controller: _tabController,
|
||||
indicatorWeight: 5.0,
|
||||
//indicatorSize: TabBarIndicatorSize.label,
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
|
||||
indicatorColor: Colors.red[800],
|
||||
labelColor: Theme.of(context).primaryColor,
|
||||
labelPadding:
|
||||
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
|
||||
unselectedLabelColor: Colors.grey[800],
|
||||
tabs: [
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.30,
|
||||
child: Center(
|
||||
child: Texts(' Hospitals '),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.30,
|
||||
child: Center(
|
||||
child: Texts(' Pharmacies '),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
physics: BouncingScrollPhysics(),
|
||||
controller: _tabController,
|
||||
children: <Widget>[
|
||||
HospitalsLiveChatPage(), //SendFeedbackPage(),
|
||||
PhamaciesLiveChatPage()
|
||||
//StatusFeedbackPage()
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class PhamaciesLiveChatPage extends StatefulWidget {
|
||||
@override
|
||||
_PhamaciesLiveChatPageState createState() => _PhamaciesLiveChatPageState();
|
||||
}
|
||||
|
||||
class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
|
||||
int tappedIndex;
|
||||
String chat;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
tappedIndex = -1;
|
||||
chat = "";
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<LiveChatViewModel>(
|
||||
onModelReady: (model) => model.getLiveChatRequestOrders(),
|
||||
builder: (_, model, widget) => AppScaffold(
|
||||
baseViewModel: model,
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 15, right: 15),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 200,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: ExactAssetImage(''), fit: BoxFit.cover),
|
||||
),
|
||||
child: Texts(
|
||||
'You can now talk directly to the pharmacist by chat or request a call back',
|
||||
color: Colors.black,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
///////////
|
||||
|
||||
SizedBox(
|
||||
height: 100,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
bottomSheet: Container(
|
||||
height: MediaQuery.of(context).size.height * 0.13,
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: Container(
|
||||
height: MediaQuery.of(context).size.height * 0.1,
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: Button(
|
||||
label: 'ٍStart',
|
||||
loading: model.state == ViewState.BusyLocal,
|
||||
onTap: () {
|
||||
print("chat=" + chat);
|
||||
chat =
|
||||
"http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=1";
|
||||
launch(chat);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,131 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/ContactUs/findus/hospitrals_page.dart';
|
||||
import 'package:diplomaticquarterapp/pages/ContactUs/findus/pharmacies_page.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class FindUsPage extends StatefulWidget {
|
||||
@override
|
||||
_FindUsPageState createState() => _FindUsPageState();
|
||||
}
|
||||
|
||||
class _FindUsPageState extends State<FindUsPage>
|
||||
with SingleTickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_tabController = TabController(length: 2, vsync: this);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_tabController.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<FindusViewModel>(
|
||||
onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(),
|
||||
builder: (_, model, w) => AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: 'Locations',
|
||||
baseViewModel: model,
|
||||
body: Scaffold(
|
||||
extendBodyBehindAppBar: true,
|
||||
appBar: PreferredSize(
|
||||
preferredSize: Size.fromHeight(65.0),
|
||||
child: Stack(
|
||||
children: <Widget>[
|
||||
Positioned(
|
||||
bottom: 1,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
|
||||
child: Container(
|
||||
color: Theme.of(context)
|
||||
.scaffoldBackgroundColor
|
||||
.withOpacity(0.8),
|
||||
height: 70.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Center(
|
||||
child: Container(
|
||||
height: 60.0,
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
width: MediaQuery.of(context).size.width * 0.92, // 0.9,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 0.9), //width: 0.7
|
||||
),
|
||||
color: Colors.white),
|
||||
child: Center(
|
||||
child: TabBar(
|
||||
isScrollable: true,
|
||||
controller: _tabController,
|
||||
indicatorWeight: 5.0,
|
||||
//indicatorSize: TabBarIndicatorSize.label,
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
|
||||
indicatorColor: Colors.red[800],
|
||||
labelColor: Theme.of(context).primaryColor,
|
||||
labelPadding:
|
||||
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
|
||||
unselectedLabelColor: Colors.grey[800],
|
||||
tabs: [
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.30,
|
||||
child: Center(
|
||||
child: Texts(' Hospitals '),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.30,
|
||||
child: Center(
|
||||
child: Texts(' Pharmacies '),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
physics: BouncingScrollPhysics(),
|
||||
controller: _tabController,
|
||||
children: <Widget>[
|
||||
HospitalsPage(
|
||||
findusHospitalModelList: model.FindusHospitalModelList,
|
||||
), //SendFeedbackPage(),
|
||||
PharmaciesPage(
|
||||
findusPharmaciesModelList:
|
||||
model.FindusPharmaciesModelList,
|
||||
) //StatusFeedbackPage()
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,240 @@
|
||||
import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:giffy_dialog/giffy_dialog.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:maps_launcher/maps_launcher.dart';
|
||||
|
||||
class HospitalsPage extends StatefulWidget {
|
||||
final List<GetHMGLocationsModel> findusHospitalModelList;
|
||||
|
||||
HospitalsPage({Key key, this.findusHospitalModelList});
|
||||
|
||||
@override
|
||||
_HospitalsPageState createState() => _HospitalsPageState();
|
||||
}
|
||||
|
||||
class _HospitalsPageState extends State<HospitalsPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
// margin: EdgeInsets.only(left: 15,right: 15,top: 70),
|
||||
margin: EdgeInsets.only(left: 15, right: 15, top: 70),
|
||||
child: Column(
|
||||
children: [
|
||||
...List.generate(
|
||||
widget.findusHospitalModelList.length,
|
||||
(index) => Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(color: Colors.white, width: 0.5),
|
||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
InkWell(
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (_) =>
|
||||
AssetGiffyDialog(
|
||||
title: Text(
|
||||
widget
|
||||
.findusHospitalModelList[
|
||||
index]
|
||||
.locationName,
|
||||
style: TextStyle(
|
||||
fontSize: 22.0,
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w600),
|
||||
),
|
||||
image: Image.network(
|
||||
widget
|
||||
.findusHospitalModelList[
|
||||
index]
|
||||
.projectImageURL
|
||||
.toString(),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
buttonCancelText:
|
||||
Text('cancel'),
|
||||
buttonCancelColor:
|
||||
Colors.grey,
|
||||
onlyCancelButton: true,
|
||||
));
|
||||
},
|
||||
child: Container(
|
||||
width: 70,
|
||||
height: 70,
|
||||
child: Image.network(widget
|
||||
.findusHospitalModelList[
|
||||
index]
|
||||
.projectImageURL
|
||||
.toString())),
|
||||
),
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 5,
|
||||
right: 5,
|
||||
top: 10,
|
||||
bottom: 1),
|
||||
child: Texts(
|
||||
'${widget.findusHospitalModelList[index].locationName}',
|
||||
textAlign: TextAlign.center,
|
||||
))), //model.cOCItemList[index].cOCTitl
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
IconButton(
|
||||
// icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,),
|
||||
icon: new Image.asset(
|
||||
'assets/images/new-design/navigate.png'),
|
||||
tooltip: '',
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
MapsLauncher.launchCoordinates(
|
||||
double.parse(widget
|
||||
.findusHospitalModelList[
|
||||
index]
|
||||
.latitude),
|
||||
double.parse(widget
|
||||
.findusHospitalModelList[
|
||||
index]
|
||||
.longitude),
|
||||
widget
|
||||
.findusHospitalModelList[
|
||||
index]
|
||||
.locationName);
|
||||
});
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
// icon: Icon(Icons.phone,color: Colors.red,),
|
||||
icon: new Image.asset(
|
||||
'assets/images/new-design/call.png'),
|
||||
tooltip: '',
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
// _volume += 10;
|
||||
launch("tel://" +
|
||||
widget
|
||||
.findusHospitalModelList[
|
||||
index]
|
||||
.phoneNumber);
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
// Texts('${model.FindusHospitalModelList[index].locationName}'),
|
||||
Divider(
|
||||
height: 4.5,
|
||||
color: Colors.grey[500],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 100,
|
||||
color: Colors.white,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
IconButton(
|
||||
icon: new Image.asset(
|
||||
'assets/images/new-design/youtube.png'),
|
||||
iconSize: 70,
|
||||
tooltip: 'Youtube',
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
launch(
|
||||
"https://www.youtube.com/c/DrsulaimanAlhabibHospitals");
|
||||
});
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: new Image.asset(
|
||||
'assets/images/new-design/linkedin.png'),
|
||||
tooltip: 'LinkedIn',
|
||||
iconSize: 70,
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
launch(
|
||||
"https://www.linkedin.com/company/drsulaiman-alhabib-medical-group");
|
||||
});
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: new Image.asset(
|
||||
'assets/images/new-design/twitter.png'),
|
||||
tooltip: 'Twitter',
|
||||
iconSize: 70,
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
launch("https://twitter.com/HMG");
|
||||
});
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: new Image.asset(
|
||||
'assets/images/new-design/facebook.png'),
|
||||
tooltip: 'facebook',
|
||||
iconSize: 70,
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
launch(
|
||||
"https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn");
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,272 @@
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:giffy_dialog/giffy_dialog.dart';
|
||||
import 'package:maps_launcher/maps_launcher.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class PharmaciesPage extends StatefulWidget {
|
||||
final List<GetHMGLocationsModel> findusPharmaciesModelList;
|
||||
|
||||
PharmaciesPage({Key key, this.findusPharmaciesModelList});
|
||||
@override
|
||||
_PharmaciesPageState createState() => _PharmaciesPageState();
|
||||
}
|
||||
|
||||
class _PharmaciesPageState extends State<PharmaciesPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 15, right: 15, top: 70),
|
||||
child: Column(
|
||||
children: [
|
||||
...List.generate(
|
||||
widget.findusPharmaciesModelList.length,
|
||||
(index) => Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(color: Colors.white, width: 0.5),
|
||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
InkWell(
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (_) =>
|
||||
AssetGiffyDialog(
|
||||
title: Text(
|
||||
widget
|
||||
.findusPharmaciesModelList[
|
||||
index]
|
||||
.locationName,
|
||||
style: TextStyle(
|
||||
fontSize: 22.0,
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w600),
|
||||
),
|
||||
image: widget
|
||||
.findusPharmaciesModelList[
|
||||
index]
|
||||
.projectImageURL !=
|
||||
null
|
||||
? Image.network(
|
||||
widget
|
||||
.findusPharmaciesModelList[
|
||||
index]
|
||||
.projectImageURL,
|
||||
fit: BoxFit.cover,
|
||||
)
|
||||
: Image.network(
|
||||
'https://hmgwebservices.com/Images/Hospitals/15.jpg',
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
buttonCancelText:
|
||||
Text('cancel'),
|
||||
// buttonCancelText:Text(model.user.projectID) ,
|
||||
buttonCancelColor:
|
||||
Colors.grey,
|
||||
onlyCancelButton: true,
|
||||
));
|
||||
},
|
||||
child: Container(
|
||||
width: 70,
|
||||
height: 70,
|
||||
child: Image.network(widget
|
||||
.findusPharmaciesModelList[
|
||||
index]
|
||||
.projectImageURL !=
|
||||
null
|
||||
? widget
|
||||
.findusPharmaciesModelList[
|
||||
index]
|
||||
.projectImageURL
|
||||
.toString()
|
||||
: 'https://hmgwebservices.com/Images/Hospitals/15.jpg')),
|
||||
),
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: 5, right: 5),
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Texts(
|
||||
'${widget.findusPharmaciesModelList[index].locationName}',
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
Texts(
|
||||
'${widget.findusPharmaciesModelList[index].cityName}',
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
//model.cOCItemList[index].cOCTitl
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Row(
|
||||
children: [
|
||||
IconButton(
|
||||
// icon: Icon(
|
||||
// Icons
|
||||
// .person_pin_circle_outlined,
|
||||
// color: Colors.red,
|
||||
// ),
|
||||
icon: new Image.asset(
|
||||
'assets/images/new-design/navigate.png'),
|
||||
tooltip: '',
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
MapsLauncher.launchCoordinates(
|
||||
double.parse(widget
|
||||
.findusPharmaciesModelList[
|
||||
index]
|
||||
.latitude),
|
||||
double.parse(widget
|
||||
.findusPharmaciesModelList[
|
||||
index]
|
||||
.longitude),
|
||||
widget
|
||||
.findusPharmaciesModelList[
|
||||
index]
|
||||
.locationName);
|
||||
// _volume += 10;
|
||||
});
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
// icon: Icon(
|
||||
// Icons.phone,
|
||||
// color: Colors.red,
|
||||
// ),
|
||||
icon: new Image.asset(
|
||||
'assets/images/new-design/call.png'),
|
||||
tooltip: 'I',
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
// _volume += 10;
|
||||
launch("tel://" +
|
||||
widget
|
||||
.findusPharmaciesModelList[
|
||||
index]
|
||||
.phoneNumber);
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Divider(
|
||||
height: 4.5,
|
||||
color: Colors.grey[500],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 100,
|
||||
color: Colors.white,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
IconButton(
|
||||
icon: new Image.asset(
|
||||
'assets/images/new-design/youtube.png'),
|
||||
iconSize: 70,
|
||||
tooltip: 'Youtube',
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
// _volume += 10;
|
||||
launch(
|
||||
"https://www.youtube.com/c/DrsulaimanAlhabibHospitals");
|
||||
});
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: new Image.asset(
|
||||
'assets/images/new-design/linkedin.png'),
|
||||
tooltip: 'LinkedIn',
|
||||
iconSize: 70,
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
launch(
|
||||
"https://www.linkedin.com/company/drsulaiman-alhabib-medical-group");
|
||||
});
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: new Image.asset(
|
||||
'assets/images/new-design/twitter.png'),
|
||||
tooltip: 'Twitter',
|
||||
iconSize: 70,
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
launch("https://twitter.com/HMG");
|
||||
});
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: new Image.asset(
|
||||
'assets/images/new-design/facebook.png'),
|
||||
tooltip: 'facebook',
|
||||
iconSize: 70,
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
launch(
|
||||
"https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn");
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
import 'package:diplomaticquarterapp/pages/ContactUs/widgets/card_common_contat.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/location_util.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart';
|
||||
|
||||
class HmgServicePage extends StatefulWidget {
|
||||
@override
|
||||
_HmgServicePageState createState() => _HmgServicePageState();
|
||||
}
|
||||
|
||||
class _HmgServicePageState extends State<HmgServicePage> {
|
||||
|
||||
LocationUtils locationUtils;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
locationUtils =
|
||||
new LocationUtils(isShowConfirmDialog: true, context: context);
|
||||
WidgetsBinding.instance
|
||||
.addPostFrameCallback((_) => locationUtils.getCurrentLocation());
|
||||
|
||||
super.initState();
|
||||
}
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,//widget.isAppbar,
|
||||
appBarTitle: "HMG Services",//TranslationBase.of(context).bookAppo,
|
||||
body: Container(
|
||||
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: CardCommonContact(
|
||||
image: 'assets/images/new-design/find_us_icon.png',
|
||||
text: "Find us",
|
||||
subText: "",
|
||||
type: 0,
|
||||
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: CardCommonContact(
|
||||
image: 'assets/images/new-design/feedback_icon.png',
|
||||
text: "Feedback",
|
||||
subText: "",
|
||||
type: 1),
|
||||
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: CardCommonContact(
|
||||
image: 'assets/images/new-design/live_chat_icon.png',
|
||||
text: "Live Chat",
|
||||
subText: "Service",
|
||||
type: 2,
|
||||
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Opacity(
|
||||
opacity: 0,
|
||||
child: CardCommonContact(
|
||||
image: 'assets/images/new-design/feedback_icon.png',
|
||||
text: "Feedback",
|
||||
subText: "",
|
||||
type: 3),
|
||||
),
|
||||
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,71 @@
|
||||
import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/livechat_page.dart';
|
||||
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
|
||||
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CardCommonContact extends StatelessWidget {
|
||||
final image;
|
||||
final text;
|
||||
final subText;
|
||||
final type;
|
||||
const CardCommonContact(
|
||||
{@required this.image,
|
||||
@required this.text,
|
||||
@required this.subText,
|
||||
@required this.type});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
navigateToSearch(context, this.type);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0),
|
||||
decoration: BoxDecoration(boxShadow: [
|
||||
BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)
|
||||
], borderRadius: BorderRadius.circular(10), color: Colors.white),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
|
||||
child: Text(this.text,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
color: new Color(0xFFc5272d),
|
||||
letterSpacing: 1.0,
|
||||
fontSize: 20.0)),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
|
||||
child: Text(this.subText,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.bottomRight,
|
||||
margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0),
|
||||
child: Image.asset(this.image, width: 60.0, height: 60.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future navigateToSearch(context, type) async {
|
||||
|
||||
if (type == 0) {
|
||||
Navigator.push(context, FadePage(page: FindUsPage()));
|
||||
} else if (type == 1) {
|
||||
Navigator.push(context, FadePage(page: FeedbackHomePage()));
|
||||
} else if (type == 2) {
|
||||
//LiveChatPage
|
||||
Navigator.push(context, FadePage(page: LiveChatPage()));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
|
||||
class ServicesContainer extends StatelessWidget {
|
||||
final String title;
|
||||
final String imageLocation;
|
||||
final Function onTap;
|
||||
|
||||
ServicesContainer({this.title, this.imageLocation, this.onTap});
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: () => onTap(),
|
||||
child: Container(
|
||||
height: 60,
|
||||
margin: EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(7),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
imageLocation,
|
||||
height: 30,
|
||||
width: 40,
|
||||
),
|
||||
SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Texts(
|
||||
title,
|
||||
fontSize: 16,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue