Merge branch 'find_us' into 'master'

Find us

See merge request Cloud_Solution/diplomatic-quarter!54
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit 986a2e92f6

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -1,4 +1,3 @@
import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@ -36,6 +35,12 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
child: Container( child: Container(
margin: EdgeInsets.only(left: 15, right: 15), margin: EdgeInsets.only(left: 15, right: 15),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( SizedBox(
height: 20, height: 20,
@ -49,22 +54,42 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
'assets/images/dashboard_top_bg.png'), 'assets/images/dashboard_top_bg.png'),
fit: BoxFit.cover), fit: BoxFit.cover),
), ),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts( child: Texts(
'You can now talk directly to the appointments department by chat or request a call back\n \nChoose Hospital :', 'You can now talk directly to the appointments department by chat or request a call back\n \nChoose Hospital :',
color: Colors.white, color: Colors.white,
textAlign: TextAlign.center, 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( ...List.generate(
model.LiveChatModelList.length, model.LiveChatModelList.length,
(index) => Container( (index) => Container(
margin: margin: EdgeInsets.only(
EdgeInsets.only(left: 20, right: 20, bottom: 20), left: 0, right: 0, bottom: 20),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5), border: Border.all(
borderRadius: BorderRadius.all(Radius.circular(5)), color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(5)),
color: tappedIndex == index color: tappedIndex == index
? Colors.red ? Colors.red
: Colors.white, : Colors.white,
@ -72,7 +97,8 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
InkWell( InkWell(
onTap: () { onTap: () {
@ -82,34 +108,34 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
"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}"; "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.end,
children: <Widget>[
Expanded(
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceAround, MainAxisAlignment
.spaceAround,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
SizedBox(
width: 20,
),
Expanded( Expanded(
flex: 4,
child: Container( child: Container(
margin: EdgeInsets.only( margin:
left: 5, right: 5), EdgeInsets.only(
left: 5,
right: 5),
child: Texts( child: Texts(
'${model.LiveChatModelList[index].projectName}', '${model.LiveChatModelList[index].projectName}',
color: color:
tappedIndex == index tappedIndex ==
? Colors.white index
: Colors.black, ? Colors
textAlign: .white
TextAlign.center, : Colors
.black,
textAlign: TextAlign
.center,
))), //model.cOCItemList[index].cOCTitl ))), //model.cOCItemList[index].cOCTitl
Expanded(
flex: 1,
child: Row(
children: [
IconButton( IconButton(
icon: Icon( icon: Icon(
Icons Icons
@ -126,20 +152,21 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
), ),
], ],
), ),
), )
], ],
), ),
), ),
)),
], ],
), ),
)
],
), ),
), ),
)), ],
SizedBox(
height: 100,
), ),
Container(
height: MediaQuery.of(context).size.height * 0.20,
width: double.maxFinite,
)
], ],
), ),
), ),

@ -13,7 +13,8 @@ class LiveChatPage extends StatefulWidget {
_LiveChatPageState createState() => _LiveChatPageState(); _LiveChatPageState createState() => _LiveChatPageState();
} }
class _LiveChatPageState extends State<LiveChatPage> with SingleTickerProviderStateMixin{ class _LiveChatPageState extends State<LiveChatPage>
with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
@override @override
void initState() { void initState() {
@ -26,6 +27,7 @@ class _LiveChatPageState extends State<LiveChatPage> with SingleTickerProviderSt
super.dispose(); super.dispose();
_tabController.dispose(); _tabController.dispose();
} }
@override @override
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -56,12 +58,12 @@ class _LiveChatPageState extends State<LiveChatPage> with SingleTickerProviderSt
child: Container( child: Container(
height: 60.0, height: 60.0,
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.92, // 0.9,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
color: Theme.of(context).dividerColor, color: Theme.of(context).dividerColor,
width: 0.7), width: 0.9), //width: 0.7
), ),
color: Colors.white), color: Colors.white),
child: Center( child: Center(
@ -69,11 +71,13 @@ class _LiveChatPageState extends State<LiveChatPage> with SingleTickerProviderSt
isScrollable: true, isScrollable: true,
controller: _tabController, controller: _tabController,
indicatorWeight: 5.0, indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label, //indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800], indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Container( Container(
@ -103,7 +107,7 @@ class _LiveChatPageState extends State<LiveChatPage> with SingleTickerProviderSt
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
HospitalsLiveChatPage(),//SendFeedbackPage(), HospitalsLiveChatPage(), //SendFeedbackPage(),
PhamaciesLiveChatPage() PhamaciesLiveChatPage()
//StatusFeedbackPage() //StatusFeedbackPage()
], ],

