icons chnaged

dev
Sneha 1 year ago
parent 463053abc9
commit 51452337d1

@ -3,6 +3,7 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:healthcare_user/common/settings.dart';
import 'package:healthcare_user/common/zoom_image.dart';
import 'package:intl/intl.dart';
import 'package:image_picker/image_picker.dart';
import 'package:multi_image_picker/multi_image_picker.dart';
@ -436,46 +437,55 @@ class _AddReportsState extends State<AddReports> {
return Column(
children: [
Card(
child: Container(
width: MediaQuery.of(context).size.width *
.30,
height:
MediaQuery.of(context).size.height *
.15,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
image: DecorationImage(
image: NetworkImage(
uiFindingsImages[index]
['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
child: Stack(children: [
Positioned(
right: 0,
child: Container(
child: IconButton(
iconSize: 30,
icon: const Icon(
Icons.cancel,
color: Colors.red,
child: GestureDetector(
onTap: () {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(imageName:'Findings',imageDetails:uiFindingsImages[index]['url'])));
/*gridOntap(index);*/
},
child: Container(
width: MediaQuery.of(context).size.width *
.30,
height:
MediaQuery.of(context).size.height *
.15,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
image: DecorationImage(
image: NetworkImage(
uiFindingsImages[index]['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
child: Stack(children: [
Positioned(
right: 0,
child: Container(
child: IconButton(
iconSize: 30,
icon: const Icon(
Icons.cancel,
color: Colors.red,
),
onPressed: () async {
AppSettings.preLoaderDialog(context);
String fileName = uiFindingsImages[index]['url'].split('/').last;
var response = await AppSettings.deleteFindings(fileName);
print(jsonDecode(response));
Navigator.of(context, rootNavigator: true).pop();
setState(() {
uiFindingsImages = jsonDecode(response)['findings'];
});
},
),
onPressed: () async {
AppSettings.preLoaderDialog(context);
String fileName = uiFindingsImages[index]['url'].split('/').last;
var response = await AppSettings.deleteFindings(fileName);
print(jsonDecode(response));
Navigator.of(context, rootNavigator: true).pop();
setState(() {
uiFindingsImages = jsonDecode(response)['findings'];
});
},
),
),
)
]),
)
]),
),
),
),
/*Expanded(child:IconButton(
@ -607,47 +617,56 @@ class _AddReportsState extends State<AddReports> {
return Column(
children: [
Card(
child: Container(
width: MediaQuery.of(context).size.width *
.30,
height:
MediaQuery.of(context).size.height *
.15,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
image: DecorationImage(
image: NetworkImage(
uiReportsImages[index]
['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
child: Stack(children: [
Positioned(
right: 0,
child: Container(
child: IconButton(
iconSize: 30,
icon: const Icon(
Icons.cancel,
color: Colors.red,
child: GestureDetector(
onTap: () {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(imageName:'Reports',imageDetails:uiReportsImages[index]['url'])));
/*gridOntap(index);*/
},
child: Container(
width: MediaQuery.of(context).size.width *
.30,
height:
MediaQuery.of(context).size.height *
.15,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
image: DecorationImage(
image: NetworkImage(
uiReportsImages[index]['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
child: Stack(children: [
Positioned(
right: 0,
child: Container(
child: IconButton(
iconSize: 30,
icon: const Icon(
Icons.cancel,
color: Colors.red,
),
onPressed: () async {
AppSettings.preLoaderDialog(context);
String fileName = uiReportsImages[index]['url'].split('/').last;
var response = await AppSettings.deleteReports(fileName);
print(jsonDecode(response));
Navigator.of(context, rootNavigator: true).pop();
setState(() {
uiReportsImages = jsonDecode(response)['reports'];
});
},
),
onPressed: () async {
AppSettings.preLoaderDialog(context);
String fileName = uiReportsImages[index]['url'].split('/').last;
var response = await AppSettings.deleteReports(fileName);
print(jsonDecode(response));
Navigator.of(context, rootNavigator: true).pop();
setState(() {
uiReportsImages = jsonDecode(response)['reports'];
});
},
),
),
)
]),
),
)
]),
),
)
),
/*Expanded(child:IconButton(
icon: const Icon(Icons.remove,color: Colors.red,),
@ -778,46 +797,56 @@ class _AddReportsState extends State<AddReports> {
return Column(
children: [
Card(
child: Container(
width: MediaQuery.of(context).size.width *
.30,
height:
MediaQuery.of(context).size.height *
.15,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
image: DecorationImage(
image: NetworkImage(
uiPrescriptionImages[index]['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
child: Stack(children: [
Positioned(
right: 0,
child: Container(
child: IconButton(
iconSize: 30,
icon: const Icon(
Icons.cancel,
color: Colors.red,
child: GestureDetector(
onTap: () {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(imageName:'Prescriptions',imageDetails:uiPrescriptionImages[index]['url'])));
/*gridOntap(index);*/
},
child: Container(
width: MediaQuery.of(context).size.width *
.30,
height:
MediaQuery.of(context).size.height *
.15,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
image: DecorationImage(
image: NetworkImage(
uiPrescriptionImages[index]['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
child: Stack(children: [
Positioned(
right: 0,
child: Container(
child: IconButton(
iconSize: 30,
icon: const Icon(
Icons.cancel,
color: Colors.red,
),
onPressed: () async {
AppSettings.preLoaderDialog(context);
String fileName = uiPrescriptionImages[index]['url'].split('/').last;
var response = await AppSettings.deletePrescriptions(fileName);
print(jsonDecode(response));
Navigator.of(context, rootNavigator: true).pop();
setState(() {
uiPrescriptionImages = jsonDecode(response)['precription'];
});
},
),
onPressed: () async {
AppSettings.preLoaderDialog(context);
String fileName = uiPrescriptionImages[index]['url'].split('/').last;
var response = await AppSettings.deletePrescriptions(fileName);
print(jsonDecode(response));
Navigator.of(context, rootNavigator: true).pop();
setState(() {
uiPrescriptionImages = jsonDecode(response)['precription'];
});
},
),
),
)
]),
),
)
]),
),
)
),
/*Expanded(child:IconButton(
icon: const Icon(Icons.remove,color: Colors.red,),

@ -266,12 +266,12 @@ class _OrderMedicinesPrescriptionsState extends State<OrderMedicinesPrescription
AppSettings.preLoaderDialog(context);
var payload = new Map<String, dynamic>();
payload["picture"] = widget.prescriptionDetails[0]['url'].toString();
payload["prescriptionPictures"]=widget.prescriptionDetails;
payload["pharmacies"] = pharmaciesCheckboxesInDialog;
payload["familyDetails"] = {
"patient_name": widget.familyDetails.patient_name.toString(),
"patient_age": int.parse(widget.familyDetails.age.toString()),
"patient_gender": widget.familyDetails.gender,
"patient_gender": widget.familyDetails.gender.toString().toLowerCase(),
"patient_address": userAddress
};
bool status = await AppSettings.getQuotation(payload);
@ -584,7 +584,9 @@ class _OrderMedicinesPrescriptionsState extends State<OrderMedicinesPrescription
AppSettings.preLoaderDialog(context);
var payload = new Map<String, dynamic>();
payload["picture"] = widget.prescriptionDetails[0]['url'].toString();
//payload["picture"] = widget.prescriptionDetails[0]['url'].toString();
payload["prescriptionPictures"]=widget.prescriptionDetails;
payload["pharmacies"] = pharmaciesCheckboxes;
payload["familyDetails"] = {
"patient_name": widget.familyDetails.patient_name.toString()??'',

@ -142,87 +142,82 @@ class _SugarHistoryState extends State<SugarHistory> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: MediaQuery.of(context).size.width * .55,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image(
image: const AssetImage('images/height.png'),
height: 25,
width: 25,
fit: BoxFit.fill),
Padding(padding: EdgeInsets.all(5),
child: Text(FilteredList[index].fasting.toString().toUpperCase(),style: valuesTextStyle()),)
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image(
image: const AssetImage('images/height.png'),
height: 25,
width: 25,
fit: BoxFit.fill),
Padding(padding: EdgeInsets.all(5),
child: Text(FilteredList[index].fasting.toString().toUpperCase(),style: valuesTextStyle()),)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image(
image: const AssetImage('images/height.png'),
height: 25,
width: 25,
fit: BoxFit.fill),
Padding(padding: EdgeInsets.all(5),
child: Text(FilteredList[index].postPrandial.toString().toUpperCase(),style: valuesTextStyle()),)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image(
image: const AssetImage('images/height.png'),
height: 25,
width: 25,
fit: BoxFit.fill),
Padding(padding: EdgeInsets.all(5),
child: Text(FilteredList[index].postPrandial.toString().toUpperCase(),style: valuesTextStyle()),)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image(
image: const AssetImage('images/height.png'),
height: 25,
width: 25,
fit: BoxFit.fill),
Padding(padding: EdgeInsets.all(5),
child: Text(FilteredList[index].sugarValue.toString().toUpperCase(),style: valuesTextStyle()),)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image(
image: const AssetImage('images/height.png'),
height: 25,
width: 25,
fit: BoxFit.fill),
Padding(padding: EdgeInsets.all(5),
child: Text(FilteredList[index].sugarValue.toString().toUpperCase(),style: valuesTextStyle()),)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image(
image: const AssetImage('images/height.png'),
height: 25,
width: 25,
fit: BoxFit.fill),
Padding(padding: EdgeInsets.all(5),
child: Text(FilteredList[index].sugartText.toString().toUpperCase(),style: valuesTextStyle()),)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image(
image: const AssetImage('images/height.png'),
height: 25,
width: 25,
fit: BoxFit.fill),
Padding(padding: EdgeInsets.all(5),
child: Text(FilteredList[index].sugartText.toString().toUpperCase(),style: valuesTextStyle()),)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image(
image: const AssetImage('images/date.png'),
height: 25,
width: 25,
fit: BoxFit.fill),
Padding(padding: EdgeInsets.all(5),
child: Text(FilteredList[index].displayDate.toString().toUpperCase(),style: valuesTextStyle()),)
],
),
],
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image(
image: const AssetImage('images/date.png'),
height: 25,
width: 25,
fit: BoxFit.fill),
Padding(padding: EdgeInsets.all(5),
child: Text(FilteredList[index].displayDate.toString().toUpperCase(),style: valuesTextStyle()),)
],
),
],
),
],

@ -118,7 +118,8 @@ class _UpdateprofileState extends State<UpdateProfile> {
decoration: BoxDecoration(
shape: BoxShape.circle,
image: DecorationImage(
image: (AppSettings.profilePictureUrl != ''&& AppSettings.profilePictureUrl != 'null') ? NetworkImage(AppSettings.profilePictureUrl) as ImageProvider : AssetImage("images/profile_pic.png"), // picked file
image: (AppSettings.profilePictureUrl != ''&& AppSettings.profilePictureUrl != 'null') ?
NetworkImage(AppSettings.profilePictureUrl) as ImageProvider : AssetImage("images/profile_pic.png"), // picked file
fit: BoxFit.fitWidth)),
),
onTap: () {

@ -306,7 +306,10 @@ class _MyHealthState extends State<MyHealth> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('Body Mass Index'),
Container(
width: MediaQuery.of(context).size.width * .30,
child: Text('Body Mass Index'),
),
IconButton(
onPressed: () {
Navigator.push(
@ -343,7 +346,11 @@ class _MyHealthState extends State<MyHealth> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('Blood Pressure'),
Container(
width: MediaQuery.of(context).size.width * .30,
child: Text('Blood Pressure'),
),
IconButton(
onPressed: () {
Navigator.push(
@ -380,7 +387,11 @@ class _MyHealthState extends State<MyHealth> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('Diabetes'),
Container(
width: MediaQuery.of(context).size.width * .30,
child: Text('Diabetes'),
),
IconButton(
onPressed: () {
Navigator.push(
@ -417,7 +428,10 @@ class _MyHealthState extends State<MyHealth> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('Cholesterol'),
Container(
width: MediaQuery.of(context).size.width * .30,
child: Text('Cholesterol'), ),
IconButton(
onPressed: () {},
icon: Icon(
@ -434,7 +448,11 @@ class _MyHealthState extends State<MyHealth> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('Habbits'),
Container(
width: MediaQuery.of(context).size.width * .30,
child: Text('Habbits'),
),
IconButton(
onPressed: () {},
icon: Icon(
@ -451,7 +469,11 @@ class _MyHealthState extends State<MyHealth> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('Allergies'),
Container(
width: MediaQuery.of(context).size.width * .30,
child: Text('Allergies'),
),
IconButton(
onPressed: () {},
icon: Icon(

@ -381,12 +381,12 @@ class _OrderMedicinesState extends State<OrderMedicines> {
AppSettings.preLoaderDialog(context);
var payload = new Map<String, dynamic>();
payload["picture"] = widget.prescriptionDetails.prescription_url.toString();
payload["prescriptionPictures"]=widget.prescriptionDetails.prescriptionImages;
payload["pharmacies"] = pharmaciesCheckboxesInDialog;
payload["familyDetails"] = {
"patient_name": widget.prescriptionDetails.patient_name.toString(),
"patient_age": int.parse(widget.prescriptionDetails.age.toString()),
"patient_gender": widget.prescriptionDetails.gender,
"patient_gender": widget.prescriptionDetails.gender.toString().toLowerCase(),
"patient_address": userAddress
};
bool status = await AppSettings.getQuotation(payload);
@ -699,7 +699,7 @@ class _OrderMedicinesState extends State<OrderMedicines> {
AppSettings.preLoaderDialog(context);
var payload = new Map<String, dynamic>();
payload["picture"] = widget.prescriptionDetails.prescription_url.toString();
payload["prescriptionPictures"]=widget.prescriptionDetails.prescriptionImages;
payload["pharmacies"] = pharmaciesCheckboxes;
payload["familyDetails"] = {
"patient_name": widget.prescriptionDetails.patient_name.toString()??'',
@ -824,7 +824,7 @@ class _OrderMedicinesState extends State<OrderMedicines> {
height: MediaQuery.of(context).size.height * .20,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: obj.prescriptionUrls.length,
itemCount: obj.prescriptionImages.length,
itemBuilder: (context, index) {
return Column(
children: [
@ -835,7 +835,7 @@ class _OrderMedicinesState extends State<OrderMedicines> {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(imageName:'Prescriptions',imageDetails:obj.prescriptionUrls[index]['url'])));
builder: (__) => new ImageZoomPage(imageName:'Prescriptions',imageDetails:obj.prescriptionImages[index]['url'])));
@ -847,7 +847,7 @@ class _OrderMedicinesState extends State<OrderMedicines> {
shape: BoxShape.rectangle,
image: DecorationImage(
image: NetworkImage(
obj.prescriptionUrls[index]
obj.prescriptionImages[index]
['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),

@ -6,6 +6,7 @@ import 'package:geolocator/geolocator.dart';
import 'package:healthcare_user/common/settings.dart';
import 'package:healthcare_user/common/zoom_image.dart';
import 'package:healthcare_user/models/pharmacies_model.dart';
import 'package:healthcare_user/models/reports_model.dart';
import 'package:healthcare_user/prescriptions/add_prescriptions.dart';
import 'package:healthcare_user/prescriptions/oreder_medicines.dart';
import 'package:image_picker/image_picker.dart';
@ -23,8 +24,8 @@ class _PrescriptionsState extends State<Prescriptions> {
final ImagePicker _picker = ImagePicker();
String Url = '';
List<PharmaciesModel> pharmaciesList = [];
List<PrescriptionsModel> prescriptionsList = [];
List<PrescriptionsModel> prescriptionsListOriginal = [];
List<ReportsModel> reportsList = [];
List<ReportsModel> reportsListOriginal = [];
List<PharmaciesModel> FilteredList = [];
bool isPharmacyDataLoading = false;
bool isPrescriptionsDataLoading = false;
@ -81,7 +82,7 @@ class _PrescriptionsState extends State<Prescriptions> {
}
}
Future<void> getAllPrescriptions() async {
/*Future<void> getAllPrescriptions() async {
isPrescriptionsDataLoading=true;
try {
var response = await AppSettings.getAllPrescriptions();
@ -100,6 +101,28 @@ class _PrescriptionsState extends State<Prescriptions> {
isSereverIssue = true;
});
}
}*/
Future<void> getAllRecords() async {
isPrescriptionsDataLoading=true;
try {
var response = await AppSettings.getAllRecords();
setState(() {
reportsListOriginal = ((jsonDecode(response)) as List)
.map((dynamic model) {
return ReportsModel.fromJson(model);
}).toList();
reportsList=reportsListOriginal.reversed.toList();
isPrescriptionsDataLoading = false;
});
} catch (e) {
setState(() {
isPrescriptionsDataLoading = false;
isSereverIssue = true;
});
}
}
@override
@ -107,7 +130,7 @@ class _PrescriptionsState extends State<Prescriptions> {
lat = AppSettings.userLatitude;
lng = AppSettings.userLongitude;
userAddress = AppSettings.userAddress;
getAllPrescriptions();
getAllRecords();
//getAllPharmaciesData(dropdownArea);
super.initState();
}
@ -451,7 +474,7 @@ class _PrescriptionsState extends State<Prescriptions> {
height: MediaQuery.of(context).size.height * .20,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: obj.prescriptionUrls.length,
itemCount: obj.prescriptionImages.length,
itemBuilder: (context, index) {
return Column(
children: [
@ -462,7 +485,7 @@ class _PrescriptionsState extends State<Prescriptions> {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(imageName:'Prescriptions',imageDetails:obj.prescriptionUrls[index]['url'])));
builder: (__) => new ImageZoomPage(imageName:'Prescriptions',imageDetails:obj.prescriptionImages[index]['url'])));
@ -474,20 +497,13 @@ class _PrescriptionsState extends State<Prescriptions> {
shape: BoxShape.rectangle,
image: DecorationImage(
image: NetworkImage(
obj.prescriptionUrls[index]
obj.prescriptionImages[index]
['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
),
),
),
/*Expanded(child:IconButton(
icon: const Icon(Icons.remove,color: Colors.red,),
onPressed: () async{
},
),)*/
],
);
}),
@ -496,15 +512,17 @@ class _PrescriptionsState extends State<Prescriptions> {
}
Widget _allPrescriptions(){
if (prescriptionsList.length != 0) {
if (reportsList.length != 0) {
return Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(child:ListView.builder(
padding: EdgeInsets.all(0),
itemCount: prescriptionsList.length,
itemCount: reportsList.length,
itemBuilder: (BuildContext context, int index) {
return Card(
return Visibility(
visible: reportsList[index].prescriptionImages.length!=0,
child: Card(
//color: prescriptionsList[index].cardColor,
child: Padding(
@ -512,7 +530,43 @@ class _PrescriptionsState extends State<Prescriptions> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
prescriptions(prescriptionsList[index]),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: MediaQuery.of(context).size.width * .55,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Problem: '+reportsList[index].problem.toString().toUpperCase(),style: problemTextStyle()),
Text(reportsList[index].doctorName.toString().toUpperCase(),style: valuesTextStyle()),
Text(reportsList[index].hospitalName.toString().toUpperCase(),style: valuesTextStyle()),
Text(reportsList[index].date.toString().toUpperCase(),style: valuesTextStyle()),
Text(reportsList[index].patient_name.toString().toUpperCase(),style: valuesTextStyle()),
Row(
children: [
Text(reportsList[index].gender.toString().toUpperCase(),style: valuesTextStyle()),
SizedBox(width:MediaQuery.of(context).size.width * .05,),
Text(reportsList[index].age.toString().toUpperCase()+" Yrs",style: valuesTextStyle()),
],
),
],
),
),
],
),
SizedBox(height:MediaQuery.of(context).size.height * .02,),
prescriptions(reportsList[index]),
TextButton(
child: const Text(
'Order Medicines',
@ -523,52 +577,15 @@ class _PrescriptionsState extends State<Prescriptions> {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new OrderMedicines(prescriptionDetails:prescriptionsList[index])));
builder: (__) => new OrderMedicines(prescriptionDetails:reportsList[index])));
//signup screen
},
)
],
),
),
);
));
}) ),
Padding(
padding: EdgeInsets.fromLTRB(8, 8, 8, 8),
child: CircleAvatar(
backgroundColor: primaryColor,
radius: 40,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
IconButton(
iconSize: 40,
icon: const Icon(
Icons.add,
color: Colors.white,
),
onPressed: () async{
/*await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddPrescription()),
);*/
Navigator.push(context, MaterialPageRoute(builder: (context) => AddPrescription())).then((value) {
getAllPrescriptions();
});
//showBoreAddingDialog();
},
),
/* Padding(
padding: EdgeInsets.fromLTRB(5, 0, 5, 5),
child: Text(
'Add Tanks ',
style: TextStyle(color: Colors.white),
),
)*/
],
),
),
),
]);
}
else{
@ -579,7 +596,7 @@ class _PrescriptionsState extends State<Prescriptions> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: MediaQuery.of(context).size.height * .25,),
Text('Click below icon to add new prescription'),
Text('No prescriptions added as of now'),
SizedBox(
height: 20,
),
@ -589,13 +606,10 @@ class _PrescriptionsState extends State<Prescriptions> {
child: IconButton(
iconSize: 40,
icon: const Icon(
Icons.add,
Icons.info,
color: Colors.white,
),
onPressed: () async {
Navigator.push(context, MaterialPageRoute(builder: (context) => AddPrescription())).then((value) {
getAllPrescriptions();
});
},
),
)

Loading…
Cancel
Save