Contact us

merge-update-with-lab-changes
Amjad amireh 5 years ago
parent 5ce252d296
commit 7c48a6f16a

@ -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';
@ -42,7 +41,6 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
children: [ children: [
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( SizedBox(
height: 20, height: 20,
@ -65,8 +63,9 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
), ),
), ),
), ),
SizedBox(height: MediaQuery.of(context).size.height*0.85,), SizedBox(
height: MediaQuery.of(context).size.height * 0.85,
),
SizedBox( SizedBox(
height: 100, height: 100,
), ),
@ -75,78 +74,92 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
Positioned( Positioned(
left: 13, left: 13,
right: 13, right: 13,
top:200, top: 200,
child: Container(width: double.maxFinite, child: Container(
child: Column( width: double.maxFinite,
children: [ child: Column(
...List.generate( children: [
model.LiveChatModelList.length, ...List.generate(
(index) => Container( model.LiveChatModelList.length,
margin: (index) => Container(
EdgeInsets.only(left: 0, right: 0, bottom: 20), margin: EdgeInsets.only(
decoration: BoxDecoration( left: 0, right: 0, bottom: 20),
shape: BoxShape.rectangle, decoration: BoxDecoration(
border: Border.all(color: Colors.white, width: 0.5), shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(5)), border: Border.all(
color: tappedIndex == index color: Colors.white, width: 0.5),
? Colors.red borderRadius: BorderRadius.all(
: Colors.white, Radius.circular(5)),
), color: tappedIndex == index
child: Padding( ? Colors.red
padding: const EdgeInsets.all(8.0), : Colors.white,
child: Column( ),
crossAxisAlignment: CrossAxisAlignment.start, child: Padding(
children: <Widget>[ padding: const EdgeInsets.all(8.0),
InkWell( child: Column(
onTap: () { crossAxisAlignment:
setState(() { CrossAxisAlignment.start,
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>[ children: <Widget>[
SizedBox(width: 20,), InkWell(
Expanded( onTap: () {
setState(() {
child: Container( tappedIndex = index;
margin: EdgeInsets.only( chat =
left: 5, right: 5), "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: Texts( });
'${model.LiveChatModelList[index].projectName}', },
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: color:
tappedIndex == index tappedIndex == index
? Colors.white ? Colors.white
: Colors.black, : Colors.black,
textAlign: ),
TextAlign.center, tooltip: '',
))), //model.cOCItemList[index].cOCTitl onPressed: () {
IconButton( setState(() {});
icon: Icon( },
Icons ),
.arrow_forward_rounded, ],
color:
tappedIndex == index
? Colors.white
: Colors.black,
), ),
tooltip: '', )
onPressed: () {
setState(() {});
},
),
], ],
), ),
) ),
], )),
), ],
), ),
)), ),
],
),),
), ),
], ],
), ),
@ -181,7 +194,3 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
); );
} }
} }

@ -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.92,// 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.9),//width: 0.7 width: 0.9), //width: 0.7
), ),
color: Colors.white), color: Colors.white),
child: Center( child: Center(
@ -75,7 +77,7 @@ class _LiveChatPageState extends State<LiveChatPage> with SingleTickerProviderSt
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: 35.0, right: 35.0), EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Container( Container(
@ -105,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);
}, },
), ),
), ),
), ),
), ),
), ),
); );
} }
} }

@ -4,22 +4,19 @@ import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model
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/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.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() {
@ -32,12 +29,13 @@ 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 BaseView<FindusViewModel>( return BaseView<FindusViewModel>(
onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(), onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(),
builder: (_,model,w)=> AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Locations', appBarTitle: 'Locations',
baseViewModel: model, baseViewModel: model,
@ -65,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.92,// 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.9),//width: 0.7 width: 0.9), //width: 0.7
), ),
color: Colors.white), color: Colors.white),
child: Center( child: Center(
@ -84,7 +82,7 @@ class _FindUsPageState extends State<FindUsPage> with SingleTickerProviderStateM
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: 35.0, right: 35.0), EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Container( Container(
@ -114,8 +112,13 @@ class _FindUsPageState extends State<FindUsPage> with SingleTickerProviderStateM
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
HospitalsPage(findusHospitalModelList: model.FindusHospitalModelList,),//SendFeedbackPage(), HospitalsPage(
PharmaciesPage(findusPharmaciesModelList: model.FindusPharmaciesModelList,)//StatusFeedbackPage() findusHospitalModelList: model.FindusHospitalModelList,
), //SendFeedbackPage(),
PharmaciesPage(
findusPharmaciesModelList:
model.FindusPharmaciesModelList,
) //StatusFeedbackPage()
], ],
), ),
) )

