|
|
|
|
@ -20,6 +20,7 @@ import 'package:flutter_svg/svg.dart';
|
|
|
|
|
import 'package:rating_bar/rating_bar.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/pharmacies/product-brands.dart';
|
|
|
|
|
|
|
|
|
|
import '../../final_products_page.dart';
|
|
|
|
|
import 'lacum-activitaion-vida-page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
|
|
|
|
|
@ -48,8 +49,8 @@ class PharmacyPage extends StatelessWidget {
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
BannerPager(model),
|
|
|
|
|
// GridViewButtons(model),
|
|
|
|
|
BannerPager(model),
|
|
|
|
|
GridViewButtons(model),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(10, 10, 10, 10),
|
|
|
|
|
child: Row(
|
|
|
|
|
@ -77,181 +78,193 @@ class PharmacyPage extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 24.0),
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.symmetric(horizontal: 16.0, vertical: 24.0),
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.30,
|
|
|
|
|
// width: 200.0,
|
|
|
|
|
// height: MediaQuery.of(context).size.height / 4 + 20,
|
|
|
|
|
margin: EdgeInsets.only(left: 10),
|
|
|
|
|
child: BaseView<PharmacyModuleViewModel>(
|
|
|
|
|
onModelReady: (model) => model.getPrescription(),
|
|
|
|
|
builder: (_, model, wi) => model.prescriptionsList.length != 0
|
|
|
|
|
onModelReady: (model) => model.getPrescription(),
|
|
|
|
|
builder: (_, model, wi) => model.prescriptionsList.length !=
|
|
|
|
|
0
|
|
|
|
|
// model.getPrescription();
|
|
|
|
|
? ListView.builder(
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
|
// physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
// itemCount: 4,
|
|
|
|
|
itemCount: model.prescriptionsList.length,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return Container(
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
|
// physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
// itemCount: 4,
|
|
|
|
|
itemCount: model.prescriptionsList.length,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return Container(
|
|
|
|
|
// width: 160.0,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.6,
|
|
|
|
|
padding: EdgeInsets.only(bottom: 5.0, left: 5.0),
|
|
|
|
|
margin: EdgeInsets.only(right: 10.0),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
style: BorderStyle.solid,
|
|
|
|
|
width: 1.0,
|
|
|
|
|
),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0)),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Row(
|
|
|
|
|
height:
|
|
|
|
|
MediaQuery.of(context).size.height * 0.6,
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.only(bottom: 5.0, left: 5.0),
|
|
|
|
|
margin: EdgeInsets.only(right: 10.0),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
style: BorderStyle.solid,
|
|
|
|
|
width: 1.0,
|
|
|
|
|
),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0)),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(children: [
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: 10.0,
|
|
|
|
|
left: 10.0,
|
|
|
|
|
right: 3.0,
|
|
|
|
|
bottom: 15.0,
|
|
|
|
|
),
|
|
|
|
|
child: Image.network(
|
|
|
|
|
model.prescriptionsList[index]
|
|
|
|
|
.doctorImageURL,
|
|
|
|
|
width: 60,
|
|
|
|
|
height: 60,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 1),
|
|
|
|
|
Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(children: [
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
left: 15.0, right: 15.0),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Colors.green,
|
|
|
|
|
style: BorderStyle.solid,
|
|
|
|
|
width: 4.0,
|
|
|
|
|
top: 10.0,
|
|
|
|
|
left: 10.0,
|
|
|
|
|
right: 3.0,
|
|
|
|
|
bottom: 15.0,
|
|
|
|
|
),
|
|
|
|
|
child: Image.network(
|
|
|
|
|
model.prescriptionsList[index]
|
|
|
|
|
.doctorImageURL,
|
|
|
|
|
width: 60,
|
|
|
|
|
height: 60,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.only(left: 1),
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
left: 15.0, right: 15.0),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Colors.green,
|
|
|
|
|
style:
|
|
|
|
|
BorderStyle.solid,
|
|
|
|
|
width: 4.0,
|
|
|
|
|
),
|
|
|
|
|
color: Colors.green,
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(
|
|
|
|
|
30.0)),
|
|
|
|
|
child: Text(
|
|
|
|
|
model
|
|
|
|
|
.prescriptionsList[
|
|
|
|
|
index]
|
|
|
|
|
.isInOutPatientDescription
|
|
|
|
|
.toString(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
Row(children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/Icon-awesome-calendar.png',
|
|
|
|
|
width: 30,
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
model.prescriptionsList[index]
|
|
|
|
|
.appointmentDate
|
|
|
|
|
.toString(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
color: Colors.green,
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(
|
|
|
|
|
30.0)),
|
|
|
|
|
child: Text(
|
|
|
|
|
)
|
|
|
|
|
]),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 5),
|
|
|
|
|
child: Row(children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
model.prescriptionsList[index]
|
|
|
|
|
.isInOutPatientDescription
|
|
|
|
|
.doctorTitle
|
|
|
|
|
.toString(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
Row(children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/Icon-awesome-calendar.png',
|
|
|
|
|
width: 30,
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
model.prescriptionsList[index]
|
|
|
|
|
.doctorName
|
|
|
|
|
.toString(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 5),
|
|
|
|
|
child: Text(
|
|
|
|
|
model.prescriptionsList[index]
|
|
|
|
|
.appointmentDate
|
|
|
|
|
.clinicDescription
|
|
|
|
|
.toString(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
color: Colors.green,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
]),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 5),
|
|
|
|
|
child: Row(children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
model.prescriptionsList[index]
|
|
|
|
|
.doctorTitle
|
|
|
|
|
.toString(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
model.prescriptionsList[index]
|
|
|
|
|
.doctorName
|
|
|
|
|
.toString(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 5),
|
|
|
|
|
child: Text(
|
|
|
|
|
model.prescriptionsList[index]
|
|
|
|
|
.clinicDescription
|
|
|
|
|
.toString(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.green,
|
|
|
|
|
fontSize: 15.0,
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 5),
|
|
|
|
|
child: Align(
|
|
|
|
|
alignment: Alignment.topLeft,
|
|
|
|
|
child: RatingBar.readOnly(
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 5),
|
|
|
|
|
child: Align(
|
|
|
|
|
alignment: Alignment.topLeft,
|
|
|
|
|
child: RatingBar.readOnly(
|
|
|
|
|
// initialRating: productRate,
|
|
|
|
|
size: 15.0,
|
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
|
isHalfAllowed: true,
|
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
]),
|
|
|
|
|
]),
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
: Container(),
|
|
|
|
|
),
|
|
|
|
|
size: 15.0,
|
|
|
|
|
filledColor:
|
|
|
|
|
Colors.yellow[700],
|
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
|
isHalfAllowed: true,
|
|
|
|
|
halfFilledIcon:
|
|
|
|
|
Icons.star_half,
|
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
]),
|
|
|
|
|
]),
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
: Container(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(10, 10, 10, 10),
|
|
|
|
|
@ -333,7 +346,17 @@ class PharmacyPage extends StatelessWidget {
|
|
|
|
|
hPadding: 4,
|
|
|
|
|
borderColor: Colors.green,
|
|
|
|
|
textColor: Colors.green,
|
|
|
|
|
handler: () {},
|
|
|
|
|
handler: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => FinalProductsPage(
|
|
|
|
|
id: "",
|
|
|
|
|
productType: 3,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -367,7 +390,14 @@ class PharmacyPage extends StatelessWidget {
|
|
|
|
|
hPadding: 4,
|
|
|
|
|
handler: () => {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context, FadePage(page: ProductBrandsPage())),
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => FinalProductsPage(
|
|
|
|
|
id: "",
|
|
|
|
|
productType: 4,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
|