add reports functionality

dev
Sneha 1 year ago
parent 8c257cab86
commit 9630a77681

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

@ -1,9 +1,12 @@
import 'dart:convert'; import 'dart:convert';
import 'package:healthcare_user/chart/bmi_chart.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:healthcare_user/models/bmi_history_model.dart'; import 'package:healthcare_user/models/bmi_history_model.dart';
import 'package:healthcare_user/common/settings.dart'; import 'package:healthcare_user/common/settings.dart';
import '../chart/bpchart.dart';
class BMIHistory extends StatefulWidget { class BMIHistory extends StatefulWidget {
const BMIHistory({Key? key}) : super(key: key); const BMIHistory({Key? key}) : super(key: key);
@ -12,7 +15,6 @@ class BMIHistory extends StatefulWidget {
} }
class _BMIHistoryState extends State<BMIHistory> { class _BMIHistoryState extends State<BMIHistory> {
bool isLoading = false; bool isLoading = false;
List<BmiHistoryModel> bmiHistoryList = []; List<BmiHistoryModel> bmiHistoryList = [];
List<BmiHistoryModel> FilteredList = []; List<BmiHistoryModel> FilteredList = [];
@ -28,8 +30,7 @@ class _BMIHistoryState extends State<BMIHistory> {
var response1 = await AppSettings.getBmiHistory(); var response1 = await AppSettings.getBmiHistory();
print(response1); print(response1);
setState(() { setState(() {
bmiHistoryList = bmiHistoryList = ((jsonDecode(response1)) as List).map((dynamic model) {
((jsonDecode(response1)) as List).map((dynamic model) {
return BmiHistoryModel.fromJson(model); return BmiHistoryModel.fromJson(model);
}).toList(); }).toList();
@ -43,24 +44,20 @@ class _BMIHistoryState extends State<BMIHistory> {
final date = product.dateForFilter; final date = product.dateForFilter;
return now_1w.isBefore(date); return now_1w.isBefore(date);
}).toList(); }).toList();
} } else if (selectedRange.toString().toUpperCase() == 'LAST ONE MONTH') {
else if(selectedRange.toString().toUpperCase()=='LAST ONE MONTH'){
FilteredList = bmiHistoryList.where((product) { FilteredList = bmiHistoryList.where((product) {
final date = product.dateForFilter; final date = product.dateForFilter;
return now_1m.isBefore(date); return now_1m.isBefore(date);
}).toList(); }).toList();
} } else if (selectedRange.toString().toUpperCase() == 'LAST ONE YEAR') {
else if(selectedRange.toString().toUpperCase()=='LAST ONE YEAR'){
FilteredList = bmiHistoryList.where((product) { FilteredList = bmiHistoryList.where((product) {
final date = product.dateForFilter; final date = product.dateForFilter;
return now_1y.isBefore(date); return now_1y.isBefore(date);
}).toList(); }).toList();
} } else {
else{
FilteredList = bmiHistoryList; FilteredList = bmiHistoryList;
} }
isLoading = false; isLoading = false;
}); });
} }
@ -73,11 +70,9 @@ class _BMIHistoryState extends State<BMIHistory> {
Widget renderzUi() { Widget renderzUi() {
if (bmiHistoryList.length != 0) { if (bmiHistoryList.length != 0) {
return Column(crossAxisAlignment: CrossAxisAlignment.end, children: [
return Column( Padding(
crossAxisAlignment: CrossAxisAlignment.end, padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
children: [
Padding(padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
child: DropdownButtonFormField( child: DropdownButtonFormField(
// Initial Value // Initial Value
value: dateItemsVariable, value: dateItemsVariable,
@ -125,14 +120,32 @@ class _BMIHistoryState extends State<BMIHistory> {
}); });
getBmiHistoryDetails(dateItemsVariable); getBmiHistoryDetails(dateItemsVariable);
}, },
),), ),
),
Expanded(child:ListView.builder( IconButton(
onPressed: () {
/*Navigator.push(
context,
MaterialPageRoute(
builder: (context) => BmiChart()),
);*/
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new BmiChart(myObject: FilteredList)));
// showBMIAdddialog();
},
icon: Icon(
Icons.auto_graph,
color: primaryColor,
),
),
Expanded(
child: ListView.builder(
padding: EdgeInsets.all(0), padding: EdgeInsets.all(0),
itemCount: FilteredList.length, itemCount: FilteredList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return Card( return Card(
color: Colors.white, color: Colors.white,
child: Padding( child: Padding(
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
@ -140,7 +153,6 @@ class _BMIHistoryState extends State<BMIHistory> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
width: MediaQuery.of(context).size.width * .55, width: MediaQuery.of(context).size.width * .55,
child: Column( child: Column(
@ -152,13 +164,21 @@ class _BMIHistoryState extends State<BMIHistory> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Image( Image(
image: const AssetImage('images/height.png'), image: const AssetImage(
'images/height.png'),
height: 25, height: 25,
width: 25, width: 25,
fit: BoxFit.fill), fit: BoxFit.fill),
Padding(padding: EdgeInsets.all(5), Padding(
child: Text(FilteredList[index].height.toString().toUpperCase()+' ft',style: valuesTextStyle()),) padding: EdgeInsets.all(5),
child: Text(
FilteredList[index]
.height
.toString()
.toUpperCase() +
' ft',
style: valuesTextStyle()),
)
], ],
), ),
Row( Row(
@ -166,13 +186,21 @@ class _BMIHistoryState extends State<BMIHistory> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Image( Image(
image: const AssetImage('images/weight.png'), image: const AssetImage(
'images/weight.png'),
height: 25, height: 25,
width: 25, width: 25,
fit: BoxFit.fill), fit: BoxFit.fill),
Padding(padding: EdgeInsets.all(5), Padding(
child: Text(FilteredList[index].weight.toString().toUpperCase()+' Kgs',style: valuesTextStyle()),) padding: EdgeInsets.all(5),
child: Text(
FilteredList[index]
.weight
.toString()
.toUpperCase() +
' Kgs',
style: valuesTextStyle()),
)
], ],
), ),
Row( Row(
@ -180,13 +208,20 @@ class _BMIHistoryState extends State<BMIHistory> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Image( Image(
image: const AssetImage('images/date.png'), image:
const AssetImage('images/date.png'),
height: 25, height: 25,
width: 25, width: 25,
fit: BoxFit.fill), fit: BoxFit.fill),
Padding(padding: EdgeInsets.all(5), Padding(
child: Text(FilteredList[index].displayDate.toString().toUpperCase(),style: valuesTextStyle()),) padding: EdgeInsets.all(5),
child: Text(
FilteredList[index]
.displayDate
.toString()
.toUpperCase(),
style: valuesTextStyle()),
)
], ],
), ),
Row( Row(
@ -194,39 +229,41 @@ class _BMIHistoryState extends State<BMIHistory> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Image( Image(
image: const AssetImage('images/weight.png'), image: const AssetImage(
'images/weight.png'),
height: 25, height: 25,
width: 25, width: 25,
fit: BoxFit.fill), fit: BoxFit.fill),
Padding(padding: EdgeInsets.all(5), Padding(
child: Text(FilteredList[index].bmiValue.toString().toUpperCase(),style: valuesTextStyle()),) padding: EdgeInsets.all(5),
child: Text(
FilteredList[index]
.bmiValue
.toString()
.toUpperCase(),
style: valuesTextStyle()),
)
], ],
), ),
], ],
), ),
), ),
], ],
), ),
), ),
); );
})), })),
]); ]);
} } else {
else{
return Center( return Center(
child: Padding( child: Padding(
padding: EdgeInsets.fromLTRB(0, 40, 0, 0), padding: EdgeInsets.fromLTRB(0, 40, 0, 0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox(height: MediaQuery.of(context).size.height * .25,), SizedBox(
height: MediaQuery.of(context).size.height * .25,
),
Text('No Data'), Text('No Data'),
SizedBox( SizedBox(
height: 20, height: 20,
@ -240,15 +277,12 @@ class _BMIHistoryState extends State<BMIHistory> {
Icons.info, Icons.info,
color: Colors.white, color: Colors.white,
), ),
onPressed: () async { onPressed: () async {},
},
), ),
) )
], ],
), ),
) ));
);
} }
} }
@ -256,12 +290,14 @@ class _BMIHistoryState extends State<BMIHistory> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppSettings.appBar('Body Mass Index'), appBar: AppSettings.appBar('Body Mass Index'),
body: isLoading?Center( body: isLoading
? Center(
child: CircularProgressIndicator( child: CircularProgressIndicator(
color: primaryColor, color: primaryColor,
strokeWidth: 5.0, strokeWidth: 5.0,
), ),
):renderzUi(), )
: renderzUi(),
); );
} }
} }

