merge-update-with-lab-changes
Sultan Khan 5 years ago
parent 03ff56f2de
commit 79502de682

@ -112,8 +112,7 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
children: [
IconButton(
icon: Icon(
Icons
.arrow_forward_rounded,
Icons.arrow_forward,
color:
tappedIndex == index
? Colors.white

@ -1,4 +1,3 @@
import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
@ -9,6 +8,7 @@ import 'package:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:maps_launcher/maps_launcher.dart';
class HospitalsPage extends StatefulWidget {
@override
_HospitalsPageState createState() => _HospitalsPageState();
@ -18,167 +18,220 @@ class _HospitalsPageState extends State<HospitalsPage> {
@override
Widget build(BuildContext context) {
return BaseView<FindusViewModel>(
onModelReady: (model) => model.getFindUsRequestOrders(),//model.getCOC(),
onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(),
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(left: 15,right: 15,top: 70),
margin: EdgeInsets.only(left: 15, right: 15, top: 70),
child: Column(
children: [
...List.generate(model.FindusHospitalModelList.length, (index) => Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)),
color: Colors.white,
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
InkWell(
onTap:(){
showDialog(
context: context,builder: (_) => AssetGiffyDialog(
title: Text(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(
flex: 2,
child: Row(
children: [
IconButton(
icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,),
tooltip: 'Increase volume by 10',
onPressed: () {
setState(() {
MapsLauncher.launchCoordinates(double.parse(model.FindusHospitalModelList[index].latitude),double.parse(model.FindusHospitalModelList[index].longitude),model.FindusHospitalModelList[index].locationName);
// _volume += 10;
});
},
),
IconButton(
icon: Icon(Icons.phone,color: Colors.red,),
tooltip: 'Increase volume by 10',
onPressed: () {
setState(() {
// _volume += 10;
launch("tel://" +model.FindusHospitalModelList[index].phoneNumber);
});
},
),
],
...List.generate(
model.FindusHospitalModelList.length,
(index) => Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)),
color: Colors.white,
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
InkWell(
onTap: () {
showDialog(
context: context,
builder: (_) =>
AssetGiffyDialog(
title: Text(
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(
flex: 2,
child: Row(
children: [
IconButton(
icon: Icon(
Icons.person_pin_circle,
color: Colors.red,
),
tooltip:
'Increase volume by 10',
onPressed: () {
setState(() {
MapsLauncher.launchCoordinates(
double.parse(model
.FindusHospitalModelList[
index]
.latitude),
double.parse(model
.FindusHospitalModelList[
index]
.longitude),
model
.FindusHospitalModelList[
index]
.locationName);
// _volume += 10;
});
},
),
IconButton(
icon: Icon(
Icons.phone,
color: Colors.red,
),
tooltip:
'Increase volume by 10',
onPressed: () {
setState(() {
// _volume += 10;
launch("tel://" +
model
.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,
height: 100,color: Colors.white,
child: Row(
mainAxisSize:MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
IconButton(
icon: new Image.asset('assets/images/new-design/youtube.png'),
iconSize: 70,
tooltip: 'Youtube',
onPressed: () {
setState(() {
launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals");
});
},
),
IconButton(
icon: new Image.asset('assets/images/new-design/linkedin.png'),
tooltip: 'LinkedIn',
iconSize: 70,
onPressed: () {
setState(() {
launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals");
});
},
),
IconButton(
icon: new Image.asset('assets/images/new-design/twitter.png'),
tooltip: 'Twitter',
iconSize: 70,
onPressed: () {
setState(() {
launch("https://twitter.com/HMG");
});
},
),
IconButton(
icon: new Image.asset('assets/images/new-design/facebook.png'),
tooltip: 'facebook',
iconSize: 70,
onPressed: () {
setState(() {
launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn");
});
},
),
],
),
)),
SizedBox(
height: 8,
),
Container(
width: double.infinity,
height: 100,
color: Colors.white,
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
IconButton(
icon: new Image.asset(
'assets/images/new-design/youtube.png'),
iconSize: 70,
tooltip: 'Youtube',
onPressed: () {
setState(() {
launch(
"https://www.youtube.com/c/DrsulaimanAlhabibHospitals");
});
},
),
IconButton(
icon: new Image.asset(
'assets/images/new-design/linkedin.png'),
tooltip: 'LinkedIn',
iconSize: 70,
onPressed: () {
setState(() {
launch(
"https://www.youtube.com/c/DrsulaimanAlhabibHospitals");
});
},
),
IconButton(
icon: new Image.asset(
'assets/images/new-design/twitter.png'),
tooltip: 'Twitter',
iconSize: 70,
onPressed: () {
setState(() {
launch("https://twitter.com/HMG");
});
},
),
IconButton(
icon: new Image.asset(
'assets/images/new-design/facebook.png'),
tooltip: 'facebook',
iconSize: 70,
onPressed: () {
setState(() {
launch(
"https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn");
});
},
),
],
),
),
],
),
),
),
),
);
}
}

@ -53,19 +53,37 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
CrossAxisAlignment.center,
children: <Widget>[
InkWell(
onTap:(){
onTap: () {
showDialog(
context: context,builder: (_) => AssetGiffyDialog(
title: Text(model.FindusPharmaciesModelList[index].locationName,
style: TextStyle(
fontSize: 22.0, fontWeight: FontWeight.w600),
),image:Image.network(model.FindusPharmaciesModelList[index].projectImageURL.toString(), fit: BoxFit.cover,),
buttonCancelText:Text('cancel') ,
// buttonCancelText:Text(model.user.projectID) ,
buttonCancelColor: Colors.grey,
onlyCancelButton: true,
) );
context: context,
builder: (_) =>
AssetGiffyDialog(
title: Text(
model
.FindusPharmaciesModelList[
index]
.locationName,
style: TextStyle(
fontSize: 22.0,
fontWeight:
FontWeight
.w600),
),
image: Image.network(
model
.FindusPharmaciesModelList[
index]
.projectImageURL
.toString(),
fit: BoxFit.cover,
),
buttonCancelText:
Text('cancel'),
// buttonCancelText:Text(model.user.projectID) ,
buttonCancelColor:
Colors.grey,
onlyCancelButton: true,
));
},
child: Container(
width: 70,
@ -82,13 +100,16 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
margin: EdgeInsets.only(
left: 5, right: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
'${model.FindusPharmaciesModelList[index].locationName}',
textAlign: TextAlign.start,
),
SizedBox(height: 4,),
SizedBox(
height: 4,
),
Texts(
'${model.FindusPharmaciesModelList[index].cityName}',
textAlign: TextAlign.center,
@ -104,8 +125,7 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
children: [
IconButton(
icon: Icon(
Icons
.person_pin_circle_outlined,
Icons.person_pin_circle,
color: Colors.red,
),
tooltip:
@ -155,7 +175,6 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
),
],
),
Divider(
height: 4.5,
color: Colors.grey[500],

Loading…
Cancel
Save