|
|
|
@ -6,6 +6,7 @@ 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';
|
|
|
|
|
|
|
|
import 'package:giffy_dialog/giffy_dialog.dart';
|
|
|
|
import 'package:maps_launcher/maps_launcher.dart';
|
|
|
|
import 'package:maps_launcher/maps_launcher.dart';
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
|
|
|
|
@ -53,9 +54,7 @@ class PharmacyForPrescriptionsPage extends StatelessWidget {
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
child: Center(
|
|
|
|
child: Center(
|
|
|
|
child: Texts(prescriptionReport.itemDescription.isNotEmpty
|
|
|
|
child: Texts(prescriptionReport.itemDescription.isNotEmpty ? prescriptionReport.itemDescription : prescriptionReport.itemDescriptionN ?? ''),
|
|
|
|
? prescriptionReport.itemDescription
|
|
|
|
|
|
|
|
: prescriptionReport.itemDescriptionN ?? ''),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ -68,70 +67,172 @@ class PharmacyForPrescriptionsPage extends StatelessWidget {
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
itemBuilder: (context, index) => Container(
|
|
|
|
itemBuilder: (context, index) => Container(
|
|
|
|
width: double.infinity,
|
|
|
|
margin: EdgeInsets.all(12.0),
|
|
|
|
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
|
|
|
|
padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(10.0),
|
|
|
|
Radius.circular(10.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
boxShadow: [
|
|
|
|
border: Border.all(color: Colors.grey[200], width: 0.5),
|
|
|
|
BoxShadow(
|
|
|
|
),
|
|
|
|
color: Color(0xff000000).withOpacity(.05),
|
|
|
|
|
|
|
|
//spreadRadius: 5,
|
|
|
|
|
|
|
|
blurRadius: 27,
|
|
|
|
|
|
|
|
offset: Offset(0, -3),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
color: Colors.white),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
ClipRRect(
|
|
|
|
InkWell(
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(5)),
|
|
|
|
onTap: () {
|
|
|
|
child: Image.network(
|
|
|
|
showDialog(
|
|
|
|
model.pharmacyPrescriptionsList[index].projectImageURL,
|
|
|
|
context: context,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
builder: (_) => AssetGiffyDialog(
|
|
|
|
width: 60,
|
|
|
|
title: Text(
|
|
|
|
height: 70,
|
|
|
|
model.pharmacyPrescriptionsList[index].locationDescription,
|
|
|
|
|
|
|
|
style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
image: Image.network(
|
|
|
|
|
|
|
|
model.pharmacyPrescriptionsList[index].projectImageURL.toString(),
|
|
|
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
buttonCancelText: Text(TranslationBase.of(context).cancel),
|
|
|
|
|
|
|
|
buttonCancelColor: Colors.grey,
|
|
|
|
|
|
|
|
onlyCancelButton: true,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: ClipRRect(
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
|
|
|
child: Image.network(
|
|
|
|
|
|
|
|
model.pharmacyPrescriptionsList[index].projectImageURL.toString(),
|
|
|
|
|
|
|
|
width: 48,
|
|
|
|
|
|
|
|
height: 48,
|
|
|
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
padding: EdgeInsets.only(left: 12, right: 12),
|
|
|
|
child: Column(
|
|
|
|
child: Text(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
model.pharmacyPrescriptionsList[index].locationDescription?.trim().toString() +
|
|
|
|
children: <Widget>[
|
|
|
|
"\n" +
|
|
|
|
Texts(model.pharmacyPrescriptionsList[index].locationDescription),
|
|
|
|
model.pharmacyPrescriptionsList[index].cityName.trim().toString() +
|
|
|
|
SizedBox(
|
|
|
|
"\n" +
|
|
|
|
height: 5,
|
|
|
|
model.pharmacyPrescriptionsList[index].distanceInKilometers.toString() +
|
|
|
|
),
|
|
|
|
" " +
|
|
|
|
Texts(model.pharmacyPrescriptionsList[index].cityName),
|
|
|
|
TranslationBase.of(context).km_ ??
|
|
|
|
],
|
|
|
|
"",
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
color: Color(0xff2E303A),
|
|
|
|
|
|
|
|
letterSpacing: -0.56,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
), //model.cOCItemList[index].cOCTitl
|
|
|
|
InkWell(
|
|
|
|
IconButton(
|
|
|
|
onTap: () {
|
|
|
|
icon: Icon(
|
|
|
|
MapsLauncher.launchCoordinates(double.parse(model.pharmacyPrescriptionsList[index].latitude), double.parse(model.pharmacyPrescriptionsList[index].longitude));
|
|
|
|
Icons.location_on,
|
|
|
|
},
|
|
|
|
color: Color(0xff2B353E),
|
|
|
|
child: Icon(
|
|
|
|
|
|
|
|
Icons.pin_drop,
|
|
|
|
|
|
|
|
size: 18,
|
|
|
|
|
|
|
|
color: Colors.red[900],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
constraints: BoxConstraints(),
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
|
|
|
tooltip: '',
|
|
|
|
|
|
|
|
onPressed: () {
|
|
|
|
|
|
|
|
// setState(() {
|
|
|
|
|
|
|
|
MapsLauncher.launchCoordinates(double.parse(model.pharmacyPrescriptionsList[index].latitude), double.parse(model.pharmacyPrescriptionsList[index].longitude),
|
|
|
|
|
|
|
|
model.pharmacyPrescriptionsList[index].locationDescription);
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
IconButton(
|
|
|
|
width: 15,
|
|
|
|
icon: Icon(
|
|
|
|
),
|
|
|
|
Icons.phone,
|
|
|
|
InkWell(
|
|
|
|
color: Color(0xff2B353E),
|
|
|
|
onTap: Feedback.wrapForTap(() {
|
|
|
|
|
|
|
|
launch("tel://${model.pharmacyPrescriptionsList[index].phoneNumber}");
|
|
|
|
|
|
|
|
}, context),
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
child: Icon(
|
|
|
|
|
|
|
|
Icons.call,
|
|
|
|
|
|
|
|
size: 18,
|
|
|
|
|
|
|
|
color: Colors.red[900],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
constraints: BoxConstraints(),
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
|
|
|
tooltip: '',
|
|
|
|
|
|
|
|
onPressed: () {
|
|
|
|
|
|
|
|
// setState(() {
|
|
|
|
|
|
|
|
launch("tel://" + model.pharmacyPrescriptionsList[index].phoneNumber);
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
|
|
|
// margin: EdgeInsets.only(top: 10, left: 10, right: 10),
|
|
|
|
|
|
|
|
// padding: EdgeInsets.all(8.0),
|
|
|
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
|
|
|
// borderRadius: BorderRadius.all(
|
|
|
|
|
|
|
|
// Radius.circular(10.0),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// border: Border.all(color: Colors.grey[200], width: 0.5),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// child: Row(
|
|
|
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
// ClipRRect(
|
|
|
|
|
|
|
|
// borderRadius: BorderRadius.all(Radius.circular(5)),
|
|
|
|
|
|
|
|
// child: Image.network(
|
|
|
|
|
|
|
|
// model.pharmacyPrescriptionsList[index].projectImageURL,
|
|
|
|
|
|
|
|
// fit: BoxFit.cover,
|
|
|
|
|
|
|
|
// width: 60,
|
|
|
|
|
|
|
|
// height: 70,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Expanded(
|
|
|
|
|
|
|
|
// child: Padding(
|
|
|
|
|
|
|
|
// padding: const EdgeInsets.all(8.0),
|
|
|
|
|
|
|
|
// child: Column(
|
|
|
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
// Texts(model.pharmacyPrescriptionsList[index].locationDescription),
|
|
|
|
|
|
|
|
// SizedBox(
|
|
|
|
|
|
|
|
// height: 5,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Texts(model.pharmacyPrescriptionsList[index].cityName),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// InkWell(
|
|
|
|
|
|
|
|
// onTap: () {
|
|
|
|
|
|
|
|
// MapsLauncher.launchCoordinates(double.parse(model.pharmacyPrescriptionsList[index].latitude), double.parse(model.pharmacyPrescriptionsList[index].longitude));
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// child: Icon(
|
|
|
|
|
|
|
|
// Icons.pin_drop,
|
|
|
|
|
|
|
|
// size: 18,
|
|
|
|
|
|
|
|
// color: Colors.red[900],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// SizedBox(
|
|
|
|
|
|
|
|
// width: 15,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// InkWell(
|
|
|
|
|
|
|
|
// onTap: Feedback.wrapForTap(() {
|
|
|
|
|
|
|
|
// launch("tel://${model.pharmacyPrescriptionsList[index].phoneNumber}");
|
|
|
|
|
|
|
|
// }, context),
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// child: Icon(
|
|
|
|
|
|
|
|
// Icons.call,
|
|
|
|
|
|
|
|
// size: 18,
|
|
|
|
|
|
|
|
// color: Colors.red[900],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
itemCount: model.pharmacyPrescriptionsList.length,
|
|
|
|
itemCount: model.pharmacyPrescriptionsList.length,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|