@ -1,5 +1,6 @@
import 'dart:convert'; import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:healthcare_user/chart/bpchart.dart';
import 'package:healthcare_user/models/bmi_history_model.dart'; import 'package:healthcare_user/models/bmi_history_model.dart';
import 'package:healthcare_user/common/settings.dart'; import 'package:healthcare_user/common/settings.dart';
import 'package:healthcare_user/models/bp_history_model.dart'; import 'package:healthcare_user/models/bp_history_model.dart';
@ -75,7 +76,7 @@ class _BPHistoryState extends State<BPHistory> {
if(BpHistoryList.length!=0){ if(BpHistoryList.length!=0){
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding(padding: EdgeInsets.fromLTRB(10, 10, 10, 10), Padding(padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
child: DropdownButtonFormField( child: DropdownButtonFormField(
@ -127,6 +128,21 @@ class _BPHistoryState extends State<BPHistory> {
}, },
),), ),),
IconButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Bpchart()),
);
// showBMIAdddialog();
},
icon: Icon(
Icons.auto_graph,
color: primaryColor,
),
),
Expanded(child:ListView.builder( Expanded(child:ListView.builder(
padding: EdgeInsets.all(0), padding: EdgeInsets.all(0),
itemCount: FilteredList.length, itemCount: FilteredList.length,

@ -0,0 +1,674 @@
import 'dart:convert';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:healthcare_user/common/settings.dart';
import 'package:intl/intl.dart';
import 'package:image_picker/image_picker.dart';
import 'package:multi_image_picker/multi_image_picker.dart';
class AddReports extends StatefulWidget {
const AddReports({Key? key}) : super(key: key);
@override
State<AddReports> createState() => _AddReportsState();
}
class _AddReportsState extends State<AddReports> {
TextEditingController doctorNameController = TextEditingController();
TextEditingController hospitalNameController = TextEditingController();
TextEditingController problemController = TextEditingController();
TextEditingController dateInput = TextEditingController();
TextEditingController patientNameController = TextEditingController();
TextEditingController patientAgeController = TextEditingController();
final ImagePicker _picker = ImagePicker();
String Url = '';
final ImagePicker imagePicker = ImagePicker();
List imageFileList = [];
List imageFileListReports = [];
List imageFileListPrescriptions = [];
List uiFindingsImages = [];
List uiReportsImages = [];
List uiPrescriptionImages = [];
List<Asset> images = <Asset>[];
String _error = 'No Error Dectected';
String apiMultiImages = '';
String? prescriptionFor;
String? gender;
Future pickImageFromGallery() async {
imageFileList = [];
final List<XFile>? selectedImages = await imagePicker.pickMultiImage();
AppSettings.preLoaderDialog(context);
if (selectedImages!.isNotEmpty) {
imageFileList.addAll(selectedImages);
}
var res = await AppSettings.uploadImageForFindings(imageFileList);
print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop();
setState(() {
uiFindingsImages = jsonDecode(res)['findings'];
});
}
Future takeImageFromCamera() async {
try {
final image = await _picker.pickImage(source: ImageSource.camera);
if (image == null) return;
final imageTemp = File(image.path);
AppSettings.preLoaderDialog(context);
var res = await AppSettings.uploadImageForFindingsCamera(image);
print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop();
setState(() {
uiFindingsImages = jsonDecode(res)['findings'];
});
} on PlatformException catch (e) {
print('Failed to pick image: $e');
}
}
Future takeImageFromCameraForReports() async {
try {
final image = await _picker.pickImage(source: ImageSource.camera);
if (image == null) return;
final imageTemp = File(image.path);
AppSettings.preLoaderDialog(context);
var res = await AppSettings.uploadImageForFindingsCamera(image);
print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop();
setState(() {
uiReportsImages = jsonDecode(res)['findings'];
});
} on PlatformException catch (e) {
print('Failed to pick image: $e');
}
}
Future pickImageFromGalleryForReports() async {
imageFileListReports = [];
final List<XFile>? selectedImages = await imagePicker.pickMultiImage();
AppSettings.preLoaderDialog(context);
if (selectedImages!.isNotEmpty) {
imageFileListReports.addAll(selectedImages);
}
var res = await AppSettings.uploadImageForReports(imageFileListReports);
print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop();
setState(() {
uiReportsImages = jsonDecode(res)['reports'];
});
}
Future takeImageFromCameraForPrescriptions() async {
try {
final image = await _picker.pickImage(source: ImageSource.camera);
if (image == null) return;
final imageTemp = File(image.path);
AppSettings.preLoaderDialog(context);
var res = await AppSettings.uploadImageForFindingsCamera(image);
print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop();
setState(() {
uiFindingsImages = jsonDecode(res)['findings'];
});
} on PlatformException catch (e) {
print('Failed to pick image: $e');
}
}
Future pickImageFromGalleryForPrescriptions() async {
imageFileListPrescriptions = [];
final List<XFile>? selectedImages = await imagePicker.pickMultiImage();
AppSettings.preLoaderDialog(context);
if (selectedImages!.isNotEmpty) {
imageFileListPrescriptions.addAll(selectedImages);
}
var res = await AppSettings.uploadImageForPrescriptions(imageFileListPrescriptions);
print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop();
setState(() {
uiPrescriptionImages = jsonDecode(res)['precription'];
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar('Reports'),
body: SingleChildScrollView(
child: Container(
child: Padding(
padding: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: TextFormField(
cursorColor: greyColor,
controller: doctorNameController,
textCapitalization: TextCapitalization.words,
decoration: textFormFieldDecoration(
Icons.person, 'Enter Doctor name'),
),
),
SizedBox(
height: MediaQuery.of(context).size.height * .02,
),
Container(
child: TextFormField(
cursorColor: greyColor,
controller: hospitalNameController,
textCapitalization: TextCapitalization.words,
decoration: textFormFieldDecoration(
Icons.location_city_outlined, 'Enter Hospital name'),
),
),
SizedBox(
height: MediaQuery.of(context).size.height * .02,
),
Container(
child: TextFormField(
cursorColor: greyColor,
controller: problemController,
textCapitalization: TextCapitalization.words,
decoration: textFormFieldDecoration(
Icons.report_problem, 'Enter Problem'),
),
),
SizedBox(
height: MediaQuery.of(context).size.height * .02,
),
Container(
child: TextFormField(
cursorColor: greyColor,
controller: dateInput,
decoration: textFormFieldDecoration(
Icons.calendar_today, 'Enter Date'),
readOnly: true,
onTap: () async {
DateTime? pickedDate = await showDatePicker(
context: context,
initialDate: DateTime.now(),
firstDate: DateTime(1950),
lastDate: DateTime.now(),
builder: (BuildContext context, Widget? child) {
return Theme(
data: ThemeData.dark().copyWith(
colorScheme: ColorScheme.dark(
primary: buttonColors,
onPrimary: Colors.white,
surface: buttonColors,
onSurface: Colors.white,
),
dialogBackgroundColor: primaryColor,
),
child: child!,
);
},
);
if (pickedDate != null) {
print(
pickedDate); //pickedDate output format => 2021-03-10 00:00:00.000
String formattedDate =
DateFormat('dd-MM-yyyy').format(pickedDate);
print(
formattedDate); //formatted date output using intl package => 2021-03-16
setState(() {
dateInput.text =
formattedDate; //set output date to TextField value.
});
} else {}
},
),
),
Row(
children: [
Expanded(child: RadioListTile(
title: Text("For Yourself"),
value: "self",
groupValue: prescriptionFor,
activeColor: primaryColor,
onChanged: (value){
setState(() {
prescriptionFor = value.toString();
});
},
),),
Expanded(child: RadioListTile(
title: Text("For Family"),
value: "others",
groupValue: prescriptionFor,
activeColor: primaryColor,
onChanged: (value){
setState(() {
prescriptionFor = value.toString();
});
},
),),
],
),
Visibility(
visible:prescriptionFor.toString().toLowerCase()=='others' ,
child: Container(
child: TextFormField(
cursorColor: greyColor,
controller: patientNameController,
decoration: textFormFieldDecoration(Icons.person,'Enter patient name'),
),
),),
SizedBox(height:MediaQuery.of(context).size.height * .02,),
Visibility(
visible:prescriptionFor.toString().toLowerCase()=='others' ,
child: Container(
child: TextFormField(
cursorColor: greyColor,
keyboardType: TextInputType.number,
controller: patientAgeController,
decoration: textFormFieldDecoration(Icons.person,'Enter patient age'),
),
),),
Visibility(
visible:prescriptionFor.toString().toLowerCase()=='others' ,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: RadioListTile(
title: Text("Male",style: TextStyle(fontSize: 10)),
value: "male",
groupValue: gender,
activeColor: primaryColor,
onChanged: (value){
setState(() {
gender = value.toString();
});
},
),),
Expanded(child: RadioListTile(
title: Text("Female",style: TextStyle(fontSize: 10),),
value: "female",
groupValue: gender,
activeColor: primaryColor,
onChanged: (value){
setState(() {
gender = value.toString();
});
},
),),
Expanded(child: RadioListTile(
title: Text("Others",style: TextStyle(fontSize: 10)),
value: "other",
groupValue: gender,
activeColor: primaryColor,
onChanged: (value){
setState(() {
gender = value.toString();
});
},
),),
],
),),
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: primaryColor, // background
onPrimary: Colors.white, // foreground
),
onPressed: () async {
showModalBottomSheet<void>(
context: context,
builder: (BuildContext context) {
return SizedBox(
height: 200,
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
GestureDetector(
child: Icon(
Icons.camera_alt_outlined,
size: 100,
color: primaryColor,
),
onTap: () async {
await takeImageFromCamera();
Navigator.pop(context);
},
),
SizedBox(
width: MediaQuery.of(context).size.width *
.20,
),
GestureDetector(
child: Icon(
Icons.photo,
size: 100,
color: primaryColor,
),
onTap: () async {
await pickImageFromGallery();
Navigator.pop(context);
},
),
],
),
),
);
});
},
child: const Text('Select Findings'),
),
Visibility(
visible: uiFindingsImages.length > 0,
child: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * .20,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: uiFindingsImages.length,
itemBuilder: (context, index) {
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)),
),
),
/*Expanded(child:IconButton(
icon: const Icon(Icons.remove,color: Colors.red,),
onPressed: () async{
},
),)*/
],
);
}),
)),
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: primaryColor, // background
onPrimary: Colors.white, // foreground
),
onPressed: () async {
showModalBottomSheet<void>(
context: context,
builder: (BuildContext context) {
return SizedBox(
height: 200,
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
GestureDetector(
child: Icon(
Icons.camera_alt_outlined,
size: 100,
color: primaryColor,
),
onTap: () async {
await takeImageFromCameraForReports();
Navigator.pop(context);
},
),
SizedBox(
width: MediaQuery.of(context).size.width *
.20,
),
GestureDetector(
child: Icon(
Icons.photo,
size: 100,
color: primaryColor,
),
onTap: () async {
await pickImageFromGalleryForReports();
Navigator.pop(context);
},
),
],
),
),
);
});
},
child: const Text('Select Reports'),
),
Visibility(
visible: uiReportsImages.length > 0,
child: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * .20,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: uiReportsImages.length,
itemBuilder: (context, index) {
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)),
),
),
/*Expanded(child:IconButton(
icon: const Icon(Icons.remove,color: Colors.red,),
onPressed: () async{
},
),)*/
],
);
}),
)),
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: primaryColor, // background
onPrimary: Colors.white, // foreground
),
onPressed: () async {
showModalBottomSheet<void>(
context: context,
builder: (BuildContext context) {
return SizedBox(
height: 200,
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
GestureDetector(
child: Icon(
Icons.camera_alt_outlined,
size: 100,
color: primaryColor,
),
onTap: () async {
await takeImageFromCameraForPrescriptions();
Navigator.pop(context);
},
),
SizedBox(
width: MediaQuery.of(context).size.width *
.20,
),
GestureDetector(
child: Icon(
Icons.photo,
size: 100,
color: primaryColor,
),
onTap: () async {
await pickImageFromGalleryForPrescriptions();
Navigator.pop(context);
},
),
],
),
),
);
});
},
child: const Text('Select Prescriptions'),
),
Visibility(
visible: uiPrescriptionImages.length > 0,
child: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * .20,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: uiPrescriptionImages.length,
itemBuilder: (context, index) {
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)),
),
),
/*Expanded(child:IconButton(
icon: const Icon(Icons.remove,color: Colors.red,),
onPressed: () async{
},
),)*/
],
);
}),
)),
Container(
width:double.infinity,
height: MediaQuery.of(context).size.height * .06,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: buttonColors, // background
onPrimary: Colors.black, // foreground
),
onPressed: () async{
if(doctorNameController.text!=''&& problemController.text!=''&& dateInput.text!=''&&prescriptionFor!=''){
String _name='';
String _age='';
String? _gender='';
if(prescriptionFor.toString().toLowerCase()=='others'){
if(patientNameController!=''&& patientAgeController.text!=''&&gender!=''){
_name=patientNameController.text;
_age=patientAgeController.text;
_gender=gender;
}
else{
AppSettings.longFailedToast('Please enter details');
}
}
else{
_name=AppSettings.userName;
_age=AppSettings.age;
_gender=AppSettings.gender;
}
AppSettings.preLoaderDialog(context);
bool isOnline = await AppSettings.internetConnectivity();
if(isOnline){
var payload = new Map<String, dynamic>();
payload["problem"] = problemController.text.toString();
payload["doctorName"] = doctorNameController.text.toString();
payload["hospitalName"] = hospitalNameController.text.toString();
payload["date"] = dateInput.text.toString();
payload["findings_date"] = '';
payload["reports_date"] = '';
payload["prescription_date"] = '';
payload["patientType"] = prescriptionFor.toString();
payload["others"] ={
"name": _name,
"age": int.parse(_age),
"gender": _gender.toString().toLowerCase()
};
payload["findings"] =uiFindingsImages;
payload["reports"] =uiReportsImages;
payload["prescription"] =uiPrescriptionImages;
bool uploadStatus = await AppSettings.addRecords(payload);
try{
if(uploadStatus){
Navigator.of(context,rootNavigator: true).pop();
AppSettings.longSuccessToast('Record added successfully');
Navigator.pop(context);
}
else{
Navigator.of(context,rootNavigator: true).pop();
AppSettings.longFailedToast('Fail to add record details');
}
}
catch(e){
print(e);
Navigator.of(context,rootNavigator: true).pop();
AppSettings.longFailedToast('Fail to add record details');
}
}
else{
AppSettings.longFailedToast('Please check internet');
}
}
else{
AppSettings.longFailedToast('Please enter valid details');
}
},
child: const Text('Submit'),
)),
],
),
),
),
));
}
}

