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,80 +35,107 @@ 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: [ children: [
SizedBox( Stack(
height: 20, children: [
), Column(
Container( crossAxisAlignment: CrossAxisAlignment.start,
width: double.infinity, children: [
height: 200, SizedBox(
decoration: BoxDecoration( height: 20,
image: DecorationImage( ),
image: ExactAssetImage( Container(
'assets/images/dashboard_top_bg.png'), width: double.infinity,
fit: BoxFit.cover), height: 200,
),
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.center,
),
),
///////////
...List.generate(
model.LiveChatModelList.length,
(index) => Container(
margin:
EdgeInsets.only(left: 20, right: 20, bottom: 20),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, image: DecorationImage(
border: Border.all(color: Colors.white, width: 0.5), image: ExactAssetImage(
borderRadius: BorderRadius.all(Radius.circular(5)), 'assets/images/dashboard_top_bg.png'),
color: tappedIndex == index fit: BoxFit.cover),
? Colors.red
: Colors.white,
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Texts(
crossAxisAlignment: CrossAxisAlignment.start, 'You can now talk directly to the appointments department by chat or request a call back\n \nChoose Hospital :',
children: <Widget>[ color: Colors.white,
InkWell( textAlign: TextAlign.start,
onTap: () { ),
setState(() { ),
tappedIndex = index; ),
chat = SizedBox(
"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}"; height: MediaQuery.of(context).size.height * 0.85,
}); ),
}, SizedBox(
child: Row( height: 100,
mainAxisAlignment: MainAxisAlignment.end, ),
children: <Widget>[ ],
Expanded( ),
child: Row( Positioned(
mainAxisAlignment: left: 13,
MainAxisAlignment.spaceAround, 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:
CrossAxisAlignment.center, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Expanded( InkWell(
flex: 4, onTap: () {
child: Container( setState(() {
margin: EdgeInsets.only( tappedIndex = index;
left: 5, right: 5), chat =
child: Texts( "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}";
'${model.LiveChatModelList[index].projectName}', });
color: },
tappedIndex == index
? Colors.white
: Colors.black,
textAlign:
TextAlign.center,
))), //model.cOCItemList[index].cOCTitl
Expanded(
flex: 1,
child: Row( child: Row(
children: [ 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( 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,90 +29,102 @@ 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>(
isShowAppBar: true, onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(),
appBarTitle: 'Locations', builder: (_, model, w) => AppScaffold(
body: Scaffold( isShowAppBar: true,
extendBodyBehindAppBar: true, appBarTitle: 'Locations',
appBar: PreferredSize( baseViewModel: model,
preferredSize: Size.fromHeight(65.0), body: Scaffold(
child: Stack( extendBodyBehindAppBar: true,
children: <Widget>[ appBar: PreferredSize(
Positioned( preferredSize: Size.fromHeight(65.0),
bottom: 1, child: Stack(
left: 0, children: <Widget>[
right: 0, Positioned(
child: BackdropFilter( bottom: 1,
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), left: 0,
child: Container( right: 0,
color: Theme.of(context) child: BackdropFilter(
.scaffoldBackgroundColor filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
.withOpacity(0.8), child: Container(
height: 70.0, color: Theme.of(context)
.scaffoldBackgroundColor
.withOpacity(0.8),
height: 70.0,
),
), ),
), ),
), Center(
Center( 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.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.7),
),
color: Colors.white),
child: Center(
child: TabBar(
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts(' Hospitals '),
),
), ),
Container( color: Colors.white),
width: MediaQuery.of(context).size.width * 0.30, child: Center(
child: Center( child: TabBar(
child: Texts(' Pharmacies '), 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()
],
),
)
], ],
), ),
), ),
body: Column(
children: <Widget>[
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
HospitalsPage(),//SendFeedbackPage(),
PharmaciesPage()//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,168 +22,219 @@ 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(), body: SingleChildScrollView(
builder: (_, model, widget) => AppScaffold( child: Container(
baseViewModel: model, // margin: EdgeInsets.only(left: 15,right: 15,top: 70),
body: SingleChildScrollView( margin: EdgeInsets.only(left: 15, right: 15, top: 70),
child: Container( child: Column(
margin: EdgeInsets.only(left: 15,right: 15,top: 70), children: [
child: Column( ...List.generate(
children: [ widget.findusHospitalModelList.length,
...List.generate(model.FindusHospitalModelList.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, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Row( Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
InkWell(
onTap:(){
showDialog(
context: context,builder: (_) => AssetGiffyDialog(
title: Text(model.FindusHospitalModelList[index].locationName,
style: TextStyle(
fontSize: 22.0, fontWeight: FontWeight.w600),
),image:Image.network(model.FindusHospitalModelList[index].projectImageURL.toString(), fit: BoxFit.cover,),
buttonCancelText:Text('cancel') ,
buttonCancelColor: Colors.grey,
onlyCancelButton: true,
) );
},
child: Container(
width: 70,
height: 70,
child: Image.network(model.FindusHospitalModelList[index].projectImageURL.toString())),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.only(left: 5,right: 5),
child: Texts('${model.FindusHospitalModelList[index].locationName}',textAlign: TextAlign.center,))),//model.cOCItemList[index].cOCTitl
Expanded( Expanded(
flex: 2,
child: Row( child: Row(
children: [ mainAxisAlignment:
IconButton( MainAxisAlignment.spaceBetween,
icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,), crossAxisAlignment:
tooltip: 'Increase volume by 10', CrossAxisAlignment.center,
onPressed: () { children: <Widget>[
setState(() { InkWell(
MapsLauncher.launchCoordinates(double.parse(model.FindusHospitalModelList[index].latitude),double.parse(model.FindusHospitalModelList[index].longitude),model.FindusHospitalModelList[index].locationName); onTap: () {
// _volume += 10; 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())),
), ),
IconButton( Expanded(
icon: Icon(Icons.phone,color: Colors.red,), flex: 4,
tooltip: 'Increase volume by 10', child: Container(
onPressed: () { margin: EdgeInsets.only(
setState(() { left: 5,
// _volume += 10; right: 5,
launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); 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],
)
],
),
), ),
// Texts('${model.FindusHospitalModelList[index].locationName}'), )),
Divider(height: 4.5,color: Colors.grey[500],) SizedBox(
], height: 8,
), ),
), Container(
)), width: double.infinity,
SizedBox(height: 8,), height: 100,
Container(width: double.infinity, color: Colors.white,
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");
}); });
}, },
), ),
], ],
), ),
), ),
], ],
),
), ),
), ),
), ),
); );
} }
} }

@ -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,216 +22,248 @@ 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(), body: SingleChildScrollView(
builder: (_, model, widget) => AppScaffold( child: Container(
baseViewModel: model, margin: EdgeInsets.only(left: 15, right: 15, top: 70),
body: SingleChildScrollView( child: Column(
child: Container( children: [
margin: EdgeInsets.only(left: 15, right: 15, top: 70), ...List.generate(
child: Column( widget.findusPharmaciesModelList.length,
children: [ (index) => Container(
...List.generate( decoration: BoxDecoration(
model.FindusPharmaciesModelList.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)), child: Padding(
color: Colors.white, padding: const EdgeInsets.all(8.0),
), child: Column(
child: Padding( crossAxisAlignment: CrossAxisAlignment.start,
padding: const EdgeInsets.all(8.0), children: <Widget>[
child: Column( Row(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment:
children: <Widget>[ MainAxisAlignment.spaceBetween,
Row( children: <Widget>[
mainAxisAlignment: Expanded(
MainAxisAlignment.spaceBetween, child: Row(
children: <Widget>[ mainAxisAlignment:
Expanded( MainAxisAlignment.spaceBetween,
child: Row( crossAxisAlignment:
mainAxisAlignment: CrossAxisAlignment.center,
MainAxisAlignment.spaceBetween, children: <Widget>[
crossAxisAlignment: InkWell(
CrossAxisAlignment.center, onTap: () {
children: <Widget>[ showDialog(
InkWell( context: context,
onTap:(){ builder: (_) =>
showDialog( AssetGiffyDialog(
context: context,builder: (_) => AssetGiffyDialog( title: Text(
title: Text(model.FindusPharmaciesModelList[index].locationName, widget
style: TextStyle( .findusPharmaciesModelList[
fontSize: 22.0, fontWeight: FontWeight.w600), index]
),image:Image.network(model.FindusPharmaciesModelList[index].projectImageURL.toString(), fit: BoxFit.cover,), .locationName,
buttonCancelText:Text('cancel') , style: TextStyle(
// buttonCancelText:Text(model.user.projectID) , fontSize: 22.0,
buttonCancelColor: Colors.grey, fontWeight:
onlyCancelButton: true, FontWeight
.w600),
) ); ),
}, image: widget
child: Container( .findusPharmaciesModelList[
width: 70, index]
height: 70, .projectImageURL !=
child: Image.network(model null
.FindusPharmaciesModelList[ ? Image.network(
index] widget
.projectImageURL .findusPharmaciesModelList[
.toString())), index]
), .projectImageURL,
Expanded( fit: BoxFit.cover,
flex: 4, )
child: Container( : Image.network(
margin: EdgeInsets.only( 'https://hmgwebservices.com/Images/Hospitals/15.jpg',
left: 5, right: 5), fit: BoxFit.cover,
child: Column( ),
crossAxisAlignment: CrossAxisAlignment.start, buttonCancelText:
children: [ Text('cancel'),
Texts( // buttonCancelText:Text(model.user.projectID) ,
'${model.FindusPharmaciesModelList[index].locationName}', buttonCancelColor:
textAlign: TextAlign.start, Colors.grey,
), onlyCancelButton: true,
SizedBox(height: 4,), ));
Texts( },
'${model.FindusPharmaciesModelList[index].cityName}', child: Container(
textAlign: TextAlign.center, width: 70,
), height: 70,
], child: Image.network(widget
), .findusPharmaciesModelList[
), index]
), .projectImageURL !=
//model.cOCItemList[index].cOCTitl null
Expanded( ? widget
flex: 2, .findusPharmaciesModelList[
child: Row( 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: [ children: [
IconButton( Texts(
icon: Icon( '${widget.findusPharmaciesModelList[index].locationName}',
Icons textAlign: TextAlign.start,
.person_pin_circle_outlined,
color: Colors.red,
),
tooltip:
'Increase volume by 10',
onPressed: () {
setState(() {
MapsLauncher.launchCoordinates(
double.parse(model
.FindusPharmaciesModelList[
index]
.latitude),
double.parse(model
.FindusPharmaciesModelList[
index]
.longitude),
model
.FindusPharmaciesModelList[
index]
.locationName);
// _volume += 10;
});
},
), ),
IconButton( SizedBox(
icon: Icon( height: 4,
Icons.phone, ),
color: Colors.red, Texts(
), '${widget.findusPharmaciesModelList[index].cityName}',
tooltip: textAlign: TextAlign.center,
'Increase volume by 10',
onPressed: () {
setState(() {
// _volume += 10;
launch("tel://" +
model
.FindusPharmaciesModelList[
index]
.phoneNumber);
});
},
), ),
], ],
), ),
), ),
], ),
), //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( Divider(
height: 4.5, height: 4.5,
color: Colors.grey[500], color: Colors.grey[500],
) )
], ],
),
), ),
)), ),
SizedBox( )),
height: 8, SizedBox(
), height: 8,
Container( ),
width: double.infinity, Container(
height: 100, width: double.infinity,
color: Colors.white, height: 100,
child: Row( color: Colors.white,
mainAxisSize: MainAxisSize.max, child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisSize: MainAxisSize.max,
children: [ mainAxisAlignment: MainAxisAlignment.spaceAround,
IconButton( children: [
icon: new Image.asset( IconButton(
'assets/images/new-design/youtube.png'), icon: new Image.asset(
iconSize: 70, 'assets/images/new-design/youtube.png'),
tooltip: 'Youtube', iconSize: 70,
onPressed: () { tooltip: 'Youtube',
setState(() { onPressed: () {
// _volume += 10; setState(() {
launch( // _volume += 10;
"https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); launch(
}); "https://www.youtube.com/c/DrsulaimanAlhabibHospitals");
}, });
), },
IconButton( ),
icon: new Image.asset( IconButton(
'assets/images/new-design/linkedin.png'), icon: new Image.asset(
tooltip: 'LinkedIn', 'assets/images/new-design/linkedin.png'),
iconSize: 70, tooltip: 'LinkedIn',
onPressed: () { iconSize: 70,
setState(() { onPressed: () {
launch( setState(() {
"https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); launch(
}); "https://www.linkedin.com/company/drsulaiman-alhabib-medical-group");
}, });
), },
IconButton( ),
icon: new Image.asset( IconButton(
'assets/images/new-design/twitter.png'), icon: new Image.asset(
tooltip: 'Twitter', 'assets/images/new-design/twitter.png'),
iconSize: 70, tooltip: 'Twitter',
onPressed: () { iconSize: 70,
setState(() { onPressed: () {
launch("https://twitter.com/HMG"); setState(() {
}); launch("https://twitter.com/HMG");
}, });
), },
IconButton( ),
icon: new Image.asset( IconButton(
'assets/images/new-design/facebook.png'), icon: new Image.asset(
tooltip: 'facebook', 'assets/images/new-design/facebook.png'),
iconSize: 70, tooltip: 'facebook',
onPressed: () { iconSize: 70,
setState(() { onPressed: () {
launch( setState(() {
"https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); launch(
}); "https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn");
}, });
), },
], ),
), ],
), ),
], ),
), ],
), ),
), ),
), ),

Loading…
Cancel
Save