@ -1,4 +1,3 @@
import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.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';
@ -10,11 +9,11 @@ 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 {
final List<GetHMGLocationsModel> findusHospitalModelList; class HospitalsPage extends StatefulWidget {
final List<GetHMGLocationsModel> findusHospitalModelList;
HospitalsPage({Key key, this.findusHospitalModelList}); HospitalsPage({Key key, this.findusHospitalModelList});
@override @override
_HospitalsPageState createState() => _HospitalsPageState(); _HospitalsPageState createState() => _HospitalsPageState();
@ -23,161 +22,209 @@ 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 AppScaffold( return AppScaffold(
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), margin: EdgeInsets.only(left: 15, right: 15, top: 70),
child: Column( child: Column(
children: [ children: [
...List.generate(widget.findusHospitalModelList.length, (index) => Container( ...List.generate(
decoration: BoxDecoration( widget.findusHospitalModelList.length,
shape: BoxShape.rectangle, (index) => Container(
border: Border.all(color: Colors.white, width: 0.5), decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(5)), shape: BoxShape.rectangle,
color: Colors.white, 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: Padding(
child: Column( padding: const EdgeInsets.all(8.0),
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ mainAxisAlignment: MainAxisAlignment.center,
Row( children: <Widget>[
Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
crossAxisAlignment: MainAxisAlignment.spaceBetween,
CrossAxisAlignment.center, crossAxisAlignment:
children: <Widget>[ CrossAxisAlignment.center,
InkWell( children: <Widget>[
onTap:(){ InkWell(
showDialog( onTap: () {
context: context,builder: (_) => AssetGiffyDialog( showDialog(
title: Text(widget.findusHospitalModelList[index].locationName, context: context,
style: TextStyle( builder: (_) =>
fontSize: 22.0, fontWeight: FontWeight.w600), AssetGiffyDialog(
),image:Image.network(widget.findusHospitalModelList[index].projectImageURL.toString(), fit: BoxFit.cover,), title: Text(
buttonCancelText:Text('cancel') , widget
buttonCancelColor: Colors.grey, .findusHospitalModelList[
onlyCancelButton: true, index]
.locationName,
) ); style: TextStyle(
}, fontSize: 22.0,
child: Container( fontWeight:
width: 70, FontWeight
height: 70, .w600),
child: Image.network(widget.findusHospitalModelList[index].projectImageURL.toString())), ),
), image: Image.network(
Expanded( widget
flex: 4, .findusHospitalModelList[
child: Container( index]
margin: EdgeInsets.only(left: 5,right: 5,top: 10,bottom: 1), .projectImageURL
child: Texts('${widget.findusHospitalModelList[index].locationName}',textAlign: TextAlign.center,))),//model.cOCItemList[index].cOCTitl .toString(),
Expanded( fit: BoxFit.cover,
flex: 2, ),
child: Row( buttonCancelText:
crossAxisAlignment: Text('cancel'),
CrossAxisAlignment.center, buttonCancelColor:
Colors.grey,
children: [ onlyCancelButton: true,
IconButton( ));
// icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,), },
icon:new Image.asset('assets/images/new-design/navigate.png'), child: Container(
tooltip: '', width: 70,
onPressed: () { height: 70,
setState(() { child: Image.network(widget
MapsLauncher.launchCoordinates(double.parse(widget.findusHospitalModelList[index].latitude),double.parse(widget.findusHospitalModelList[index].longitude),widget.findusHospitalModelList[index].locationName); .findusHospitalModelList[
index]
}); .projectImageURL
}, .toString())),
), ),
IconButton( Expanded(
// icon: Icon(Icons.phone,color: Colors.red,), flex: 4,
icon:new Image.asset('assets/images/new-design/call.png'), child: Container(
tooltip: '', margin: EdgeInsets.only(
onPressed: () { left: 5,
setState(() { right: 5,
// _volume += 10; top: 10,
launch("tel://" +widget.findusHospitalModelList[index].phoneNumber); 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(
// Texts('${model.FindusHospitalModelList[index].locationName}'), height: 8,
Divider(height: 4.5,color: Colors.grey[500],) ),
], Container(
), width: double.infinity,
), height: 100,
)), color: Colors.white,
SizedBox(height: 8,),
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.linkedin.com/company/drsulaiman-alhabib-medical-group"); "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");
}); });
}, },
), ),
@ -188,8 +235,6 @@ class _HospitalsPageState extends State<HospitalsPage> {
), ),
), ),
), ),
); );
} }
} }

@ -12,9 +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; final List<GetHMGLocationsModel> findusPharmaciesModelList;
PharmaciesPage({Key key, this.findusPharmaciesModelList}); PharmaciesPage({Key key, this.findusPharmaciesModelList});
@override @override
_PharmaciesPageState createState() => _PharmaciesPageState(); _PharmaciesPageState createState() => _PharmaciesPageState();
} }
@ -30,137 +30,177 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
children: [ children: [
...List.generate( ...List.generate(
widget.findusPharmaciesModelList.length, widget.findusPharmaciesModelList.length,
(index) => Container( (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,
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Expanded( Row(
child: Row( mainAxisAlignment:
mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween, children: <Widget>[
crossAxisAlignment: Expanded(
CrossAxisAlignment.center, child: Row(
children: <Widget>[ mainAxisAlignment:
InkWell( MainAxisAlignment.spaceBetween,
onTap:(){ crossAxisAlignment:
showDialog( CrossAxisAlignment.center,
context: context,builder: (_) => AssetGiffyDialog( children: <Widget>[
title: Text(widget.findusPharmaciesModelList[index].locationName, InkWell(
style: TextStyle( onTap: () {
fontSize: 22.0, fontWeight: FontWeight.w600), showDialog(
), context: context,
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,) , builder: (_) =>
buttonCancelText:Text('cancel') , AssetGiffyDialog(
// buttonCancelText:Text(model.user.projectID) , title: Text(
buttonCancelColor: Colors.grey, widget
onlyCancelButton: true, .findusPharmaciesModelList[
index]
) ); .locationName,
}, style: TextStyle(
child: Container( fontSize: 22.0,
width: 70, fontWeight:
height: 70, FontWeight
child: .w600),
Image.network(widget.findusPharmaciesModelList[index].projectImageURL!= null? widget.findusPharmaciesModelList[index].projectImageURL.toString(): 'https://hmgwebservices.com/Images/Hospitals/15.jpg') ), ),
), image: widget
Expanded( .findusPharmaciesModelList[
flex: 4, index]
child: Container( .projectImageURL !=
margin: EdgeInsets.only( null
left: 5, right: 5), ? Image.network(
child: Column( widget
crossAxisAlignment: CrossAxisAlignment.start, .findusPharmaciesModelList[
children: [ index]
Texts( .projectImageURL,
'${widget.findusPharmaciesModelList[index].locationName}', fit: BoxFit.cover,
textAlign: TextAlign.start, )
), : Image.network(
SizedBox(height: 4,), 'https://hmgwebservices.com/Images/Hospitals/15.jpg',
Texts( fit: BoxFit.cover,
'${widget.findusPharmaciesModelList[index].cityName}', ),
textAlign: TextAlign.center, 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,
//model.cOCItemList[index].cOCTitl child: Container(
Expanded( margin: EdgeInsets.only(
flex: 2, left: 5, right: 5),
child: Row( child: Column(
children: [ crossAxisAlignment:
IconButton( CrossAxisAlignment.start,
// icon: Icon( children: [
// Icons Texts(
// .person_pin_circle_outlined, '${widget.findusPharmaciesModelList[index].locationName}',
// color: Colors.red, textAlign: TextAlign.start,
// ), ),
icon:new Image.asset('assets/images/new-design/navigate.png'), SizedBox(
tooltip: height: 4,
'', ),
onPressed: () { Texts(
setState(() { '${widget.findusPharmaciesModelList[index].cityName}',
MapsLauncher.launchCoordinates( textAlign: TextAlign.center,
double.parse(widget.findusPharmaciesModelList[ ),
index] ],
.latitude), ),
double.parse(widget.findusPharmaciesModelList[
index]
.longitude),
widget.findusPharmaciesModelList[
index]
.locationName);
// _volume += 10;
});
},
), ),
IconButton( ),
// icon: Icon( //model.cOCItemList[index].cOCTitl
// Icons.phone, Expanded(
// color: Colors.red, flex: 2,
// ), child: Row(
icon:new Image.asset('assets/images/new-design/call.png'), children: [
tooltip: IconButton(
'I', // icon: Icon(
onPressed: () { // Icons
setState(() { // .person_pin_circle_outlined,
// _volume += 10; // color: Colors.red,
launch("tel://" + // ),
widget.findusPharmaciesModelList[ icon: new Image.asset(
index] 'assets/images/new-design/navigate.png'),
.phoneNumber); 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],
)
], ],
), ),
),
Divider( )),
height: 4.5,
color: Colors.grey[500],
)
],
),
),
)),
SizedBox( SizedBox(
height: 8, height: 8,
), ),

Loading…
Cancel
Save