@ -0,0 +1,526 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:healthcare_user/Reports/add_reports.dart';
import 'package:healthcare_user/Reports/finding_images.dart';
import 'package:healthcare_user/Reports/report_images.dart';
import 'package:healthcare_user/common/settings.dart';
import 'package:healthcare_user/common/zoom_image.dart';
import 'package:healthcare_user/models/reports_model.dart';
import 'package:photo_view/photo_view.dart';
class AllReports extends StatefulWidget {
const AllReports({Key? key}) : super(key: key);
@override
State<AllReports> createState() => _AllReportsState();
}
class _AllReportsState extends State<AllReports> {
List<ReportsModel> reportsList = [];
List<ReportsModel> reportsListOriginal = [];
bool isReportsDataLoading = false;
bool isSereverIssue = false;
Future<void> gaetAllRecords() async {
isReportsDataLoading=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();
isReportsDataLoading = false;
});
} catch (e) {
setState(() {
isReportsDataLoading = false;
isSereverIssue = true;
});
}
}
@override
void initState() {
gaetAllRecords();
super.initState();
}
showPicDialog(var imageUrl){
return showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return StatefulBuilder(
builder: (BuildContext context, StateSetter setState) {
return AlertDialog(
title: const Text(''),
content: SingleChildScrollView(
child: ListBody(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * .10,
height: MediaQuery.of(context).size.height * .50,
child: PhotoView(
imageProvider: NetworkImage(imageUrl) as ImageProvider,
maxScale: PhotoViewComputedScale.contained * 4.0,
minScale: PhotoViewComputedScale.contained,
initialScale: PhotoViewComputedScale.contained,
basePosition: Alignment.center,
)
)
],
),
),
actions: <Widget>[
TextButton(
child: Text('Close', style: textButtonStyle()),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
});
},
);
}
Widget findings(var obj){
return Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * .20,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: obj.findingsImages.length,
itemBuilder: (context, index) {
return Column(
children: [
Card(
child: GestureDetector(
onTap: (){
/*showPicDialog(obj.findingsImages[index]['url']);*/
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(imageName:'Findings',imageDetails:obj.findingsImages[index]['url'])));
},
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(
obj.findingsImages[index]['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
),
),
),
/*Expanded(child:IconButton(
icon: const Icon(Icons.remove,color: Colors.red,),
onPressed: () async{
},
),)*/
],
);
}),
);
}
Widget reports(var obj){
return Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * .20,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: obj.reportImages.length,
itemBuilder: (context, index) {
return Column(
children: [
Card(
child: GestureDetector(
onTap: (){
//showPicDialog(obj.reportImages[index]['url']);
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(imageName:'Reports',imageDetails:obj.reportImages[index]['url'])));
},
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(
obj.reportImages[index]
['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
),
),
),
/*Expanded(child:IconButton(
icon: const Icon(Icons.remove,color: Colors.red,),
onPressed: () async{
},
),)*/
],
);
}),
);
}
Widget prescriptions(var obj){
return Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * .20,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: obj.prescriptionImages.length,
itemBuilder: (context, index) {
return Column(
children: [
Card(
child: GestureDetector(
onTap: (){
//showPicDialog(obj.prescriptionImages[index]['url']);
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(imageName:'Prescriptions',imageDetails:obj.prescriptionImages[index]['url'])));
},
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(
obj.prescriptionImages[index]
['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
),
),
),
/*Expanded(child:IconButton(
icon: const Icon(Icons.remove,color: Colors.red,),
onPressed: () async{
},
),)*/
],
);
}),
);
}
Widget _allreports(){
if(reportsList.length!=0){
return Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(child:ListView.builder(
padding: EdgeInsets.all(0),
itemCount: reportsList.length,
itemBuilder: (BuildContext context, int index) {
return Card(
//color: prescriptionsList[index].cardColor,
child: Padding(
padding:EdgeInsets.all(8) ,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
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()),
Text(reportsList[index].gender.toString().toUpperCase(),style: valuesTextStyle()),
Text(reportsList[index].age.toString().toUpperCase(),style: valuesTextStyle()),
],
),
),
Expanded(child:IconButton(
icon: const Icon(Icons.edit,color: primaryColor,),
onPressed: () {
},
),),
Expanded(child:IconButton(
icon: const Icon(Icons.delete,color: primaryColor,),
onPressed: () async{
showDialog(
//if set to true allow to close popup by tapping out of the popup
//barrierDismissible: false,
context: context,
builder: (BuildContext context) => AlertDialog(
title: const Text('Do you want to delete Record?',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
actionsAlignment: MainAxisAlignment.spaceBetween,
actions: [
TextButton(
onPressed: ()async {
bool deleteTankStatus = await AppSettings.deleteRecord(reportsList[index].recordId);
if(deleteTankStatus){
gaetAllRecords();
AppSettings.longSuccessToast('Record deleted successfully');
Navigator.of(context).pop(true);
}
else{
AppSettings.longFailedToast('Record deletion failed');
Navigator.of(context).pop(true);
}
},
child: const Text('Yes',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
),
TextButton(
onPressed: () {
Navigator.of(context).pop(true);
},
child: const Text('No',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
),
],
),
);
},
),)
],
),
Row(
children: [
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: primaryColor, // background
onPrimary: Colors.white, // foreground
),
onPressed: () async {
/*Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const FindingImages()),
);*/
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new FindingImages(imageDetails:reportsList[index].findingsImages)));
},
child: Text('Findings: '+reportsList[index].findingsImages.length.toString()),
),
SizedBox(
width:MediaQuery.of(context).size.width * .05,
),
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: primaryColor, // background
onPrimary: Colors.white, // foreground
),
onPressed: () async {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ReportImages(imageDetails:reportsList[index].reportImages)));
},
child: Text('Reports: '+reportsList[index].reportImages.length.toString()),
),
SizedBox(
width:MediaQuery.of(context).size.width * .05,
),
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: primaryColor, // background
onPrimary: Colors.white, // foreground
),
onPressed: () async {
},
child: Text('Prescriptions: '+reportsList[index].prescriptionImages.length.toString()),
),
],
),
Visibility(
visible: false,
child: Text('Findings',style: headingsTextStyle()),),
Visibility(
visible: false,
child: findings(reportsList[index])),
Visibility(
visible: false,
child: Text('Reports',style: headingsTextStyle()),),
Visibility(
visible: false,
child:reports(reportsList[index]) ),
Visibility(
visible: false,
child: Text('Prescriptions',style: headingsTextStyle()),),
Visibility(
visible:false,
child:prescriptions(reportsList[index]) ),
],
),
),
);
}) ),
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) => AddReports())).then((value) {
gaetAllRecords();
});
//showBoreAddingDialog();
},
),
/* Padding(
padding: EdgeInsets.fromLTRB(5, 0, 5, 5),
child: Text(
'Add Tanks ',
style: TextStyle(color: Colors.white),
),
)*/
],
),
),
),
]);
}
else{
return Center(
child: Padding(
padding: EdgeInsets.fromLTRB(0, 40, 0, 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: MediaQuery.of(context).size.height * .25,),
Text('Click below icon to add new Record'),
SizedBox(
height: 20,
),
CircleAvatar(
backgroundColor: primaryColor,
radius: 40,
child: IconButton(
iconSize: 40,
icon: const Icon(
Icons.add,
color: Colors.white,
),
onPressed: () async {
Navigator.push(context, MaterialPageRoute(builder: (context) => AddReports())).then((value) {
gaetAllRecords();
});
},
),
)
],
),
)
);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar('Reports'),
body: isReportsDataLoading?Center(
child: CircularProgressIndicator(
color: primaryColor,
strokeWidth: 5.0,
),
): _allreports(),
);
}
}