@ -20,15 +20,13 @@ class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
String chat; String chat;
@override @override
void initState() void initState() {
{
super.initState(); super.initState();
tappedIndex=-1; tappedIndex = -1;
chat=""; chat = "";
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<LiveChatViewModel>( return BaseView<LiveChatViewModel>(
onModelReady: (model) => model.getLiveChatRequestOrders(), onModelReady: (model) => model.getLiveChatRequestOrders(),
@ -36,29 +34,31 @@ class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only(left: 15,right: 15), margin: EdgeInsets.only(left: 15, right: 15),
child: Column( child: Column(
children: [ children: [
SizedBox(height: 20,), SizedBox(
height: 20,
),
Container( Container(
width: double.infinity, width: double.infinity,
height: 200, height: 200,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: ExactAssetImage( image: ExactAssetImage(''), fit: BoxFit.cover),
''), ),
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,
), ),
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,), SizedBox(
height: 100,
),
], ],
), ),
), ),
), ),
@ -74,17 +74,16 @@ class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
label: 'ٍStart', label: 'ٍStart',
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onTap: () { onTap: () {
print("chat="+chat); print("chat=" + chat);
chat="http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=1"; chat =
"http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=1";
launch(chat); launch(chat);
}, },
), ),
), ),
), ),
), ),
), ),
); );
} }
} }

@ -1,23 +1,22 @@
import 'dart:ui'; 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/hospitrals_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/findus/pharmacies_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/pharmacies_page.dart';
import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/feedback/status_feedback_page.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class FindUsPage extends StatefulWidget { class FindUsPage extends StatefulWidget {
@override @override
_FindUsPageState createState() => _FindUsPageState(); _FindUsPageState createState() => _FindUsPageState();
} }
class _FindUsPageState extends State<FindUsPage> with SingleTickerProviderStateMixin{ class _FindUsPageState extends State<FindUsPage>
with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
@override @override
void initState() { void initState() {
@ -30,12 +29,16 @@ class _FindUsPageState extends State<FindUsPage> with SingleTickerProviderStateM
super.dispose(); super.dispose();
_tabController.dispose(); _tabController.dispose();
} }
@override @override
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return BaseView<FindusViewModel>(
onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Locations', appBarTitle: 'Locations',
baseViewModel: model,
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
appBar: PreferredSize( appBar: PreferredSize(
@ -60,12 +63,12 @@ class _FindUsPageState extends State<FindUsPage> with SingleTickerProviderStateM
child: Container( child: Container(
height: 60.0, height: 60.0,
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.92, // 0.9,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
color: Theme.of(context).dividerColor, color: Theme.of(context).dividerColor,
width: 0.7), width: 0.9), //width: 0.7
), ),
color: Colors.white), color: Colors.white),
child: Center( child: Center(
@ -73,11 +76,13 @@ class _FindUsPageState extends State<FindUsPage> with SingleTickerProviderStateM
isScrollable: true, isScrollable: true,
controller: _tabController, controller: _tabController,
indicatorWeight: 5.0, indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label, //indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800], indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Container( Container(
@ -107,14 +112,20 @@ class _FindUsPageState extends State<FindUsPage> with SingleTickerProviderStateM
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
HospitalsPage(),//SendFeedbackPage(), HospitalsPage(
PharmaciesPage()//StatusFeedbackPage() findusHospitalModelList: model.FindusHospitalModelList,
), //SendFeedbackPage(),
PharmaciesPage(
findusPharmaciesModelList:
model.FindusPharmaciesModelList,
) //StatusFeedbackPage()
], ],
), ),
) )
], ],
), ),
), ),
),
); );
} }
} }

