Merge branch 'patient_app_services' into 'development'

fix pharmacies list

See merge request Cloud_Solution/doctor_app_flutter!519
merge-requests/521/merge
Mohammad Aljammal 4 years ago
commit 5560955bd7

@ -23,7 +23,6 @@ class PharmaciesListScreen extends StatefulWidget {
final String url;
// In the constructor, require a item id.
PharmaciesListScreen({Key key, @required this.itemID, this.url})
: super(key: key);
@ -32,18 +31,9 @@ class PharmaciesListScreen extends StatefulWidget {
}
class _PharmaciesListState extends State<PharmaciesListScreen> {
var _data;
Helpers helpers = new Helpers();
ProjectViewModel projectsProvider;
bool _isInit = true;
//bool _isOutOfStuck = false;
@override
void didChangeDependencies() {
super.didChangeDependencies();
_isInit = false;
}
@override
Widget build(BuildContext context) {
@ -145,90 +135,90 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
? Alignment.topRight
: Alignment.topLeft,
),
Expanded(
child: Container(
width: SizeConfig.screenWidth * 0.99,
child: ListView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: model.pharmaciesList == null ? 0 : model
.pharmaciesList.length,
itemBuilder: (BuildContext context, int index) {
return RoundedContainer(
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: ClipRRect(
borderRadius:
BorderRadius.all(Radius.circular(7)),
child: Image.network(
model
.pharmaciesList[index]["ProjectImageURL"],
height:
SizeConfig.imageSizeMultiplier * 15,
width:
SizeConfig.imageSizeMultiplier * 15,
fit: BoxFit.cover,
),
),
),
Expanded(
flex: 4,
child: AppText(
Container(
width: SizeConfig.screenWidth * 0.99,
margin: EdgeInsets.only(left: 10,right: 10),
child: ListView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: model.pharmaciesList == null ? 0 : model
.pharmaciesList.length,
itemBuilder: (BuildContext context, int index) {
return RoundedContainer(
margin: EdgeInsets.only(top: 5),
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: ClipRRect(
borderRadius:
BorderRadius.all(Radius.circular(7)),
child: Image.network(
model
.pharmaciesList[index]["LocationDescription"],
margin: 10,
.pharmaciesList[index]["ProjectImageURL"],
height:
SizeConfig.imageSizeMultiplier * 15,
width:
SizeConfig.imageSizeMultiplier * 15,
fit: BoxFit.cover,
),
),
Expanded(
flex: 2,
child: Wrap(
direction: Axis.horizontal,
alignment: WrapAlignment.end,
crossAxisAlignment: WrapCrossAlignment.end,
children: <Widget>[
Padding(
padding: EdgeInsets.all(5),
child: InkWell(
child: Icon(
Icons.call,
color: Colors.red,
),
onTap: () =>
launch("tel://" +
model
.pharmaciesList[index]["PhoneNumber"]),
),
Expanded(
flex: 4,
child: AppText(
model
.pharmaciesList[index]["LocationDescription"],
margin: 10,
),
),
Expanded(
flex: 2,
child: Wrap(
direction: Axis.horizontal,
alignment: WrapAlignment.end,
crossAxisAlignment: WrapCrossAlignment.end,
children: <Widget>[
Padding(
padding: EdgeInsets.all(5),
child: InkWell(
child: Icon(
Icons.call,
color: Colors.red,
),
onTap: () =>
launch("tel://" +
model
.pharmaciesList[index]["PhoneNumber"]),
),
Padding(
padding: EdgeInsets.all(5),
child: InkWell(
child: Icon(
Icons.pin_drop,
color: Colors.red,
),
onTap: () {
MapsLauncher.launchCoordinates(
double.parse(
model
.pharmaciesList[index]["Latitude"]),
double.parse(
model
.pharmaciesList[index]["Longitude"]),
model.pharmaciesList[index]
["LocationDescription"]);
},
),
Padding(
padding: EdgeInsets.all(5),
child: InkWell(
child: Icon(
Icons.pin_drop,
color: Colors.red,
),
onTap: () {
MapsLauncher.launchCoordinates(
double.parse(
model
.pharmaciesList[index]["Latitude"]),
double.parse(
model
.pharmaciesList[index]["Longitude"]),
model.pharmaciesList[index]
["LocationDescription"]);
},
),
],
),
),
],
),
],
),
);
}),
),
),
],
),
);
}),
)
]),
),),);

Loading…
Cancel
Save