@ -0,0 +1,79 @@
import 'package:flutter/material.dart';
import 'package:healthcare_user/common/settings.dart';
import 'package:healthcare_user/common/zoom_image.dart';
class FindingImages extends StatefulWidget {
var imageDetails;
FindingImages({this.imageDetails});
@override
State<FindingImages> createState() => _FindingImagesState();
}
class _FindingImagesState extends State<FindingImages> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar('Finding Images'),
body:Container(
padding: EdgeInsets.all(12.0),
child: GridView.builder(
itemCount:widget.imageDetails.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
crossAxisSpacing: 2.0,
mainAxisSpacing: 2.0,
),
itemBuilder: (BuildContext context, int index) {
return GestureDetector(
onTap: () {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(imageName:'Findings',imageDetails:widget.imageDetails[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(
widget.imageDetails[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 {
},
),
/* color: Colors.pinkAccent,
width: 35,
height: 35,*/
),
)]),
),
//Image.network(widget.imageDetails[index]['url']),
);
},
)),
);
}
}

@ -0,0 +1,114 @@
import 'package:flutter/material.dart';
import 'package:healthcare_user/common/settings.dart';
import 'package:healthcare_user/common/zoom_image.dart';
class ReportImages extends StatefulWidget {
var imageDetails;
ReportImages({this.imageDetails});
@override
State<ReportImages> createState() => _ReportImagesState();
}
class _ReportImagesState extends State<ReportImages> {
Widget renderUi() {
if(widget.imageDetails.length!=0){
return GridView.builder(
itemCount: widget.imageDetails.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
crossAxisSpacing: 2.0,
mainAxisSpacing: 2.0,
),
itemBuilder: (BuildContext context, int index) {
return GestureDetector(
onTap: () {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(
imageName: 'Findings',
imageDetails: widget.imageDetails[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(widget.imageDetails[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 {},
),
/* color: Colors.pinkAccent,
width: 35,
height: 35,*/
),
)
]),
),
//Image.network(widget.imageDetails[index]['url']),
);
},
);
}
else{
return Center(
child: Padding(
padding: EdgeInsets.fromLTRB(0, 40, 0, 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: MediaQuery.of(context).size.height * .25,),
Text('Click below icon to add new Report'),
SizedBox(
height: 20,
),
CircleAvatar(
backgroundColor: primaryColor,
radius: 40,
child: IconButton(
iconSize: 40,
icon: const Icon(
Icons.add,
color: Colors.white,
),
onPressed: () async {
/*Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const Login()),
);*/
},
),
)
],
),
)
);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar('Report Images'),
body: Container(padding: EdgeInsets.all(12.0), child: renderUi()),
);
}
}