@ -1,4 +1,4 @@
import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart';
import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
@ -9,7 +9,12 @@ import 'package:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart'; import 'package:giffy_dialog/giffy_dialog.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'package:maps_launcher/maps_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart';
class HospitalsPage extends StatefulWidget { class HospitalsPage extends StatefulWidget {
final List<GetHMGLocationsModel> findusHospitalModelList;
HospitalsPage({Key key, this.findusHospitalModelList});
@override @override
_HospitalsPageState createState() => _HospitalsPageState(); _HospitalsPageState createState() => _HospitalsPageState();
} }
@ -17,27 +22,27 @@ class HospitalsPage extends StatefulWidget {
class _HospitalsPageState extends State<HospitalsPage> { class _HospitalsPageState extends State<HospitalsPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<FindusViewModel>( return AppScaffold(
onModelReady: (model) => model.getFindUsRequestOrders(),//model.getCOC(),
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only(left: 15,right: 15,top: 70), // margin: EdgeInsets.only(left: 15,right: 15,top: 70),
margin: EdgeInsets.only(left: 15, right: 15, top: 70),
child: Column( child: Column(
children: [ children: [
...List.generate(model.FindusHospitalModelList.length, (index) => Container( ...List.generate(
widget.findusHospitalModelList.length,
(index) => Container(
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5), border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)), borderRadius: BorderRadius.all(Radius.circular(5)),
color: Colors.white, color: Colors.white,
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Row( Row(
mainAxisAlignment: mainAxisAlignment:
@ -45,127 +50,181 @@ class _HospitalsPageState extends State<HospitalsPage> {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
InkWell( InkWell(
onTap:(){ onTap: () {
showDialog( showDialog(
context: context,builder: (_) => AssetGiffyDialog( context: context,
title: Text(model.FindusHospitalModelList[index].locationName, builder: (_) =>
AssetGiffyDialog(
title: Text(
widget
.findusHospitalModelList[
index]
.locationName,
style: TextStyle( style: TextStyle(
fontSize: 22.0, fontWeight: FontWeight.w600), fontSize: 22.0,
),image:Image.network(model.FindusHospitalModelList[index].projectImageURL.toString(), fit: BoxFit.cover,), fontWeight:
buttonCancelText:Text('cancel') , FontWeight
buttonCancelColor: Colors.grey, .w600),
),
image: Image.network(
widget
.findusHospitalModelList[
index]
.projectImageURL
.toString(),
fit: BoxFit.cover,
),
buttonCancelText:
Text('cancel'),
buttonCancelColor:
Colors.grey,
onlyCancelButton: true, onlyCancelButton: true,
));
) );
}, },
child: Container( child: Container(
width: 70, width: 70,
height: 70, height: 70,
child: Image.network(model.FindusHospitalModelList[index].projectImageURL.toString())), child: Image.network(widget
.findusHospitalModelList[
index]
.projectImageURL
.toString())),
), ),
Expanded( Expanded(
flex: 4, flex: 4,
child: Container( child: Container(
margin: EdgeInsets.only(left: 5,right: 5), margin: EdgeInsets.only(
child: Texts('${model.FindusHospitalModelList[index].locationName}',textAlign: TextAlign.center,))),//model.cOCItemList[index].cOCTitl left: 5,
right: 5,
top: 10,
bottom: 1),
child: Texts(
'${widget.findusHospitalModelList[index].locationName}',
textAlign: TextAlign.center,
))), //model.cOCItemList[index].cOCTitl
Expanded( Expanded(
flex: 2, flex: 2,
child: Row( child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: [ children: [
IconButton( IconButton(
icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,), // icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,),
tooltip: 'Increase volume by 10', icon: new Image.asset(
'assets/images/new-design/navigate.png'),
tooltip: '',
onPressed: () { onPressed: () {
setState(() { setState(() {
MapsLauncher.launchCoordinates(double.parse(model.FindusHospitalModelList[index].latitude),double.parse(model.FindusHospitalModelList[index].longitude),model.FindusHospitalModelList[index].locationName); MapsLauncher.launchCoordinates(
// _volume += 10; double.parse(widget
.findusHospitalModelList[
index]
.latitude),
double.parse(widget
.findusHospitalModelList[
index]
.longitude),
widget
.findusHospitalModelList[
index]
.locationName);
}); });
}, },
), ),
IconButton( IconButton(
icon: Icon(Icons.phone,color: Colors.red,), // icon: Icon(Icons.phone,color: Colors.red,),
tooltip: 'Increase volume by 10', icon: new Image.asset(
'assets/images/new-design/call.png'),
tooltip: '',
onPressed: () { onPressed: () {
setState(() { setState(() {
// _volume += 10; // _volume += 10;
launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); launch("tel://" +
widget
.findusHospitalModelList[
index]
.phoneNumber);
}); });
}, },
), ),
], ],
), ),
), ),
], ],
), ),
), ),
], ],
), ),
// Texts('${model.FindusHospitalModelList[index].locationName}'), // Texts('${model.FindusHospitalModelList[index].locationName}'),
Divider(height: 4.5,color: Colors.grey[500],) Divider(
height: 4.5,
color: Colors.grey[500],
)
], ],
), ),
), ),
)), )),
SizedBox(height: 8,), SizedBox(
Container(width: double.infinity, height: 8,
height: 100,color: Colors.white, ),
Container(
width: double.infinity,
height: 100,
color: Colors.white,
child: Row( child: Row(
mainAxisSize:MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
IconButton( IconButton(
icon: new Image.asset('assets/images/new-design/youtube.png'), icon: new Image.asset(
'assets/images/new-design/youtube.png'),
iconSize: 70, iconSize: 70,
tooltip: 'Youtube', tooltip: 'Youtube',
onPressed: () { onPressed: () {
setState(() { setState(() {
launch(
launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); "https://www.youtube.com/c/DrsulaimanAlhabibHospitals");
}); });
}, },
), ),
IconButton( IconButton(
icon: new Image.asset('assets/images/new-design/linkedin.png'), icon: new Image.asset(
'assets/images/new-design/linkedin.png'),
tooltip: 'LinkedIn', tooltip: 'LinkedIn',
iconSize: 70, iconSize: 70,
onPressed: () { onPressed: () {
setState(() { setState(() {
launch(
launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); "https://www.linkedin.com/company/drsulaiman-alhabib-medical-group");
}); });
}, },
), ),
IconButton( IconButton(
icon: new Image.asset('assets/images/new-design/twitter.png'), icon: new Image.asset(
'assets/images/new-design/twitter.png'),
tooltip: 'Twitter', tooltip: 'Twitter',
iconSize: 70, iconSize: 70,
onPressed: () { onPressed: () {
setState(() { setState(() {
launch("https://twitter.com/HMG"); launch("https://twitter.com/HMG");
}); });
}, },
), ),
IconButton( IconButton(
icon: new Image.asset('assets/images/new-design/facebook.png'), icon: new Image.asset(
'assets/images/new-design/facebook.png'),
tooltip: 'facebook', tooltip: 'facebook',
iconSize: 70, iconSize: 70,
onPressed: () { onPressed: () {
setState(() { setState(() {
launch(
launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); "https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn");
}); });
}, },
), ),
@ -176,9 +235,6 @@ class _HospitalsPageState extends State<HospitalsPage> {
), ),
), ),
), ),
),
); );
} }
} }

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; 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/core/viewModels/contactus/findus_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
@ -11,6 +12,9 @@ import 'package:maps_launcher/maps_launcher.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class PharmaciesPage extends StatefulWidget { class PharmaciesPage extends StatefulWidget {
final List<GetHMGLocationsModel> findusPharmaciesModelList;
PharmaciesPage({Key key, this.findusPharmaciesModelList});
@override @override
_PharmaciesPageState createState() => _PharmaciesPageState(); _PharmaciesPageState createState() => _PharmaciesPageState();
} }
@ -18,17 +22,14 @@ class PharmaciesPage extends StatefulWidget {
class _PharmaciesPageState extends State<PharmaciesPage> { class _PharmaciesPageState extends State<PharmaciesPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<FindusViewModel>( return AppScaffold(
onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(),
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only(left: 15, right: 15, top: 70), margin: EdgeInsets.only(left: 15, right: 15, top: 70),
child: Column( child: Column(
children: [ children: [
...List.generate( ...List.generate(
model.FindusPharmaciesModelList.length, widget.findusPharmaciesModelList.length,
(index) => Container( (index) => Container(
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
@ -53,28 +54,60 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
InkWell( InkWell(
onTap:(){ onTap: () {
showDialog( showDialog(
context: context,builder: (_) => AssetGiffyDialog( context: context,
title: Text(model.FindusPharmaciesModelList[index].locationName, builder: (_) =>
AssetGiffyDialog(
title: Text(
widget
.findusPharmaciesModelList[
index]
.locationName,
style: TextStyle( style: TextStyle(
fontSize: 22.0, fontWeight: FontWeight.w600), fontSize: 22.0,
),image:Image.network(model.FindusPharmaciesModelList[index].projectImageURL.toString(), fit: BoxFit.cover,), fontWeight:
buttonCancelText:Text('cancel') , 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) , // buttonCancelText:Text(model.user.projectID) ,
buttonCancelColor: Colors.grey, buttonCancelColor:
Colors.grey,
onlyCancelButton: true, onlyCancelButton: true,
));
) );
}, },
child: Container( child: Container(
width: 70, width: 70,
height: 70, height: 70,
child: Image.network(model child: Image.network(widget
.FindusPharmaciesModelList[ .findusPharmaciesModelList[
index]
.projectImageURL !=
null
? widget
.findusPharmaciesModelList[
index] index]
.projectImageURL .projectImageURL
.toString())), .toString()
: 'https://hmgwebservices.com/Images/Hospitals/15.jpg')),
), ),
Expanded( Expanded(
flex: 4, flex: 4,
@ -82,15 +115,18 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 5, right: 5), left: 5, right: 5),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(
'${model.FindusPharmaciesModelList[index].locationName}', '${widget.findusPharmaciesModelList[index].locationName}',
textAlign: TextAlign.start, textAlign: TextAlign.start,
), ),
SizedBox(height: 4,), SizedBox(
height: 4,
),
Texts( Texts(
'${model.FindusPharmaciesModelList[index].cityName}', '${widget.findusPharmaciesModelList[index].cityName}',
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
], ],
@ -103,26 +139,27 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
child: Row( child: Row(
children: [ children: [
IconButton( IconButton(
icon: Icon( // icon: Icon(
Icons // Icons
.person_pin_circle_outlined, // .person_pin_circle_outlined,
color: Colors.red, // color: Colors.red,
), // ),
tooltip: icon: new Image.asset(
'Increase volume by 10', 'assets/images/new-design/navigate.png'),
tooltip: '',
onPressed: () { onPressed: () {
setState(() { setState(() {
MapsLauncher.launchCoordinates( MapsLauncher.launchCoordinates(
double.parse(model double.parse(widget
.FindusPharmaciesModelList[ .findusPharmaciesModelList[
index] index]
.latitude), .latitude),
double.parse(model double.parse(widget
.FindusPharmaciesModelList[ .findusPharmaciesModelList[
index] index]
.longitude), .longitude),
model widget
.FindusPharmaciesModelList[ .findusPharmaciesModelList[
index] index]
.locationName); .locationName);
// _volume += 10; // _volume += 10;
@ -130,18 +167,19 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
}, },
), ),
IconButton( IconButton(
icon: Icon( // icon: Icon(
Icons.phone, // Icons.phone,
color: Colors.red, // color: Colors.red,
), // ),
tooltip: icon: new Image.asset(
'Increase volume by 10', 'assets/images/new-design/call.png'),
tooltip: 'I',
onPressed: () { onPressed: () {
setState(() { setState(() {
// _volume += 10; // _volume += 10;
launch("tel://" + launch("tel://" +
model widget
.FindusPharmaciesModelList[ .findusPharmaciesModelList[
index] index]
.phoneNumber); .phoneNumber);
}); });
@ -155,7 +193,6 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
), ),
], ],
), ),
Divider( Divider(
height: 4.5, height: 4.5,
color: Colors.grey[500], color: Colors.grey[500],
@ -196,7 +233,7 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
onPressed: () { onPressed: () {
setState(() { setState(() {
launch( launch(
"https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); "https://www.linkedin.com/company/drsulaiman-alhabib-medical-group");
}); });
}, },
), ),
@ -230,7 +267,6 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
), ),
), ),
), ),
),
); );
} }
} }

Loading…
Cancel
Save