@ -0,0 +1,45 @@
import 'package:flutter/material.dart';
import 'package:healthcare_user/common/settings.dart';
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:healthcare_user/models/bmi_history_model.dart';
class BmiChart extends StatefulWidget {
var myObject;
BmiChart({
this.myObject
});
@override
State<BmiChart> createState() => _BmiChartState();
}
class _BmiChartState extends State<BmiChart> {
_getSeriesData() {
List<charts.Series<BmiHistoryModel, DateTime>> series = [
charts.Series(
id: "Sales",
data: widget.myObject,
domainFn: (BmiHistoryModel series, _) => series.dateForFilter,
measureFn: (BmiHistoryModel series, _) => series.number2,
colorFn: (BmiHistoryModel series, _) => charts.MaterialPalette.blue.shadeDefault
)
];
return series;
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar('BMI Chart'),
body: Container(
child:new charts.TimeSeriesChart(_getSeriesData(), animate: true,),
),
);
}
}

@ -0,0 +1,65 @@
import 'package:flutter/material.dart';
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:healthcare_user/common/settings.dart';
class SalesData {
final int year;
final int sales;
SalesData(this.year, this.sales);
}
final data = [
new SalesData(0, 1500000),
new SalesData(1, 1735000),
new SalesData(2, 1678000),
new SalesData(3, 1890000),
new SalesData(4, 1907000),
new SalesData(5, 2300000),
new SalesData(6, 2360000),
new SalesData(7, 1980000),
new SalesData(8, 2654000),
new SalesData(9, 2789070),
new SalesData(10, 3020000),
new SalesData(11, 3245900),
new SalesData(12, 4098500),
new SalesData(13, 4500000),
new SalesData(14, 4456500),
new SalesData(15, 3900500),
new SalesData(16, 5123400),
new SalesData(17, 5589000),
new SalesData(18, 5940000),
new SalesData(19, 6367000),
];
_getSeriesData() {
List<charts.Series<SalesData, int>> series = [
charts.Series(
id: "Sales",
data: data,
domainFn: (SalesData series, _) => series.year,
measureFn: (SalesData series, _) => series.sales,
colorFn: (SalesData series, _) => charts.MaterialPalette.blue.shadeDefault
)
];
return series;
}
class Bpchart extends StatefulWidget {
const Bpchart({Key? key}) : super(key: key);
@override
State<Bpchart> createState() => _BpchartState();
}
class _BpchartState extends State<Bpchart> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar('Bp chart'),
body: Container(
child:new charts.LineChart(_getSeriesData(), animate: true,),
),
);
}
}

@ -1,6 +1,7 @@
import 'dart:convert'; import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:healthcare_user/Reports/allreports.dart';
import 'package:healthcare_user/common/updateprofile.dart'; import 'package:healthcare_user/common/updateprofile.dart';
import 'package:healthcare_user/emergency.dart'; import 'package:healthcare_user/emergency.dart';
import 'package:healthcare_user/howareufeeling_today.dart'; import 'package:healthcare_user/howareufeeling_today.dart';
@ -10,7 +11,7 @@ import 'package:healthcare_user/my_health.dart';
import 'package:healthcare_user/my_medicine_timings.dart'; import 'package:healthcare_user/my_medicine_timings.dart';
import 'package:healthcare_user/prescriptions/prescriptions.dart'; import 'package:healthcare_user/prescriptions/prescriptions.dart';
import 'package:healthcare_user/report_my_self.dart'; import 'package:healthcare_user/report_my_self.dart';
import 'package:healthcare_user/reports.dart'; import 'package:healthcare_user/Reports/add_reports.dart';
import 'package:healthcare_user/seekopinion.dart'; import 'package:healthcare_user/seekopinion.dart';
import 'package:healthcare_user/common/settings.dart'; import 'package:healthcare_user/common/settings.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
@ -75,7 +76,7 @@ class _DashboardState extends State<Dashboard> {
} else if (ind == 1) { } else if (ind == 1) {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute(builder: (context) => const Reports()), MaterialPageRoute(builder: (context) => const AddReports()),
); );
} else if (ind == 2) { } else if (ind == 2) {
Navigator.push( Navigator.push(
@ -274,7 +275,7 @@ class _DashboardState extends State<Dashboard> {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => const Reports()), builder: (context) => const AllReports()),
); );
}, },
), ),

@ -12,6 +12,7 @@ import 'package:flutter_styled_toast/flutter_styled_toast.dart';
import 'dart:async'; import 'dart:async';
import 'package:geolocator/geolocator.dart'; import 'package:geolocator/geolocator.dart';
import 'package:fluttertoast/fluttertoast.dart'; import 'package:fluttertoast/fluttertoast.dart';
import 'package:path/path.dart' as path;
//const Color primaryColor = Color(0XFF1786A3); //const Color primaryColor = Color(0XFF1786A3);
const Color primaryColor = Color(0XFF68A85D); const Color primaryColor = Color(0XFF68A85D);
@ -54,6 +55,22 @@ TextStyle valuesTextStyle() {
); );
} }
TextStyle problemTextStyle() {
return TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Colors.red
);
}
TextStyle headingsTextStyle() {
return TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: primaryColor
);
}
TextStyle startAndStopHeading() { TextStyle startAndStopHeading() {
return TextStyle( return TextStyle(
fontSize: 14, fontSize: 14,
@ -220,12 +237,22 @@ class AppSettings {
static String addMedicineTimingsUrl = host + 'medicine-timing'; static String addMedicineTimingsUrl = host + 'medicine-timing';
static String getMedicineTimingsUrl = host + 'getmedicineztiming'; static String getMedicineTimingsUrl = host + 'getmedicineztiming';
static String prescriptionUploadPicUrl = host + 'uploads-precription'; static String prescriptionUploadPicUrl = host + 'uploads-precription';
static String findingsUploadPicUrl = host + 'uploads-findings-prescription';
static String reportsUploadPicUrl = host + 'uploads-reports-prescription';
static String recordPrescriptionsUploadPicUrl = host + 'uploads-prescription-prescription';
static String getAllpharmaciesDataUrl = host + 'getAllPharmacylist'; static String getAllpharmaciesDataUrl = host + 'getAllPharmacylist';
static String getAllQuotationRequestsUrl = host + 'userprecription'; static String getAllQuotationRequestsUrl = host + 'userprecription';
static String getQuotationUrl = host + 'submitPicture'; static String getQuotationUrl = host + 'submitPicture';
static String addPrescriptionUrl = host + 'add-prescription-details'; static String addPrescriptionUrl = host + 'add-prescription-details';
static String addRecordsUrl = host + 'add-record';
static String reportMySelfVideoUploadUrl = host + 'reportProblemVideo'; static String reportMySelfVideoUploadUrl = host + 'reportProblemVideo';
static String getAllPrescriptionsDataUrl = host + 'usersinglerprecription'; //static String getAllPrescriptionsDataUrl = host + 'usersinglerprecription';
static String getAllPrescriptionsDataUrl = host + 'getAllPrescriptionDetails';
static String getRecordsDataUrl = host + 'getAllRecords';
static String deleteRecordUrl = host + 'deleteRecord';
static File? updatedImage; static File? updatedImage;
static String image = ''; static String image = '';
@ -690,6 +717,60 @@ class AppSettings {
return response.body; return response.body;
} }
static Future<String> uploadImageForFindings(file) async {
var request = http.MultipartRequest(
'POST', Uri.parse(findingsUploadPicUrl + '/' + customerId));
if (file.length > 0) {
for (var i = 0; i < file.length; i++) {
request.files.add(await http.MultipartFile.fromPath('picture', file[i].path));
}}
// request.files.add(await http.MultipartFile.fromPath('picture', images.toString().replaceAll('[', '').replaceAll(']','')));
var res = await request.send();
var response = await http.Response.fromStream(res);
return response.body;
}
static Future<String> uploadImageForReports(file) async {
var request = http.MultipartRequest(
'POST', Uri.parse(reportsUploadPicUrl + '/' + customerId));
if (file.length > 0) {
for (var i = 0; i < file.length; i++) {
request.files.add(await http.MultipartFile.fromPath('picture', file[i].path));
}}
// request.files.add(await http.MultipartFile.fromPath('picture', images.toString().replaceAll('[', '').replaceAll(']','')));
var res = await request.send();
var response = await http.Response.fromStream(res);
return response.body;
}
static Future<String> uploadImageForPrescriptions(file) async {
var request = http.MultipartRequest(
'POST', Uri.parse(recordPrescriptionsUploadPicUrl + '/' + customerId));
if (file.length > 0) {
for (var i = 0; i < file.length; i++) {
request.files.add(await http.MultipartFile.fromPath('picture', file[i].path));
}}
// request.files.add(await http.MultipartFile.fromPath('picture', images.toString().replaceAll('[', '').replaceAll(']','')));
var res = await request.send();
var response = await http.Response.fromStream(res);
return response.body;
}
static Future<String> uploadImageForFindingsCamera(file) async {
var request = http.MultipartRequest(
'POST', Uri.parse(findingsUploadPicUrl + '/' + customerId));
request.files.add(await http.MultipartFile.fromPath('picture', file.path));
var res = await request.send();
var response = await http.Response.fromStream(res);
return response.body;
}
static Future<String> uploadVideoInReportMySelf(file) async { static Future<String> uploadVideoInReportMySelf(file) async {
var request = http.MultipartRequest( var request = http.MultipartRequest(
'POST', Uri.parse(reportMySelfVideoUploadUrl + '/' + customerId)); 'POST', Uri.parse(reportMySelfVideoUploadUrl + '/' + customerId));
@ -859,6 +940,39 @@ class AppSettings {
} }
} }
static Future<bool> addRecords(payload) async {
var uri = Uri.parse(addRecordsUrl + '/' + customerId);
var response = await http.post(uri,
body: json.encode(payload), headers: await buildRequestHeaders());
if (response.statusCode == 200) {
try {
var _response = json.decode(response.body);
print(_response);
return true;
} catch (e) {
print(e);
return false;
}
} else if (response.statusCode == 401) {
bool status = await AppSettings.resetToken();
if (status) {
response = await http.post(uri,
body: json.encode(payload), headers: await buildRequestHeaders());
if (response.statusCode == 200) {
return true;
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
}
static Future<String> getAllPrescriptions() async { static Future<String> getAllPrescriptions() async {
var uri = Uri.parse(getAllPrescriptionsDataUrl + '/' + customerId); var uri = Uri.parse(getAllPrescriptionsDataUrl + '/' + customerId);
//uri = uri.replace(query: 'customerId=$customerId'); //uri = uri.replace(query: 'customerId=$customerId');
@ -883,6 +997,61 @@ class AppSettings {
} }
} }
static Future<String> getAllRecords() async {
var uri = Uri.parse(getRecordsDataUrl + '/' + customerId);
//uri = uri.replace(query: 'customerId=$customerId');
var response = await http.get(uri, headers: await buildRequestHeaders());
if (response.statusCode == 200) {
return response.body;
} else if (response.statusCode == 401) {
bool status = await AppSettings.resetToken();
if (status) {
response = await http.get(uri, headers: await buildRequestHeaders());
if (response.statusCode == 200) {
return response.body;
} else {
return '';
}
} else {
return '';
}
} else {
return '';
}
}
static Future<bool> deleteRecord(recordId) async {
var uri = Uri.parse(deleteRecordUrl + '/' + recordId);
try {
var response = await http.delete(uri, headers: await buildRequestHeaders());
if (response.statusCode == 200) {
return true;
} else if (response.statusCode == 401) {
bool status = await AppSettings.resetToken();
if (status) {
response = await http.delete(uri, headers: await buildRequestHeaders());
if (response.statusCode == 200) {
return true;
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
} catch (e) {
print(e);
return false;
}
}
/*Apis ends here*/ /*Apis ends here*/
//save data local //save data local

@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
import 'package:healthcare_user/common/settings.dart';
import 'package:photo_view/photo_view.dart';
class ImageZoomPage extends StatefulWidget {
var imageName;
var imageDetails;
ImageZoomPage({this.imageName,this.imageDetails});
@override
State<ImageZoomPage> createState() => _ImageZoomPageState();
}
class _ImageZoomPageState extends State<ImageZoomPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar(widget.imageName),
body: Container(
//width: MediaQuery.of(context).size.width * .10,
//height: MediaQuery.of(context).size.height * .50,
child: PhotoView(
imageProvider: NetworkImage(widget.imageDetails) as ImageProvider,
maxScale: PhotoViewComputedScale.contained * 4.0,
minScale: PhotoViewComputedScale.contained,
initialScale: PhotoViewComputedScale.contained,
basePosition: Alignment.center,
)
),
);
}
}

@ -10,6 +10,8 @@ class BmiHistoryModel {
String displayDate=''; String displayDate='';
DateTime dateForFilter=new DateTime.now(); DateTime dateForFilter=new DateTime.now();
var number1;
var number2;
BmiHistoryModel(); BmiHistoryModel();
@ -30,6 +32,8 @@ class BmiHistoryModel {
rtvm.bmiValue = json['bmivalue'].toString() ?? ''; rtvm.bmiValue = json['bmivalue'].toString() ?? '';
rtvm.height = json['height'].toString() ?? ''; rtvm.height = json['height'].toString() ?? '';
rtvm.weight = json['weight'].toString() ?? ''; rtvm.weight = json['weight'].toString() ?? '';
rtvm.number1 = double.parse( rtvm.bmiValue);
rtvm.number2 = double.parse( rtvm.bmiValue);
rtvm.date = json['createdAt'].toString() ?? ''; rtvm.date = json['createdAt'].toString() ?? '';
//DateTime tempDate = new DateFormat("yyyy-MM-dd hh:mm:ss").parse(rtvm.date); //DateTime tempDate = new DateFormat("yyyy-MM-dd hh:mm:ss").parse(rtvm.date);

@ -8,13 +8,17 @@ class PrescriptionsModel {
String age=''; String age='';
String gender=''; String gender='';
String patient_type=''; String patient_type='';
List prescriptionUrls=[];
PrescriptionsModel(); PrescriptionsModel();
factory PrescriptionsModel.fromJson(Map<String, dynamic> json){ factory PrescriptionsModel.fromJson(Map<String, dynamic> json){
PrescriptionsModel rtvm = new PrescriptionsModel(); PrescriptionsModel rtvm = new PrescriptionsModel();
rtvm.prescription_name = json['name'] ?? ''; rtvm.prescriptionUrls=json['precription']??[];
/*rtvm.prescription_name = json['name'] ?? '';
rtvm.patient_type = json['patientType'] ?? ''; rtvm.patient_type = json['patientType'] ?? '';
rtvm.prescription_url = json['pictureUrl'][0] ?? ''; rtvm.prescription_url = json['pictureUrl'][0] ?? '';
@ -23,16 +27,12 @@ class PrescriptionsModel {
rtvm.gender=AppSettings.gender; rtvm.gender=AppSettings.gender;
rtvm.patient_name=AppSettings.userName; rtvm.patient_name=AppSettings.userName;
} }
/* "others": {
"name": "jhanu",
"age": 23,
"gender": "female"
},*/
else{ else{
rtvm.age=json['others']['age'].toString(); rtvm.age=json['others']['age'].toString();
rtvm.gender=json['others']['gender']; rtvm.gender=json['others']['gender'];
rtvm.patient_name=json['others']['name']; rtvm.patient_name=json['others']['name'];
} }*/
return rtvm; return rtvm;
} }

@ -0,0 +1,47 @@
import 'package:flutter/material.dart';
import 'package:healthcare_user/common/settings.dart';
class ReportsModel {
String patient_name='';
String age='';
String gender='';
String patient_type='';
String problem='';
String doctorName='';
String hospitalName='';
String date='';
String recordId='';
List findingsImages = [];
List reportImages = [];
List prescriptionImages = [];
ReportsModel();
factory ReportsModel.fromJson(Map<String, dynamic> json){
ReportsModel rtvm = new ReportsModel();
rtvm.patient_type = json['patientType'] ?? '';
rtvm.doctorName = json['doctorName'] ?? '';
rtvm.hospitalName = json['hospitalName'] ?? '';
rtvm.problem = json['problem'] ?? '';
rtvm.date = json['date'] ?? '';
rtvm.recordId = json['recordId'] ?? '';
rtvm.findingsImages = json['findings'] ?? [];
rtvm.reportImages = json['reports'] ?? [];
rtvm.prescriptionImages = json['prescription'] ?? [];
if(rtvm.patient_type.toString().toLowerCase()=='self'){
rtvm.age=AppSettings.age;
rtvm.gender=AppSettings.gender;
rtvm.patient_name=AppSettings.userName;
}
else{
rtvm.age=json['others']['age'].toString();
rtvm.gender=json['others']['gender'];
rtvm.patient_name=json['others']['name'];
}
return rtvm;
}
}

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart'; import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:healthcare_user/common/settings.dart'; import 'package:healthcare_user/common/settings.dart';
import 'package:healthcare_user/common/zoom_image.dart';
import 'package:healthcare_user/google_maps_place_picker_mb/src/models/pick_result.dart'; import 'package:healthcare_user/google_maps_place_picker_mb/src/models/pick_result.dart';
import 'package:healthcare_user/google_maps_place_picker_mb/src/place_picker.dart'; import 'package:healthcare_user/google_maps_place_picker_mb/src/place_picker.dart';
import 'package:healthcare_user/keys.dart'; import 'package:healthcare_user/keys.dart';
@ -701,10 +702,10 @@ class _OrderMedicinesState extends State<OrderMedicines> {
payload["picture"] = widget.prescriptionDetails.prescription_url.toString(); payload["picture"] = widget.prescriptionDetails.prescription_url.toString();
payload["pharmacies"] = pharmaciesCheckboxes; payload["pharmacies"] = pharmaciesCheckboxes;
payload["familyDetails"] = { payload["familyDetails"] = {
"patient_name": widget.prescriptionDetails.patient_name.toString(), "patient_name": widget.prescriptionDetails.patient_name.toString()??'',
"patient_age": int.parse(widget.prescriptionDetails.age.toString()), "patient_age": int.parse(widget.prescriptionDetails.age.toString())??0,
"patient_gender": widget.prescriptionDetails.gender.toString().toLowerCase(), "patient_gender": widget.prescriptionDetails.gender.toString().toLowerCase()??'',
"patient_address": userAddress "patient_address": userAddress??''
}; };
bool status = await AppSettings.getQuotation(payload); bool status = await AppSettings.getQuotation(payload);
@ -815,6 +816,58 @@ class _OrderMedicinesState extends State<OrderMedicines> {
super.initState(); super.initState();
} }
Widget prescriptions(var obj){
return Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * .20,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: obj.prescriptionUrls.length,
itemBuilder: (context, index) {
return Column(
children: [
Card(
child: GestureDetector(
onTap: (){
//showPicDialog(obj.prescriptionImages[index]['url']);
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(imageName:'Prescriptions',imageDetails:obj.prescriptionUrls[index]['url'])));
},
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(
obj.prescriptionUrls[index]
['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
),
),
),
/*Expanded(child:IconButton(
icon: const Icon(Icons.remove,color: Colors.red,),
onPressed: () async{
},
),)*/
],
);
}),
);
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
@ -825,51 +878,7 @@ class _OrderMedicinesState extends State<OrderMedicines> {
children: [ children: [
Padding( Padding(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Row( child: prescriptions(widget.prescriptionDetails),),
children: [
Container(
width: MediaQuery.of(context).size.width * .18,
height: MediaQuery.of(context).size.height * .10,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
image: DecorationImage(
image: NetworkImage(widget.prescriptionDetails.prescription_url)
as ImageProvider, // picked file
fit: BoxFit.contain)),
),
SizedBox(
width: MediaQuery.of(context).size.width * .02,
),
Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.prescriptionDetails.prescription_name
.toString()
.toUpperCase(),
style: valuesTextStyle()),
Text(
widget.prescriptionDetails.patient_name
.toString()
.toUpperCase(),
style: valuesTextStyle()),
Text(
widget.prescriptionDetails.gender
.toString()
.toUpperCase(),
style: valuesTextStyle()),
Text(
widget.prescriptionDetails.age
.toString()
.toUpperCase(),
style: valuesTextStyle()),
],
),
),
],
)),
Padding( Padding(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Row( child: Row(

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:geolocator/geolocator.dart'; import 'package:geolocator/geolocator.dart';
import 'package:healthcare_user/common/settings.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/pharmacies_model.dart';
import 'package:healthcare_user/prescriptions/add_prescriptions.dart'; import 'package:healthcare_user/prescriptions/add_prescriptions.dart';
import 'package:healthcare_user/prescriptions/oreder_medicines.dart'; import 'package:healthcare_user/prescriptions/oreder_medicines.dart';
@ -443,131 +444,75 @@ class _PrescriptionsState extends State<Prescriptions> {
); );
} }
Widget _allPrescriptions(){ Widget prescriptions(var obj){
if (prescriptionsList.length != 0) {
return Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * .20,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: obj.prescriptionUrls.length,
itemBuilder: (context, index) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Expanded(child:ListView.builder( Card(
padding: EdgeInsets.all(0), child: GestureDetector(
itemCount: prescriptionsList.length, onTap: (){
itemBuilder: (BuildContext context, int index) { //showPicDialog(obj.prescriptionImages[index]['url']);
return Card( Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(imageName:'Prescriptions',imageDetails:obj.prescriptionUrls[index]['url'])));
//color: prescriptionsList[index].cardColor,
child: Padding(
padding:EdgeInsets.all(8) , },
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
child: Container( child: Container(
width: MediaQuery.of(context).size.width * .18, width: MediaQuery.of(context).size.width * .30,
height: height: MediaQuery.of(context).size.height * .15,
MediaQuery.of(context).size.height * .10,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
image: DecorationImage( image: DecorationImage(
image: NetworkImage(prescriptionsList[index].prescription_url) as ImageProvider, // picked file image: NetworkImage(
fit: BoxFit.contain)), obj.prescriptionUrls[index]
), ['url'])
onTap: (){ as ImageProvider, // picked file
showPicDialog(prescriptionsList[index].prescription_url); fit: BoxFit.fill)),
},
), ),
SizedBox(width:MediaQuery.of(context).size.width * .02,),
Container(
width: MediaQuery.of(context).size.width * .55,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(prescriptionsList[index].prescription_name.toString().toUpperCase(),style: valuesTextStyle()),
Text(prescriptionsList[index].patient_name.toString().toUpperCase(),style: valuesTextStyle()),
Text(prescriptionsList[index].gender.toString().toUpperCase(),style: valuesTextStyle()),
Text(prescriptionsList[index].age.toString().toUpperCase(),style: valuesTextStyle()),
],
), ),
), ),
/*Expanded(child:IconButton(
icon: const Icon(Icons.remove,color: Colors.red,),
Expanded(child:IconButton(
icon: const Icon(Icons.edit,color: primaryColor,),
onPressed: () {
},
),),
Expanded(child:IconButton(
icon: const Icon(Icons.delete,color: primaryColor,),
onPressed: () async{ onPressed: () async{
/* showDialog(
//if set to true allow to close popup by tapping out of the popup
//barrierDismissible: false,
context: context,
builder: (BuildContext context) => AlertDialog(
title: const Text('Do you want to delete tank?',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
actionsAlignment: MainAxisAlignment.spaceBetween,
actions: [
TextButton(
onPressed: ()async {
var payload = new Map<String, dynamic>();
payload["tankLocation"] = modelTanksViewList[index].tank_location.toString().toLowerCase();
bool deleteTankStatus = await AppSettings.deleteTank(modelTanksViewList[index].tank_name,payload);
if(deleteTankStatus){
readJson();
AppSettings.longSuccessToast('tank deleted successfully');
Navigator.of(context).pop(true);
}
else{
AppSettings.longFailedToast('tank deletion failed');
Navigator.of(context).pop(true);
}
}, },
child: const Text('Yes', ),)*/
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
),
TextButton(
onPressed: () {
Navigator.of(context).pop(true);
},
child: const Text('No',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
),
], ],
), );
);*/ }),
);
}, }
),)
], Widget _allPrescriptions(){
if (prescriptionsList.length != 0) {
return Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(child:ListView.builder(
padding: EdgeInsets.all(0),
itemCount: prescriptionsList.length,
itemBuilder: (BuildContext context, int index) {
return Card(
), //color: prescriptionsList[index].cardColor,
child: Padding(
padding:EdgeInsets.all(8) ,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
prescriptions(prescriptionsList[index]),
TextButton( TextButton(
child: const Text( child: const Text(
'Order Medicines', 'Order Medicines',

@ -1,56 +0,0 @@
import 'package:flutter/material.dart';
import 'package:healthcare_user/common/settings.dart';
class Reports extends StatefulWidget {
const Reports({Key? key}) : super(key: key);
@override
State<Reports> createState() => _ReportsState();
}
class _ReportsState extends State<Reports> {
TextEditingController doctorNameController = TextEditingController();
TextEditingController hospitalNameController = TextEditingController();
TextEditingController problemController = TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar('Reports'),
body: Container(
child: Padding(
padding: EdgeInsets.all(10),
child: Column(
children: [
Container(
child: TextFormField(
cursorColor: greyColor,
controller: doctorNameController,
decoration: textFormFieldDecoration(Icons.person,'Enter Doctor name'),
),
),
SizedBox(height:MediaQuery.of(context).size.height * .02,),
Container(
child: TextFormField(
cursorColor: greyColor,
controller: hospitalNameController,
decoration: textFormFieldDecoration(Icons.location_city_outlined,'Enter Hospital name'),
),
),
SizedBox(height:MediaQuery.of(context).size.height * .02,),
Container(
child: TextFormField(
cursorColor: greyColor,
controller: problemController,
decoration: textFormFieldDecoration(Icons.edit,'Enter Problem'),
),
),
],
),
),
),
);
}
}

@ -57,6 +57,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.1" version: "1.2.1"
charts_common:
dependency: transitive
description:
name: charts_common
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.0"
charts_flutter:
dependency: "direct dev"
description:
name: charts_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.0"
checked_yaml: checked_yaml:
dependency: transitive dependency: transitive
description: description:
@ -679,6 +693,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.1" version: "3.1.1"
logging:
dependency: transitive
description:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
@ -700,6 +721,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.0" version: "1.8.0"
multi_image_picker:
dependency: "direct dev"
description:
name: multi_image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "4.8.01"
nested: nested:
dependency: transitive dependency: transitive
description: description:

@ -65,6 +65,8 @@ dev_dependencies:
photo_view: ^0.14.0 photo_view: ^0.14.0
pinch_zoom: ^1.0.0 pinch_zoom: ^1.0.0
dots_indicator: ^3.0.0 dots_indicator: ^3.0.0
multi_image_picker: ^4.8.1
charts_flutter: ^0.12.0
flutter_icons: flutter_icons:
image_path_ios: 'images/appicon.png' image_path_ios: 'images/appicon.png'

Loading…
Cancel
Save