update location completed

dev
Sneha 1 year ago
parent 51452337d1
commit 2bcacdcb92

@ -8,6 +8,7 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.CALL_PHONE" /> <uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>

@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
task clean(type: Delete) { tasks.register("clean", Delete) {
delete rootProject.buildDir delete rootProject.buildDir
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -2,13 +2,16 @@ import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:healthcare_user/Reports/add_reports.dart'; import 'package:healthcare_user/Reports/add_reports.dart';
import 'package:healthcare_user/Reports/all_records_tab.dart';
import 'package:healthcare_user/Reports/finding_images.dart'; import 'package:healthcare_user/Reports/finding_images.dart';
import 'package:healthcare_user/Reports/prescription_images.dart'; import 'package:healthcare_user/Reports/prescription_images.dart';
import 'package:healthcare_user/Reports/report_images.dart'; import 'package:healthcare_user/Reports/report_images.dart';
import 'package:healthcare_user/Reports/update_report.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/common/zoom_image.dart';
import 'package:healthcare_user/models/reports_model.dart'; import 'package:healthcare_user/models/reports_model.dart';
import 'package:photo_view/photo_view.dart'; import 'package:photo_view/photo_view.dart';
import 'package:intl/intl.dart';
class AllReports extends StatefulWidget { class AllReports extends StatefulWidget {
const AllReports({Key? key}) : super(key: key); const AllReports({Key? key}) : super(key: key);
@ -25,6 +28,7 @@ class _AllReportsState extends State<AllReports> {
bool isReportsDataLoading = false; bool isReportsDataLoading = false;
bool isSereverIssue = false; bool isSereverIssue = false;
TextEditingController searchController = TextEditingController(); TextEditingController searchController = TextEditingController();
TextEditingController dateInput = TextEditingController();
String dropdownSearchType = 'Problem'; String dropdownSearchType = 'Problem';
var typeOfSearchItems = [ var typeOfSearchItems = [
'Problem', 'Problem',
@ -104,6 +108,31 @@ class _AllReportsState extends State<AllReports> {
} }
} }
Future<void> getRecordsByDate(var date) 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();
reportsList= reportsListOriginal.where(
(x) => x.date.toString().toLowerCase().contains(date.toString().toLowerCase())
).toList();
isReportsDataLoading = false;
});
} catch (e) {
setState(() {
isReportsDataLoading = false;
isSereverIssue = true;
});
}
}
@override @override
void initState() { void initState() {
getAllRecords(); getAllRecords();
@ -308,194 +337,230 @@ class _AllReportsState extends State<AllReports> {
padding: EdgeInsets.all(0), padding: EdgeInsets.all(0),
itemCount: reportsList.length, itemCount: reportsList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return Card( return GestureDetector(
onTap: (){
//color: prescriptionsList[index].cardColor,
child: Padding( Navigator.push(
padding:EdgeInsets.all(8) , context,
child: Column( new MaterialPageRoute(
crossAxisAlignment: CrossAxisAlignment.start, builder: (__) => new AllReportsTab(recordDetails:reportsList[index],initialIndex: 0,))).then((value) {
children: [ getAllRecords();
Row( });
mainAxisAlignment: MainAxisAlignment.spaceBetween, },
crossAxisAlignment: CrossAxisAlignment.center, child: Card(
children: [
//color: prescriptionsList[index].cardColor,
Container( child: Padding(
width: MediaQuery.of(context).size.width * .55, padding:EdgeInsets.all(8) ,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Row(
Text('Problem: '+reportsList[index].problem.toString().toUpperCase(),style: problemTextStyle()), mainAxisAlignment: MainAxisAlignment.spaceBetween,
Text(reportsList[index].doctorName.toString().toUpperCase(),style: valuesTextStyle()), crossAxisAlignment: CrossAxisAlignment.center,
Text(reportsList[index].hospitalName.toString().toUpperCase(),style: valuesTextStyle()), children: [
Text(reportsList[index].date.toString().toUpperCase(),style: valuesTextStyle()),
Text(reportsList[index].patient_name.toString().toUpperCase(),style: valuesTextStyle()), Container(
Row( width: MediaQuery.of(context).size.width * .55,
children: [ child: Column(
Text(reportsList[index].gender.toString().toUpperCase(),style: valuesTextStyle()), mainAxisAlignment: MainAxisAlignment.start,
SizedBox(width:MediaQuery.of(context).size.width * .05,), crossAxisAlignment: CrossAxisAlignment.start,
Text(reportsList[index].age.toString().toUpperCase()+" Yrs",style: valuesTextStyle()), 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('Patient details: ',style: problemTextStyle()),
), 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()),
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){ Expanded(child:IconButton(
getAllRecords(); icon: const Icon(Icons.edit,color: primaryColor,),
AppSettings.longSuccessToast('Record deleted successfully'); onPressed: () {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new UpdateReport(reportDetails:reportsList[index]))).then((value) {
getAllRecords();
});
},
),),
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){
getAllRecords();
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); Navigator.of(context).pop(true);
},
} child: const Text('No',
else{ style: TextStyle(
AppSettings.longFailedToast('Record deletion failed'); color: primaryColor,
Navigator.of(context).pop(true); fontSize: 20,
} )),
}, ),
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,
),) new MaterialPageRoute(
builder: (__) => new FindingImages(imageDetails:reportsList[index].findingsImages,recordId: reportsList[index].recordId,))).then((value) {
], getAllRecords();
});*/
), Navigator.push(
context,
Row( new MaterialPageRoute(
children: [ builder: (__) => new AllReportsTab(recordDetails:reportsList[index],initialIndex: 0,))).then((value) {
ElevatedButton( getAllRecords();
style: ElevatedButton.styleFrom( });
primary: primaryColor, // background },
onPrimary: Colors.white, // foreground child: Text('Findings: '+reportsList[index].findingsImages.length.toString(),style:textButtonStyleReports(),),
),
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,recordId:reportsList[index].recordId ,))).then((value) {
getAllRecords();
});*/
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new AllReportsTab(recordDetails:reportsList[index],initialIndex: 1,))).then((value) {
getAllRecords();
});
},
child: Text('Reports: '+reportsList[index].reportImages.length.toString(),style:textButtonStyleReports()),
), ),
onPressed: () async { SizedBox(
Navigator.push( width:MediaQuery.of(context).size.width * .05,
context,
new MaterialPageRoute(
builder: (__) => new FindingImages(imageDetails:reportsList[index].findingsImages,recordId: reportsList[index].recordId,))).then((value) {
getAllRecords();
});
},
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 { ElevatedButton(
Navigator.push( style: ElevatedButton.styleFrom(
context, primary: primaryColor, // background
new MaterialPageRoute( onPrimary: Colors.white, // foreground
builder: (__) => new ReportImages(imageDetails:reportsList[index].reportImages,recordId:reportsList[index].recordId ,))).then((value) { ),
getAllRecords(); onPressed: () async {
}); /*Navigator.push(
context,
}, new MaterialPageRoute(
child: Text('Reports: '+reportsList[index].reportImages.length.toString()), builder: (__) => new PrescriptionImages(imageDetails:reportsList[index].prescriptionImages,recordId: reportsList[index].recordId,familyDetails:reportsList[index],details:reportsList[index] ,))).then((value) {
), getAllRecords();
SizedBox( });*/
width:MediaQuery.of(context).size.width * .05,
), Navigator.push(
ElevatedButton( context,
style: ElevatedButton.styleFrom( new MaterialPageRoute(
primary: primaryColor, // background builder: (__) => new AllReportsTab(recordDetails:reportsList[index],initialIndex: 2,))).then((value) {
onPrimary: Colors.white, // foreground getAllRecords();
});
},
child: Text('Prescriptions: '+reportsList[index].prescriptionImages.length.toString(),style:textButtonStyleReports()),
), ),
onPressed: () async { ],
Navigator.push( ),
context,
new MaterialPageRoute(
builder: (__) => new PrescriptionImages(imageDetails:reportsList[index].prescriptionImages,recordId: reportsList[index].recordId,familyDetails:reportsList[index]))).then((value) {
getAllRecords(); Visibility(
}); visible: false,
child: Text('Findings',style: headingsTextStyle()),),
}, Visibility(
child: Text('Prescriptions: '+reportsList[index].prescriptionImages.length.toString()), visible: false,
), child: findings(reportsList[index])),
], Visibility(
),
Visibility(
visible: false,
child: Text('Findings',style: headingsTextStyle()),),
Visibility(
visible: false, visible: false,
child: findings(reportsList[index])), child: Text('Reports',style: headingsTextStyle()),),
Visibility( Visibility(
visible: false, visible: false,
child: Text('Reports',style: headingsTextStyle()),), child:reports(reportsList[index]) ),
Visibility( Visibility(
visible: false, visible: false,
child:reports(reportsList[index]) ), child: Text('Prescriptions',style: headingsTextStyle()),),
Visibility( Visibility(
visible: false, visible:false,
child: Text('Prescriptions',style: headingsTextStyle()),), child:prescriptions(reportsList[index]) ),
Visibility( ],
visible:false, ),
child:prescriptions(reportsList[index]) ),
],
), ),
), ),
); );
@ -602,7 +667,7 @@ class _AllReportsState extends State<AllReports> {
Icons.clear, Icons.clear,
color: greyColor, color: greyColor,
),*/ ),*/
suffixIcon: IconButton( suffixIcon: searchController.text!=''?IconButton(
icon: Icon( icon: Icon(
Icons.clear, Icons.clear,
color: Colors.red, color: Colors.red,
@ -613,6 +678,13 @@ class _AllReportsState extends State<AllReports> {
}); });
getAllRecords(); getAllRecords();
}, },
):IconButton(
icon: Icon(
Icons.clear,
color: Colors.transparent,
),
onPressed: () {
},
), ),
border: OutlineInputBorder( border: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor), borderSide: BorderSide(color: primaryColor),
@ -660,7 +732,7 @@ class _AllReportsState extends State<AllReports> {
Icons.clear, Icons.clear,
color: greyColor, color: greyColor,
),*/ ),*/
suffixIcon: IconButton( suffixIcon: searchController.text!=''?IconButton(
icon: Icon( icon: Icon(
Icons.clear, Icons.clear,
color: Colors.red, color: Colors.red,
@ -671,6 +743,13 @@ class _AllReportsState extends State<AllReports> {
}); });
getAllRecords(); getAllRecords();
}, },
):IconButton(
icon: Icon(
Icons.clear,
color: Colors.transparent,
),
onPressed: () {
},
), ),
border: OutlineInputBorder( border: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor), borderSide: BorderSide(color: primaryColor),
@ -692,6 +771,106 @@ class _AllReportsState extends State<AllReports> {
), ),
),) ),)
),), ),),
Visibility(
visible:dropdownSearchType.toString().toLowerCase()=='date' ,
child: Container(
height: MediaQuery.of(context).size.height * .07,
padding: EdgeInsets.all(5),
child: Center(child: TextField(
cursorColor: primaryColor,
controller: searchController,
onChanged: (string) {
if(string.length>=1){
getRecordsByDate(string);
}
else{
getAllRecords();
}
},
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(() {
searchController.text = formattedDate; //set output date to TextField value.
});
getRecordsByDate(searchController.text);
} else {}
},
decoration: InputDecoration(
prefixIcon: Icon(
Icons.search,
color: primaryColor,
),
suffixIcon: searchController.text!=''?IconButton(
icon: Icon(
Icons.clear,
color: Colors.red,
),
onPressed: () {
setState(() {
searchController.text='';
});
getAllRecords();
},
):IconButton(
icon: Icon(
Icons.clear,
color: Colors.transparent,
),
onPressed: () {
},
),
border: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor),
borderRadius: BorderRadius.circular(30),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor),
borderRadius: BorderRadius.circular(30),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor),
borderRadius: BorderRadius.circular(30),
),
//labelText: 'Search by phone number',
hintText: 'Search by date',
labelStyle: TextStyle(
color: greyColor, //<-- SEE HERE
),
),
),)
),
),
Expanded(child: _filtereddata()), Expanded(child: _filtereddata()),
Padding( Padding(
padding: EdgeInsets.fromLTRB(8, 8, 8, 8), padding: EdgeInsets.fromLTRB(8, 8, 8, 8),
@ -775,7 +954,7 @@ class _AllReportsState extends State<AllReports> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppSettings.appBar('Reports'), appBar: AppSettings.appBar('Records'),
body: isReportsDataLoading?Center( body: isReportsDataLoading?Center(
child: CircularProgressIndicator( child: CircularProgressIndicator(
color: primaryColor, color: primaryColor,

@ -13,21 +13,19 @@ class FindingImages extends StatefulWidget {
var imageDetails; var imageDetails;
var recordId; var recordId;
FindingImages({this.imageDetails,this.recordId}); FindingImages({this.imageDetails, this.recordId});
@override @override
State<FindingImages> createState() => _FindingImagesState(); State<FindingImages> createState() => _FindingImagesState();
} }
class _FindingImagesState extends State<FindingImages> { class _FindingImagesState extends State<FindingImages> {
final ImagePicker imagePicker = ImagePicker(); final ImagePicker imagePicker = ImagePicker();
List imageFileList = []; List imageFileList = [];
List uiFindingsImages = []; List uiFindingsImages = [];
final ImagePicker _picker = ImagePicker(); final ImagePicker _picker = ImagePicker();
/* Future pickImageFromGallery() async { /* Future pickImageFromGallery() async {
imageFileList = []; imageFileList = [];
final List<XFile>? selectedImages = await imagePicker.pickMultiImage(); final List<XFile>? selectedImages = await imagePicker.pickMultiImage();
AppSettings.preLoaderDialog(context); AppSettings.preLoaderDialog(context);
@ -68,7 +66,8 @@ class _FindingImagesState extends State<FindingImages> {
imageFileList.addAll(selectedImages); imageFileList.addAll(selectedImages);
} }
var res = await AppSettings.updateFindingsGallery(imageFileList,widget.recordId); var res =
await AppSettings.updateFindingsGallery(imageFileList, widget.recordId);
print(jsonDecode(res)); print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop(); Navigator.of(context, rootNavigator: true).pop();
setState(() { setState(() {
@ -82,7 +81,7 @@ class _FindingImagesState extends State<FindingImages> {
if (image == null) return; if (image == null) return;
final imageTemp = File(image.path); final imageTemp = File(image.path);
AppSettings.preLoaderDialog(context); AppSettings.preLoaderDialog(context);
var res = await AppSettings.updateFindingsCamera(image,widget.recordId); var res = await AppSettings.updateFindingsCamera(image, widget.recordId);
print(jsonDecode(res)); print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop(); Navigator.of(context, rootNavigator: true).pop();
setState(() { setState(() {
@ -93,231 +92,277 @@ class _FindingImagesState extends State<FindingImages> {
} }
} }
Widget renderUi() { Widget renderUi() {
if (widget.imageDetails.length != 0) {
if(widget.imageDetails.length!=0){ return Column(
return GridView.builder( crossAxisAlignment: CrossAxisAlignment.end,
itemCount:widget.imageDetails.length, children: [
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( Expanded(
crossAxisCount: 3, child: GridView.builder(
crossAxisSpacing: 2.0, itemCount: widget.imageDetails.length,
mainAxisSpacing: 2.0, gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
), crossAxisCount: 3,
itemBuilder: (BuildContext context, int index) { crossAxisSpacing: 2.0,
return GestureDetector( mainAxisSpacing: 2.0,
onTap: () { ),
itemBuilder: (BuildContext context, int index) {
Navigator.push( return GestureDetector(
context, onTap: () {
new MaterialPageRoute( Navigator.push(
builder: (__) => new ImageZoomPage(imageName:'Findings',imageDetails:widget.imageDetails[index]['url']))); context,
/*gridOntap(index);*/ new MaterialPageRoute(
}, builder: (__) => new ImageZoomPage(
child: Container( imageName: 'Findings',
width: MediaQuery.of(context).size.width * .30, imageDetails: widget.imageDetails[index]
height: MediaQuery.of(context).size.height * .15, ['url'])));
decoration: BoxDecoration( /*gridOntap(index);*/
shape: BoxShape.rectangle, },
image: DecorationImage( child: Container(
image: NetworkImage( width: MediaQuery.of(context).size.width * .30,
widget.imageDetails[index]['url']) height: MediaQuery.of(context).size.height * .15,
as ImageProvider, // picked file decoration: BoxDecoration(
fit: BoxFit.fill)), shape: BoxShape.rectangle,
child: Stack( image: DecorationImage(
children: [ image: NetworkImage(widget.imageDetails[index]['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
child: Stack(children: [
Positioned( Positioned(
right: 0, right: 0,
child: Container( child: Container(
child: IconButton( child: IconButton(
iconSize: 30, iconSize: 30,
icon: const Icon( icon: const Icon(
Icons.cancel, Icons.delete,
color: Colors.red, color: Colors.red,
), ),
onPressed: () async { onPressed: () async {
showDialog(
AppSettings.preLoaderDialog(context); barrierDismissible: false,
context: context,
String fileName = widget.imageDetails[index]['url'].split('/').last; builder: (BuildContext context) => AlertDialog(
title:
var payload = new Map<String, dynamic>(); const Text('Do you want to delete image?',
payload["urlType"] = 'findings'; style: TextStyle(
payload["url"] = widget.imageDetails[index]['url']; color: primaryColor,
fontSize: 20,
// bool deleteStatus = await AppSettings.deleteRecordsNew(payload,widget.recordId); )),
try{ actionsAlignment:
var res = await AppSettings.deleteRecordsNew(payload,widget.recordId); MainAxisAlignment.spaceBetween,
print(jsonDecode(res)); actions: [
Navigator.of(context, rootNavigator: true).pop(); TextButton(
AppSettings.longSuccessToast("Image deleted Successfully"); onPressed: () async {
setState(() { AppSettings.preLoaderDialog(context);
widget.imageDetails = jsonDecode(res)['remainingUrls'];
}); String fileName = widget
} .imageDetails[index]['url']
catch(e){ .split('/')
print(e); .last;
Navigator.of(context, rootNavigator: true).pop();
AppSettings.longFailedToast("Image deletion failed"); var payload = new Map<String, dynamic>();
} payload["urlType"] = 'findings';
payload["url"] =
widget.imageDetails[index]['url'];
// bool deleteStatus = await AppSettings.deleteRecordsNew(payload,widget.recordId);
try {
var res =
await AppSettings.deleteRecordsNew(
payload, widget.recordId);
print(jsonDecode(res));
Navigator.of(context,
rootNavigator: true)
.pop();
Navigator.of(context).pop(true);
AppSettings.longSuccessToast(
"Image deleted Successfully");
setState(() {
widget.imageDetails =
jsonDecode(res)['remainingUrls'];
});
} catch (e) {
print(e);
Navigator.of(context,
rootNavigator: true)
.pop();
Navigator.of(context).pop(true);
AppSettings.longFailedToast(
"Image deletion failed");
}
},
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,
)),
),
],
),
);
}, },
), ),
/* color: Colors.pinkAccent, /* color: Colors.pinkAccent,
width: 35, width: 35,
height: 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 findings'),
SizedBox(
height: 20,
), ),
CircleAvatar(
backgroundColor: primaryColor, //Image.network(widget.imageDetails[index]['url']),
radius: 40, );
child: IconButton( },
)),
Padding(
padding: EdgeInsets.fromLTRB(8, 8, 8, 8),
child: CircleAvatar(
backgroundColor: primaryColor,
radius: 40,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
IconButton(
iconSize: 40, iconSize: 40,
icon: const Icon( icon: const Icon(
Icons.add, Icons.add,
color: Colors.white, color: Colors.white,
), ),
onPressed: () async { onPressed: () async {
showModalBottomSheet<void>( showModalBottomSheet<void>(
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
return SizedBox( return SizedBox(
height: 200, height: 200,
child: Center( child: Center(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
GestureDetector( GestureDetector(
child: Icon( child: Icon(
Icons.camera_alt_outlined, Icons.camera_alt_outlined,
size: 100, size: 100,
color: primaryColor, color: primaryColor,
),
onTap: () async {
await takeImageFromCameraForUpdate();
Navigator.pop(context);
},
),
SizedBox(
width: MediaQuery.of(context).size.width *
.20,
), ),
GestureDetector( onTap: () async {
child: Icon( await takeImageFromCameraForUpdate();
Icons.photo, Navigator.pop(context);
size: 100, },
color: primaryColor, ),
), SizedBox(
onTap: () async { width: MediaQuery.of(context).size.width * .20,
await pickImageFromGalleryForUpdate(); ),
Navigator.pop(context); GestureDetector(
}, child: Icon(
Icons.photo,
size: 100,
color: primaryColor,
), ),
], onTap: () async {
), await pickImageFromGalleryForUpdate();
Navigator.pop(context);
},
),
],
), ),
); ),
}); );
}, });
},
), ),
) ],
], ),
), ),
) ),
],
); );
} 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 findings'),
SizedBox(
height: 20,
),
CircleAvatar(
backgroundColor: primaryColor,
radius: 40,
child: IconButton(
iconSize: 40,
icon: const Icon(
Icons.add,
color: Colors.white,
),
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 takeImageFromCameraForUpdate();
Navigator.pop(context);
},
),
SizedBox(
width:
MediaQuery.of(context).size.width * .20,
),
GestureDetector(
child: Icon(
Icons.photo,
size: 100,
color: primaryColor,
),
onTap: () async {
await pickImageFromGalleryForUpdate();
Navigator.pop(context);
},
),
],
),
),
);
});
},
),
)
],
),
));
} }
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppSettings.appBar('Findings'),
backgroundColor: primaryColor, body: Container(padding: EdgeInsets.all(12.0), child: renderUi()),
title: Text("Finding Images"),
actions: [
Visibility(
visible: widget.imageDetails.length>0,
child: IconButton(
iconSize: 30,
icon: Icon(
Icons.add_task,
color: Colors.white,
),
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 takeImageFromCameraForUpdate();
Navigator.pop(context);
},
),
SizedBox(
width: MediaQuery.of(context).size.width *
.20,
),
GestureDetector(
child: Icon(
Icons.photo,
size: 100,
color: primaryColor,
),
onTap: () async {
await pickImageFromGalleryForUpdate();
Navigator.pop(context);
},
),
],
),
),
);
});
},
),)
],
),
body:Container(
padding: EdgeInsets.all(12.0),
child: renderUi()),
); );
} }
} }

@ -4,7 +4,7 @@ import 'dart:io';
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/Reports/allreports.dart';
import 'package:healthcare_user/Reports/order_medicines_new.dart'; import 'package:healthcare_user/trash/order_medicines_new.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/common/zoom_image.dart';
import 'package:healthcare_user/prescriptions/oreder_medicines.dart'; import 'package:healthcare_user/prescriptions/oreder_medicines.dart';
@ -15,8 +15,9 @@ class PrescriptionImages extends StatefulWidget {
var imageDetails; var imageDetails;
var recordId; var recordId;
var familyDetails; var familyDetails;
var details;
PrescriptionImages({this.imageDetails, this.recordId,this.familyDetails}); PrescriptionImages({this.imageDetails, this.recordId,this.familyDetails,this.details});
@override @override
State<PrescriptionImages> createState() => _PrescriptionImagesState(); State<PrescriptionImages> createState() => _PrescriptionImagesState();
@ -98,6 +99,7 @@ class _PrescriptionImagesState extends State<PrescriptionImages> {
Widget renderUi() { Widget renderUi() {
if (widget.imageDetails.length != 0) { if (widget.imageDetails.length != 0) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Expanded( Expanded(
child: GridView.builder( child: GridView.builder(
@ -136,35 +138,72 @@ class _PrescriptionImagesState extends State<PrescriptionImages> {
child: IconButton( child: IconButton(
iconSize: 30, iconSize: 30,
icon: const Icon( icon: const Icon(
Icons.cancel, Icons.delete,
color: Colors.red, color: Colors.red,
), ),
onPressed: () async { onPressed: () async {
AppSettings.preLoaderDialog(context); showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) => AlertDialog(
title:
const Text('Do you want to delete image?',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
actionsAlignment:
MainAxisAlignment.spaceBetween,
actions: [
TextButton(
onPressed: () async {
AppSettings.preLoaderDialog(context);
String fileName = widget.imageDetails[index] String fileName = widget.imageDetails[index]
['url'] ['url']
.split('/') .split('/')
.last; .last;
var payload = new Map<String, dynamic>(); var payload = new Map<String, dynamic>();
payload["urlType"] = 'prescription'; payload["urlType"] = 'prescription';
payload["url"] = widget.imageDetails[index]['url']; payload["url"] = widget.imageDetails[index]['url'];
try{ try{
var res = await AppSettings.deleteRecordsNew(payload,widget.recordId); var res = await AppSettings.deleteRecordsNew(payload,widget.recordId);
print(jsonDecode(res)); print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop(); Navigator.of(context, rootNavigator: true).pop();
AppSettings.longSuccessToast("Image deleted Successfully"); Navigator.of(context).pop(true);
setState(() { AppSettings.longSuccessToast("Image deleted Successfully");
widget.imageDetails = jsonDecode(res)['remainingUrls']; setState(() {
}); widget.imageDetails = jsonDecode(res)['remainingUrls'];
} });
catch(e){ }
print(e); catch(e){
Navigator.of(context, rootNavigator: true).pop(); print(e);
AppSettings.longFailedToast("Image deletion failed"); Navigator.of(context, rootNavigator: true).pop();
} Navigator.of(context).pop(true);
AppSettings.longFailedToast("Image deletion failed");
}
},
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,
)),
),
],
),
);
}, },
), ),
), ),
@ -177,21 +216,97 @@ class _PrescriptionImagesState extends State<PrescriptionImages> {
}, },
), ),
), ),
TextButton( Padding(
child: const Text( padding: EdgeInsets.fromLTRB(8, 8, 8, 8),
'Order Medicines', child: CircleAvatar(
style: TextStyle(color: primaryColor), backgroundColor: primaryColor,
radius: 40,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
IconButton(
iconSize: 40,
icon: const Icon(
Icons.shopping_cart,
color: Colors.white,
),
onPressed: () {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new OrderMedicines(prescriptionDetails:widget.details)));
//signup screen
},
),
],
),
), ),
onPressed: () { ),
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 {
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 takeImageFromCameraForUpdate();
Navigator.pop(context);
},
),
SizedBox(
width: MediaQuery.of(context).size.width *
.20,
),
GestureDetector(
child: Icon(
Icons.photo,
size: 100,
color: primaryColor,
),
onTap: () async {
await pickImageFromGalleryForUpdate();
Navigator.pop(context);
},
),
],
),
),
);
});
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new OrderMedicinesPrescriptions(prescriptionDetails:widget.imageDetails,familyDetails: widget.familyDetails,)));
//signup screen
},
)
},
),
],
),
),
),
], ],
); );
} else { } else {
@ -270,67 +385,7 @@ class _PrescriptionImagesState extends State<PrescriptionImages> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar:AppSettings.appBar('Prescriptions'),
backgroundColor: primaryColor,
title: Text("Prescriptions"),
actions: [
Visibility(
visible: widget.imageDetails.length > 0,
child: IconButton(
iconSize: 30,
icon: Icon(
Icons.add_task,
color: Colors.white,
),
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 takeImageFromCameraForUpdate();
Navigator.pop(context);
},
),
SizedBox(
width: MediaQuery.of(context).size.width *
.20,
),
GestureDetector(
child: Icon(
Icons.photo,
size: 100,
color: primaryColor,
),
onTap: () async {
await pickImageFromGalleryForUpdate();
Navigator.pop(context);
},
),
],
),
),
);
});
},
),
)
],
),
body: Container(padding: EdgeInsets.all(12.0), child: renderUi()), body: Container(padding: EdgeInsets.all(12.0), child: renderUi()),
); );
} }

@ -93,80 +93,186 @@ class _ReportImagesState extends State<ReportImages> {
Widget renderUi() { Widget renderUi() {
if(widget.imageDetails.length!=0){ if(widget.imageDetails.length!=0){
return GridView.builder( return Column(
itemCount: widget.imageDetails.length, crossAxisAlignment: CrossAxisAlignment.end,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( children: [
crossAxisCount: 3, Expanded(child: GridView.builder(
crossAxisSpacing: 2.0, itemCount: widget.imageDetails.length,
mainAxisSpacing: 2.0, gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
), crossAxisCount: 3,
itemBuilder: (BuildContext context, int index) { crossAxisSpacing: 2.0,
return GestureDetector( mainAxisSpacing: 2.0,
onTap: () { ),
Navigator.push( itemBuilder: (BuildContext context, int index) {
context, return GestureDetector(
new MaterialPageRoute( onTap: () {
builder: (__) => new ImageZoomPage( Navigator.push(
imageName: 'Findings', context,
imageDetails: widget.imageDetails[index]['url']))); new MaterialPageRoute(
/*gridOntap(index);*/ builder: (__) => new ImageZoomPage(
}, imageName: 'Findings',
child: Container( imageDetails: widget.imageDetails[index]['url'])));
width: MediaQuery.of(context).size.width * .30, /*gridOntap(index);*/
height: MediaQuery.of(context).size.height * .15, },
decoration: BoxDecoration( child: Container(
shape: BoxShape.rectangle, width: MediaQuery.of(context).size.width * .30,
image: DecorationImage( height: MediaQuery.of(context).size.height * .15,
image: NetworkImage(widget.imageDetails[index]['url']) decoration: BoxDecoration(
as ImageProvider, // picked file shape: BoxShape.rectangle,
fit: BoxFit.fill)), image: DecorationImage(
child: Stack(children: [ image: NetworkImage(widget.imageDetails[index]['url'])
Positioned( as ImageProvider, // picked file
right: 0, fit: BoxFit.fill)),
child: Container( child: Stack(children: [
child: IconButton( Positioned(
iconSize: 30, right: 0,
icon: const Icon( child: Container(
Icons.cancel, child: IconButton(
color: Colors.red, iconSize: 30,
), icon: const Icon(
onPressed: () async { Icons.delete,
color: Colors.red,
),
AppSettings.preLoaderDialog(context); onPressed: () async {
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) => AlertDialog(
title:
const Text('Do you want to delete image?',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
actionsAlignment:
MainAxisAlignment.spaceBetween,
actions: [
TextButton(
onPressed: () async {
AppSettings.preLoaderDialog(context);
String fileName = widget.imageDetails[index]['url'].split('/').last; String fileName = widget.imageDetails[index]['url'].split('/').last;
var payload = new Map<String, dynamic>(); var payload = new Map<String, dynamic>();
payload["urlType"] = 'reports'; payload["urlType"] = 'reports';
payload["url"] = widget.imageDetails[index]['url']; payload["url"] = widget.imageDetails[index]['url'];
try{ try{
var res = await AppSettings.deleteRecordsNew(payload,widget.recordId); var res = await AppSettings.deleteRecordsNew(payload,widget.recordId);
print(jsonDecode(res)); print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop(); Navigator.of(context, rootNavigator: true).pop();
AppSettings.longSuccessToast("Image deleted Successfully"); Navigator.of(context).pop(true);
setState(() { AppSettings.longSuccessToast("Image deleted Successfully");
widget.imageDetails = jsonDecode(res)['remainingUrls']; setState(() {
}); widget.imageDetails = jsonDecode(res)['remainingUrls'];
} });
catch(e){ }
print(e); catch(e){
Navigator.of(context, rootNavigator: true).pop(); print(e);
AppSettings.longFailedToast("Image deletion failed"); Navigator.of(context, rootNavigator: true).pop();
} Navigator.of(context).pop(true);
}, AppSettings.longFailedToast("Image deletion failed");
), }
/* color: Colors.pinkAccent, },
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,
)),
),
],
),
);
},
),
/* color: Colors.pinkAccent,
width: 35, width: 35,
height: 35,*/ height: 35,*/
),
)
]),
),
//Image.network(widget.imageDetails[index]['url']),
);
},
)),
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 {
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 takeImageFromCameraForUpdate();
Navigator.pop(context);
},
),
SizedBox(
width: MediaQuery.of(context).size.width *
.20,
),
GestureDetector(
child: Icon(
Icons.photo,
size: 100,
color: primaryColor,
),
onTap: () async {
await pickImageFromGalleryForUpdate();
Navigator.pop(context);
},
),
],
),
),
);
});
},
), ),
) ],
]), ),
), ),
),
//Image.network(widget.imageDetails[index]['url']), ],
);
},
); );
} }
else{ else{
@ -245,66 +351,7 @@ class _ReportImagesState extends State<ReportImages> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar:AppBar( appBar:AppSettings.appBar('Repoprt Images'),
backgroundColor: primaryColor,
title: Text("Report Images"),
actions: [
Visibility(
visible: widget.imageDetails.length>0,
child: IconButton(
iconSize: 30,
icon: Icon(
Icons.add_task,
color: Colors.white,
),
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 takeImageFromCameraForUpdate();
Navigator.pop(context);
},
),
SizedBox(
width: MediaQuery.of(context).size.width *
.20,
),
GestureDetector(
child: Icon(
Icons.photo,
size: 100,
color: primaryColor,
),
onTap: () async {
await pickImageFromGalleryForUpdate();
Navigator.pop(context);
},
),
],
),
),
);
});
},
),)
],
),
body: Container(padding: EdgeInsets.all(12.0), child: renderUi()), body: Container(padding: EdgeInsets.all(12.0), child: renderUi()),
); );
} }

File diff suppressed because it is too large Load Diff

@ -5,7 +5,7 @@ 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';
import 'package:healthcare_user/invitations.dart'; import 'package:healthcare_user/invitations/invitations.dart';
import 'package:healthcare_user/medicines.dart'; import 'package:healthcare_user/medicines.dart';
import 'package:healthcare_user/my_health.dart'; import 'package:healthcare_user/my_health.dart';
import 'package:healthcare_user/my_medicine_timings.dart'; import 'package:healthcare_user/my_medicine_timings.dart';
@ -14,6 +14,7 @@ import 'package:healthcare_user/report_my_self.dart';
import 'package:healthcare_user/Reports/add_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:healthcare_user/updates/update_location.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import 'package:carousel_slider/carousel_slider.dart'; import 'package:carousel_slider/carousel_slider.dart';
import 'dart:ui' as ui; import 'dart:ui' as ui;
@ -280,7 +281,7 @@ class _DashboardState extends State<Dashboard> {
}, },
), ),
Text( Text(
'Reports', 'Records',
style: dashboardTextStyle(), style: dashboardTextStyle(),
), ),
], ],
@ -895,7 +896,13 @@ class _DashboardState extends State<Dashboard> {
style: drawerListItemsTextStyle()), style: drawerListItemsTextStyle()),
], ],
), ),
onTap: () {}, onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const UpdateMyLocation()),
);
},
), ),
Divider( Divider(
color: Colors.grey, color: Colors.grey,

@ -8,7 +8,6 @@ import 'package:http/http.dart' as http;
import 'package:http/http.dart'; import 'package:http/http.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
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';
@ -35,6 +34,10 @@ TextStyle labelTextStyle() {
return TextStyle(color: primaryColor, fontSize: 12); return TextStyle(color: primaryColor, fontSize: 12);
} }
TextStyle labelTextStyleOrderMedicine() {
return TextStyle(color: primaryColor, fontSize: 12,fontWeight: FontWeight.bold);
}
TextStyle haveMotorTextStyle() { TextStyle haveMotorTextStyle() {
return TextStyle( return TextStyle(
color: Colors.red, fontSize: 12, fontWeight: FontWeight.bold); color: Colors.red, fontSize: 12, fontWeight: FontWeight.bold);
@ -44,6 +47,10 @@ TextStyle textButtonStyle() {
return TextStyle(color: primaryColor, fontSize: 15); return TextStyle(color: primaryColor, fontSize: 15);
} }
TextStyle textButtonStyleReports() {
return TextStyle(color: Colors.white, fontSize: 12);
}
TextStyle iconBelowTextStyle() { TextStyle iconBelowTextStyle() {
return TextStyle(fontSize: 10, color: primaryColor); return TextStyle(fontSize: 10, color: primaryColor);
} }
@ -55,6 +62,13 @@ TextStyle valuesTextStyle() {
); );
} }
TextStyle recordDetailsHeading() {
return TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
);
}
TextStyle problemTextStyle() { TextStyle problemTextStyle() {
return TextStyle( return TextStyle(
fontSize: 12, fontSize: 12,
@ -133,7 +147,6 @@ TextStyle wrapTextStyleBlack() {
TextStyle withoutWrapTextStyle() { TextStyle withoutWrapTextStyle() {
return TextStyle( return TextStyle(
color: primaryColor,
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
); );
@ -230,6 +243,7 @@ class AppSettings {
static String sugarCaluculateUrl = host + 'insertSugar'; static String sugarCaluculateUrl = host + 'insertSugar';
static String profilePicUrl = host + 'users/profile-picture'; static String profilePicUrl = host + 'users/profile-picture';
static String updateProfileUrl = host + 'update/currentUser'; static String updateProfileUrl = host + 'update/currentUser';
static String updateLocationUrl = host + 'updateLocation';
static String uploadPicUrl = host + 'uploads'; static String uploadPicUrl = host + 'uploads';
static String getBmiHistoryUrl = host + 'usersbmi'; static String getBmiHistoryUrl = host + 'usersbmi';
static String getBpHistoryUrl = host + 'usersbp'; static String getBpHistoryUrl = host + 'usersbp';
@ -237,6 +251,9 @@ 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 findingsUploadPicUrl = host + 'uploads-findings-prescription'; static String findingsUploadPicUrl = host + 'uploads-findings-prescription';
static String addFindingsUrl = host + 'update-uploads-findingsPictureId-prescription';
static String addReportsUrl = host + 'update-uploads-reportsPictureId-prescription';
static String addPrescriptionsUrl = host + 'update-uploads-prescriptionPictureId-prescription';
static String updateFindingsUploadPicUrl = host + 'update-uploads-findings-prescription'; static String updateFindingsUploadPicUrl = host + 'update-uploads-findings-prescription';
static String updateReportsUploadPicUrl = host + 'update-uploads-reports-prescription'; static String updateReportsUploadPicUrl = host + 'update-uploads-reports-prescription';
static String reportsUploadPicUrl = host + 'uploads-reports-prescription'; static String reportsUploadPicUrl = host + 'uploads-reports-prescription';
@ -248,14 +265,15 @@ class AppSettings {
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 addRecordsUrl = host + 'add-record';
static String updateRecordsUrl = host + 'records';
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 getAllPrescriptionsDataUrl = host + 'getAllPrescriptionDetails';
static String getRecordsDataUrl = host + 'getAllRecords'; static String getRecordsDataUrl = host + 'getAllRecords';
static String deleteRecordUrl = host + 'deleteRecord'; static String deleteRecordUrl = host + 'deleteRecord';
static String deleteFindingsUrl = host + 'uploads-findings-prescription'; static String deleteFindingsUrl = host + 'delete-uploads-findings';
static String deletePrescriptionsUrl = host + 'uploads-prescription-prescription'; static String deletePrescriptionsUrl = host + 'delete-prescription';
static String deleteReportsUrl = host + 'uploads-reports-prescription'; static String deleteReportsUrl = host + 'delete-report';
static String deleteRecordsUrl = host + 'delete-url'; static String deleteRecordsUrl = host + 'delete-url';
@ -620,6 +638,25 @@ class AppSettings {
} }
} }
static Future<bool> updateLocation(payload) async {
var uri = Uri.parse(updateLocationUrl + '/' + customerId);
try {
var response = await http.put(uri,
body: json.encode(payload), headers: await buildRequestHeaders());
if (response.statusCode == 200) {
var _response = json.decode(response.body);
return true;
} else {
return false;
}
} catch (e) {
print(e);
return false;
}
}
static Future<String> getBmiHistory() async { static Future<String> getBmiHistory() async {
var uri = Uri.parse(getBmiHistoryUrl + '/' + customerId); var uri = Uri.parse(getBmiHistoryUrl + '/' + customerId);
@ -748,6 +785,28 @@ class AppSettings {
return response.body; return response.body;
} }
static Future<String> addFindingsGallery(file,pictureId) async {
var request = http.MultipartRequest(
'PUT', Uri.parse(addFindingsUrl + '/' + customerId+"/"+pictureId));
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> addFindingsCamera(file,pictureId) async {
var request = http.MultipartRequest('PUT', Uri.parse(addFindingsUrl + '/' + customerId+"/"+pictureId));
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> updateFindingsGallery(file,var recordId) async { static Future<String> updateFindingsGallery(file,var recordId) async {
var request = http.MultipartRequest( var request = http.MultipartRequest(
@ -797,6 +856,28 @@ class AppSettings {
return response.body; return response.body;
} }
static Future<String> addReportsGallery(file,pictureId) async {
var request = http.MultipartRequest(
'PUT', Uri.parse(addReportsUrl + '/' + customerId+"/"+pictureId));
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> addReportsCamera(file,pictureId) async {
var request = http.MultipartRequest('PUT', Uri.parse(addReportsUrl + '/' + customerId+"/"+pictureId));
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> updateReportsGallery(file,var recordId) async { static Future<String> updateReportsGallery(file,var recordId) async {
var request = http.MultipartRequest( var request = http.MultipartRequest(
@ -846,6 +927,28 @@ class AppSettings {
return response.body; return response.body;
} }
static Future<String> addPrescriptionsGallery(file,pictureId) async {
var request = http.MultipartRequest(
'PUT', Uri.parse(addPrescriptionsUrl + '/' + customerId+"/"+pictureId));
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> addPrescriptionsCamera(file,pictureId) async {
var request = http.MultipartRequest('PUT', Uri.parse(addPrescriptionsUrl + '/' + customerId+"/"+pictureId));
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> updatePrescriptionsGallery(file,var recordId) async { static Future<String> updatePrescriptionsGallery(file,var recordId) async {
var request = http.MultipartRequest( var request = http.MultipartRequest(
@ -1107,6 +1210,38 @@ class AppSettings {
} }
} }
static Future<bool> updateRecord(payload,recordId) async {
var uri = Uri.parse(updateRecordsUrl + '/' + recordId);
var response = await http.put(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.put(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');
@ -1187,8 +1322,8 @@ class AppSettings {
} }
static Future<String> deleteFindings(fileName) async { static Future<String> deleteFindings(fileName,findingsId) async {
var uri = Uri.parse(deleteFindingsUrl + '/' + customerId+'/'+fileName); var uri = Uri.parse(deleteFindingsUrl + '/' + customerId+'/'+findingsId+'/'+fileName);
try { try {
var response = await http.delete(uri, headers: await buildRequestHeaders()); var response = await http.delete(uri, headers: await buildRequestHeaders());
@ -1216,8 +1351,8 @@ class AppSettings {
} }
} }
static Future<String> deletePrescriptions(fileName) async { static Future<String> deletePrescriptions(fileName,prescriptionId) async {
var uri = Uri.parse(deletePrescriptionsUrl + '/' + customerId+'/'+fileName); var uri = Uri.parse(deletePrescriptionsUrl + '/' + customerId+'/'+prescriptionId+'/'+fileName);
try { try {
var response = await http.delete(uri, headers: await buildRequestHeaders()); var response = await http.delete(uri, headers: await buildRequestHeaders());
@ -1245,8 +1380,8 @@ class AppSettings {
} }
} }
static Future<String> deleteReports(fileName) async { static Future<String> deleteReports(fileName,reportsId) async {
var uri = Uri.parse(deleteReportsUrl + '/' + customerId+'/'+fileName); var uri = Uri.parse(deleteReportsUrl + '/' + customerId+'/'+reportsId+'/'+fileName);
try { try {
var response = await http.delete(uri, headers: await buildRequestHeaders()); var response = await http.delete(uri, headers: await buildRequestHeaders());
@ -1418,20 +1553,6 @@ class AppSettings {
gender = await getData('gender', 'STRING'); gender = await getData('gender', 'STRING');
} }
static void longFailedStyledToast(String message, context) {
showToast(
message,
context: context,
animation: StyledToastAnimation.scale,
reverseAnimation: StyledToastAnimation.fade,
position: StyledToastPosition.bottom,
animDuration: Duration(seconds: 1),
duration: Duration(seconds: 6),
curve: Curves.elasticOut,
reverseCurve: Curves.linear,
backgroundColor: Colors.red,
);
}
static void longSuccessToast(String message) { static void longSuccessToast(String message) {
Fluttertoast.showToast( Fluttertoast.showToast(

@ -1,19 +0,0 @@
import 'package:flutter/material.dart';
import 'package:healthcare_user/common/settings.dart';
class Invitations extends StatefulWidget {
const Invitations({Key? key}) : super(key: key);
@override
State<Invitations> createState() => _InvitationsState();
}
class _InvitationsState extends State<Invitations> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar('Invitations'),
body: Container(),
);
}
}

@ -0,0 +1,74 @@
import 'package:flutter/material.dart';
import 'package:healthcare_user/common/settings.dart';
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
class Invitations extends StatefulWidget {
const Invitations({Key? key}) : super(key: key);
@override
State<Invitations> createState() => _InvitationsState();
}
class _InvitationsState extends State<Invitations> {
TextEditingController mobileNumberController = TextEditingController();
TextEditingController nameController = TextEditingController();
final FlutterContactPicker _contactPicker = new FlutterContactPicker();
Contact? _contact;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar('Invitations'),
body: GestureDetector(
onTap: () {
FocusManager.instance.primaryFocus?.unfocus();
},
child: SafeArea(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(10),
child: Column(
children: [
Container(
child: TextFormField(
cursorColor: greyColor,
controller: nameController,
decoration: textFormFieldDecoration(Icons.phone,'Enter Name'),
),
),
SizedBox(height:MediaQuery.of(context).size.height * .02,),
Container(
child: TextFormField(
cursorColor: greyColor,
controller: mobileNumberController,
keyboardType: TextInputType.number,
decoration: textFormFieldDecoration(Icons.phone,'Enter MobileNumber'),
),
),
SizedBox(height:MediaQuery.of(context).size.height * .02,),
Container(
child: Text('Or',style: TextStyle(color: primaryColor,fontWeight: FontWeight.bold,fontSize: 20),),
),
SizedBox(height:MediaQuery.of(context).size.height * .02,),
TextButton(
child: const Text(
'Select from contacts',
style: TextStyle(decoration: TextDecoration.underline,color: primaryColor,fontSize: 20),
),
onPressed: () async{
Contact? contact = await _contactPicker.selectContact();
setState(() {
_contact = contact;
});
},
)
],
)
)))));
}
}

File diff suppressed because it is too large Load Diff

@ -3,6 +3,7 @@ import 'dart:io';
import 'package:flutter/material.dart'; 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/Reports/add_reports.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/common/zoom_image.dart';
import 'package:healthcare_user/models/pharmacies_model.dart'; import 'package:healthcare_user/models/pharmacies_model.dart';
@ -12,6 +13,7 @@ import 'package:healthcare_user/prescriptions/oreder_medicines.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import 'package:photo_view/photo_view.dart'; import 'package:photo_view/photo_view.dart';
import 'package:healthcare_user/models/prescriptions_model.dart'; import 'package:healthcare_user/models/prescriptions_model.dart';
import 'package:intl/intl.dart';
class Prescriptions extends StatefulWidget { class Prescriptions extends StatefulWidget {
const Prescriptions({Key? key}) : super(key: key); const Prescriptions({Key? key}) : super(key: key);
@ -38,6 +40,17 @@ class _PrescriptionsState extends State<Prescriptions> {
var AreaItems = ['2', '5', '10', '25', '50', '100']; var AreaItems = ['2', '5', '10', '25', '50', '100'];
List pharmaciesCheckboxes = []; List pharmaciesCheckboxes = [];
bool isLoading=false; bool isLoading=false;
final ImagePicker imagePicker = ImagePicker();
List imageFileList = [];
List uiPrescriptionImages = [];
TextEditingController searchController = TextEditingController();
TextEditingController dateInput = TextEditingController();
String dropdownSearchType = 'Problem';
var typeOfSearchItems = [
'Problem',
'Doctor',
'Date',
];
Future<void> getAllPharmaciesData(var distance) async { Future<void> getAllPharmaciesData(var distance) async {
isPharmacyDataLoading=true; isPharmacyDataLoading=true;
@ -125,6 +138,81 @@ class _PrescriptionsState extends State<Prescriptions> {
} }
} }
Future<void> getRecordsByProblemName(var problem) 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();
reportsList= reportsListOriginal.where(
(x) => x.problem.toString().toLowerCase().contains(problem.toString().toLowerCase())
).toList();
isPrescriptionsDataLoading = false;
});
} catch (e) {
setState(() {
isPrescriptionsDataLoading = false;
isSereverIssue = true;
});
}
}
Future<void> getRecordsByDoctorName(var doctor) 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();
reportsList= reportsListOriginal.where(
(x) => x.doctorName.toString().toLowerCase().contains(doctor.toString().toLowerCase())
).toList();
isPrescriptionsDataLoading = false;
});
} catch (e) {
setState(() {
isPrescriptionsDataLoading = false;
isSereverIssue = true;
});
}
}
Future<void> getRecordsByDate(var date) 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();
reportsList= reportsListOriginal.where(
(x) => x.date.toString().toLowerCase().contains(date.toString().toLowerCase())
).toList();
isPrescriptionsDataLoading = false;
});
} catch (e) {
setState(() {
isPrescriptionsDataLoading = false;
isSereverIssue = true;
});
}
}
@override @override
void initState() { void initState() {
lat = AppSettings.userLatitude; lat = AppSettings.userLatitude;
@ -170,6 +258,37 @@ class _PrescriptionsState extends State<Prescriptions> {
} }
} }
Future pickImageFromGalleryForUpdate(var recordId) async {
imageFileList = [];
final List<XFile>? selectedImages = await imagePicker.pickMultiImage();
AppSettings.preLoaderDialog(context);
if (selectedImages!.isNotEmpty) {
imageFileList.addAll(selectedImages);
}
var res = await AppSettings.updatePrescriptionsGallery(imageFileList,recordId);
print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop();
getAllRecords();
}
Future takeImageFromCameraForUpdate(var recordId) 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.updatePrescriptionsCamera(image,recordId);
print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop();
getAllRecords();
} on PlatformException catch (e) {
print('Failed to pick image: $e');
}
}
Widget _pharamciesData() { Widget _pharamciesData() {
if (FilteredList.length != 0) { if (FilteredList.length != 0) {
return Column( return Column(
@ -468,50 +587,254 @@ class _PrescriptionsState extends State<Prescriptions> {
} }
Widget prescriptions(var obj){ Widget prescriptions(var obj){
if(obj.prescriptionImages.length!=0){
return Container(
//color: secondaryColor,
width: double.infinity,
height: MediaQuery.of(context).size.height * .20,
child: Row(
children: [
Expanded(child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: obj.prescriptionImages.length,
itemBuilder: (context, index) {
return Row(
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)),
child: Stack(children: [
Positioned(
right: 0,
child: Container(
child: IconButton(
iconSize: 30,
icon: const Icon(
Icons.delete,
color: Colors.red,
),
onPressed: () async {
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) => AlertDialog(
title:
const Text('Do you want to delete image?',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
actionsAlignment:
MainAxisAlignment.spaceBetween,
actions: [
TextButton(
onPressed: () async {
AppSettings.preLoaderDialog(context);
return Container( String fileName = obj.prescriptionImages[index]['url']
width: double.infinity, .split('/')
height: MediaQuery.of(context).size.height * .20, .last;
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'])));
var payload =
new Map<String, dynamic>();
payload["urlType"] = 'prescription';
payload["url"] = obj.prescriptionImages[index]['url'];
try {
var res = await AppSettings
.deleteRecordsNew(
payload,
obj.recordId);
print(jsonDecode(res));
Navigator.of(context,
rootNavigator: true)
.pop();
Navigator.of(context).pop(true);
AppSettings.longSuccessToast(
"Image deleted Successfully");
setState(() {
obj.prescriptionImages =
jsonDecode(
res)['remainingUrls'];
});
} catch (e) {
print(e);
Navigator.of(context,
rootNavigator: true)
.pop();
Navigator.of(context).pop(true);
AppSettings.longFailedToast(
"Image deletion failed");
}
},
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,
)),
),
],
),
);
},
),
),
)
]),
),
),
)
],
);
}),),
IconButton(
iconSize: 40,
icon: const Icon(
Icons.add,
color: Colors.green,
),
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 takeImageFromCameraForUpdate(obj.recordId);
Navigator.pop(context);
},
),
SizedBox(
width: MediaQuery.of(context).size.width *
.20,
),
GestureDetector(
child: Icon(
Icons.photo,
size: 100,
color: primaryColor,
),
onTap: () async {
await pickImageFromGalleryForUpdate(obj.recordId);
Navigator.pop(context);
},
),
],
),
),
);
});
},
)
],
)
);
}
else{
return Row(
children: [
IconButton(
iconSize: 40,
icon: const Icon(
Icons.add,
color: Colors.green,
),
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 takeImageFromCameraForUpdate(obj.recordId);
Navigator.pop(context);
},
),
SizedBox(
width: MediaQuery.of(context).size.width *
.20,
),
GestureDetector(
child: Icon(
Icons.photo,
size: 100,
color: primaryColor,
),
onTap: () async {
await pickImageFromGalleryForUpdate(obj.recordId);
Navigator.pop(context);
},
),
],
),
),
);
});
},
),
Text('Add Prescriptions',style: textButtonStyle(),)
],
);
}
},
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)),
),
),
),
],
);
}),
);
} }
Widget _allPrescriptions(){ Widget _filtereddata(){
if (reportsList.length != 0) { if (reportsList.length != 0) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
@ -521,7 +844,7 @@ class _PrescriptionsState extends State<Prescriptions> {
itemCount: reportsList.length, itemCount: reportsList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return Visibility( return Visibility(
visible: reportsList[index].prescriptionImages.length!=0, visible: true,
child: Card( child: Card(
//color: prescriptionsList[index].cardColor, //color: prescriptionsList[index].cardColor,
@ -567,19 +890,27 @@ class _PrescriptionsState extends State<Prescriptions> {
SizedBox(height:MediaQuery.of(context).size.height * .02,), SizedBox(height:MediaQuery.of(context).size.height * .02,),
prescriptions(reportsList[index]), prescriptions(reportsList[index]),
TextButton( Row(
child: const Text( mainAxisAlignment: MainAxisAlignment.start,
'Order Medicines', children: [
style: TextStyle(color: primaryColor), Icon(
), Icons.shopping_cart,
onPressed: () { color: primaryColor,
),
Navigator.push( TextButton(
context, child: Text(
new MaterialPageRoute( 'Order Medicines / Other Products',
builder: (__) => new OrderMedicines(prescriptionDetails:reportsList[index]))); style: textButtonStyle(),
//signup screen ),
}, onPressed: () {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new OrderMedicines(prescriptionDetails:reportsList[index])));
//signup screen
},
)],
) )
], ],
), ),
@ -587,6 +918,350 @@ class _PrescriptionsState extends State<Prescriptions> {
)); ));
}) ), }) ),
]); ]);
}
else{
return Padding(padding: EdgeInsets.fromLTRB(60,10,60,10),
child: Column(
children: [
Text('No prescriptions found related to your search'),
SizedBox(
height: 20,
),
CircleAvatar(
backgroundColor: Colors.red,
radius: 30,
child: const Icon(
Icons.info,
color: Colors.white,
),
)
],
),);
}
}
Widget _allPrescriptions(){
if(reportsListOriginal.length!=0){
return Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
padding: const EdgeInsets.fromLTRB(10, 10, 10, 0),
child: DropdownButtonFormField(
// Initial Value
value: dropdownSearchType,
isExpanded: true,
decoration: const InputDecoration(
prefixIcon: Icon(
Icons.search,
color: greyColor,
),
border: OutlineInputBorder(
borderSide: BorderSide(color: greyColor)),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: greyColor),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: greyColor),
),
labelText: 'Search By',
labelStyle: TextStyle(
color: greyColor, //<-- SEE HERE
),
),
hint: Text('Select Search Type'),
// Down Arrow Icon
icon: const Icon(Icons.keyboard_arrow_down),
// Array list of items
items: typeOfSearchItems.map((String items) {
return DropdownMenuItem(
value: items,
child: Text(items),
);
}).toList(),
// After selecting the desired option,it will
// change button value to selected value
onChanged: (String? newValue) {
setState(() {
dropdownSearchType = newValue!;
});
},
),
),
Visibility(
visible:dropdownSearchType.toString().toLowerCase()=='problem' ,
child: Container(
height: MediaQuery.of(context).size.height * .07,
padding: EdgeInsets.all(5),
child: Center(child: TextField(
cursorColor: primaryColor,
controller: searchController,
onChanged: (string) {
if(string.length>=1){
getRecordsByProblemName(string);
}
else{
getAllRecords();
}
},
decoration: InputDecoration(
prefixIcon: Icon(
Icons.search,
color: primaryColor,
),
/*suffixIcon: Icon(
Icons.clear,
color: greyColor,
),*/
suffixIcon: searchController.text!=''?IconButton(
icon: Icon(
Icons.clear,
color: Colors.red,
),
onPressed: () {
setState(() {
searchController.text='';
});
getAllRecords();
},
):IconButton(
icon: Icon(
Icons.clear,
color: Colors.transparent,
),
onPressed: () {
},
),
border: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor),
borderRadius: BorderRadius.circular(30),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor),
borderRadius: BorderRadius.circular(30),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor),
borderRadius: BorderRadius.circular(30),
),
//labelText: 'Search by phone number',
hintText: 'Search by problem',
labelStyle: TextStyle(
color: greyColor, //<-- SEE HERE
),
),
),)
),),
Visibility(
visible:dropdownSearchType.toString().toLowerCase()=='doctor' ,
child: Container(
height: MediaQuery.of(context).size.height * .07,
padding: EdgeInsets.all(5),
child: Center(child: TextField(
cursorColor: primaryColor,
controller: searchController,
onChanged: (string) {
if(string.length>=1){
getRecordsByDoctorName(string);
}
else{
getAllRecords();
}
},
decoration: InputDecoration(
prefixIcon: Icon(
Icons.search,
color: primaryColor,
),
/*suffixIcon: Icon(
Icons.clear,
color: greyColor,
),*/
suffixIcon: searchController.text!=''?IconButton(
icon: Icon(
Icons.clear,
color: Colors.red,
),
onPressed: () {
setState(() {
searchController.text='';
});
getAllRecords();
},
):IconButton(
icon: Icon(
Icons.clear,
color: Colors.transparent,
),
onPressed: () {
},
),
border: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor),
borderRadius: BorderRadius.circular(30),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor),
borderRadius: BorderRadius.circular(30),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor),
borderRadius: BorderRadius.circular(30),
),
//labelText: 'Search by phone number',
hintText: 'Search by doctor',
labelStyle: TextStyle(
color: greyColor, //<-- SEE HERE
),
),
),)
),),
Visibility(
visible:dropdownSearchType.toString().toLowerCase()=='date' ,
child: Container(
height: MediaQuery.of(context).size.height * .07,
padding: EdgeInsets.all(5),
child: Center(child: TextField(
cursorColor: primaryColor,
controller: searchController,
onChanged: (string) {
if(string.length>=1){
getRecordsByDate(string);
}
else{
getAllRecords();
}
},
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(() {
searchController.text = formattedDate; //set output date to TextField value.
});
getRecordsByDate(searchController.text);
} else {}
},
decoration: InputDecoration(
prefixIcon: Icon(
Icons.search,
color: primaryColor,
),
suffixIcon: searchController.text!=''?IconButton(
icon: Icon(
Icons.clear,
color: Colors.red,
),
onPressed: () {
setState(() {
searchController.text='';
});
getAllRecords();
},
):IconButton(
icon: Icon(
Icons.clear,
color: Colors.transparent,
),
onPressed: () {
},
),
border: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor),
borderRadius: BorderRadius.circular(30),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor),
borderRadius: BorderRadius.circular(30),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor),
borderRadius: BorderRadius.circular(30),
),
//labelText: 'Search by phone number',
hintText: 'Search by date',
labelStyle: TextStyle(
color: greyColor, //<-- SEE HERE
),
),
),)
),
),
Expanded(child: _filtereddata()),
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) {
getAllRecords();
});
//showBoreAddingDialog();
},
),
/* Padding(
padding: EdgeInsets.fromLTRB(5, 0, 5, 5),
child: Text(
'Add Tanks ',
style: TextStyle(color: Colors.white),
),
)*/
],
),
),
),
]);
} }
else{ else{
return Center( return Center(
@ -596,7 +1271,7 @@ class _PrescriptionsState extends State<Prescriptions> {
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 prescriptions added as of now'), Text('Click below icon to add new Record'),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
@ -606,10 +1281,13 @@ class _PrescriptionsState extends State<Prescriptions> {
child: IconButton( child: IconButton(
iconSize: 40, iconSize: 40,
icon: const Icon( icon: const Icon(
Icons.info, Icons.add,
color: Colors.white, color: Colors.white,
), ),
onPressed: () async { onPressed: () async {
Navigator.push(context, MaterialPageRoute(builder: (context) => AddReports())).then((value) {
getAllRecords();
});
}, },
), ),
) )
@ -618,6 +1296,8 @@ class _PrescriptionsState extends State<Prescriptions> {
) )
); );
} }
} }
/**/ /**/

@ -0,0 +1,214 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:healthcare_user/common/settings.dart';
import 'package:google_maps_flutter_android/google_maps_flutter_android.dart';
import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart';
import 'package:location/location.dart' as locationmap;
import '../google_maps_place_picker_mb/src/models/pick_result.dart';
import '../google_maps_place_picker_mb/src/place_picker.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:healthcare_user/google_maps_place_picker_mb/google_maps_place_picker.dart';
import 'package:healthcare_user/keys.dart';
class UpdateMyLocation extends StatefulWidget {
const UpdateMyLocation({Key? key}) : super(key: key);
@override
State<UpdateMyLocation> createState() => _UpdateMyLocationState();
}
class _UpdateMyLocationState extends State<UpdateMyLocation> {
PickResult? selectedPlace;
bool _mapsInitialized = false;
final String _mapsRenderer = "latest";
var kInitialPosition = const LatLng(15.462477, 78.717401);
locationmap.Location location = locationmap.Location();
final GoogleMapsFlutterPlatform mapsImplementation = GoogleMapsFlutterPlatform.instance;
double lat=0;
double lng=0;
void initRenderer() {
if (_mapsInitialized) return;
if (mapsImplementation is GoogleMapsFlutterAndroid) {
switch (_mapsRenderer) {
case "legacy":
(mapsImplementation as GoogleMapsFlutterAndroid)
.initializeWithRenderer(AndroidMapRenderer.legacy);
break;
case "latest":
(mapsImplementation as GoogleMapsFlutterAndroid)
.initializeWithRenderer(AndroidMapRenderer.latest);
break;
}
}
setState(() {
_mapsInitialized = true;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar('Update My Location'),
body: Padding(
padding: EdgeInsets.all(10),
child: Column(
children: [
Container(
child: Row(
children: [
Text('Current Location :',style: labelTextStyle(),),
SizedBox(width:MediaQuery.of(context).size.width * .02,),
Text(AppSettings.userAddress,style:wrapTextStyleBlack(),)
],
),
),
SizedBox(height:MediaQuery.of(context).size.height * .04,),
Container(
width:double.infinity,
height: MediaQuery.of(context).size.height * .05,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: buttonColors, // background
onPrimary: Colors.black, // foreground
),
onPressed: () async{
//=============================================================================================
location.serviceEnabled().then((value) {
if (value) {
initRenderer();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return PlacePicker(
resizeToAvoidBottomInset: false,
hintText: "Find a place ...",
searchingText: "Please wait ...",
selectText: "Select place",
outsideOfPickAreaText: "Place not in area",
initialPosition: kInitialPosition,
useCurrentLocation: true,
selectInitialPosition: true,
usePinPointingSearch: true,
usePlaceDetailSearch: true,
zoomGesturesEnabled: true,
zoomControlsEnabled: true,
onMapCreated: (GoogleMapController controller) {},
onPlacePicked: (PickResult result) async {
setState(() {
selectedPlace = result;
lat=selectedPlace!.geometry!.location.lat;
lng=selectedPlace!.geometry!.location.lng;
/*if(selectedPlace!.types!.length==1){
userAddressCapturingController.text =
selectedPlace!.formattedAddress!;
}
else{
userAddressCapturingController.text =selectedPlace!.name!+', '+selectedPlace!.formattedAddress!;
}*/
Navigator.of(context).pop();
});
var payload = new Map<String, dynamic>();
payload["latitude"] = lat;
payload["longitude"] = lng;
bool updateStatus = await AppSettings.updateLocation(payload);
if(updateStatus){
setState(() {
if(selectedPlace!.types!.length==1){
AppSettings.userAddress =
selectedPlace!.formattedAddress!;
}
else{
AppSettings.userAddress=selectedPlace!.name!+', '+selectedPlace!.formattedAddress!;
}
});
}
else{
AppSettings.longFailedToast(
"Failed to update location");
}
},
onMapTypeChanged: (MapType mapType) {},
apiKey: Platform.isAndroid
? APIKeys.androidApiKey
: APIKeys.iosApiKey,
forceAndroidLocationManager: true,
);
},
),
);
} else {
showGeneralDialog(
context: context,
pageBuilder: (context, x, y) {
return Scaffold(
backgroundColor: Colors.grey.withOpacity(.5),
body: Center(
child: Container(
width: double.infinity,
height: 150,
padding:
const EdgeInsets.symmetric(horizontal: 20),
child: Card(
child: Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text(
"Please enable the location",
style: TextStyle(
fontSize:18,
fontWeight: FontWeight.w500,
),
),
const SizedBox(
height: 20,
),
ElevatedButton(
onPressed: () {
Navigator.pop(context);
},
child: const Text("Cancel"),
),
],
),
),
),
),
),
);
},
);
}
});
},
child: const Text('Update My Location'),
)),
],
),
)
);
}
}

@ -0,0 +1,20 @@
import 'package:flutter/material.dart';
import 'package:healthcare_user/common/settings.dart';
class UpdatePin extends StatefulWidget {
const UpdatePin({Key? key}) : super(key: key);
@override
State<UpdatePin> createState() => _UpdatePinState();
}
class _UpdatePinState extends State<UpdatePin> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar('Update Pin'),
body: Container(),
);
}
}

@ -6,9 +6,13 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <file_selector_linux/file_selector_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h> #include <url_launcher_linux/url_launcher_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) { void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);

@ -3,6 +3,7 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
file_selector_linux
url_launcher_linux url_launcher_linux
) )

@ -7,6 +7,7 @@ import Foundation
import cloud_firestore import cloud_firestore
import device_info_plus_macos import device_info_plus_macos
import file_selector_macos
import firebase_core import firebase_core
import firebase_messaging import firebase_messaging
import flutter_local_notifications import flutter_local_notifications
@ -19,6 +20,7 @@ import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin")) FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin")) FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))

@ -7,14 +7,14 @@ packages:
name: _flutterfire_internals name: _flutterfire_internals
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.2" version: "1.3.6"
archive: archive:
dependency: transitive dependency: transitive
description: description:
name: archive name: archive
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.3.7" version: "3.4.2"
args: args:
dependency: transitive dependency: transitive
description: description:
@ -98,21 +98,21 @@ packages:
name: cloud_firestore name: cloud_firestore
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.8.0" version: "4.9.2"
cloud_firestore_platform_interface: cloud_firestore_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: cloud_firestore_platform_interface name: cloud_firestore_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.15.0" version: "5.16.1"
cloud_firestore_web: cloud_firestore_web:
dependency: transitive dependency: transitive
description: description:
name: cloud_firestore_web name: cloud_firestore_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.6.0" version: "3.7.1"
cloudinary_public: cloudinary_public:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -175,14 +175,14 @@ packages:
name: day_night_time_picker name: day_night_time_picker
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.3.0+1"
dbus: dbus:
dependency: transitive dependency: transitive
description: description:
name: dbus name: dbus
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.7.3" version: "0.7.4"
device_info_plus: device_info_plus:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -238,7 +238,7 @@ packages:
name: dio name: dio
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.2.0+1" version: "5.3.3"
dots_indicator: dots_indicator:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -267,13 +267,41 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.1.4" version: "6.1.4"
file_selector_linux:
dependency: transitive
description:
name: file_selector_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.2"
file_selector_macos:
dependency: transitive
description:
name: file_selector_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.3+1"
file_selector_platform_interface:
dependency: transitive
description:
name: file_selector_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.6.0"
file_selector_windows:
dependency: transitive
description:
name: file_selector_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.3"
firebase_core: firebase_core:
dependency: transitive dependency: transitive
description: description:
name: firebase_core name: firebase_core
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.13.1" version: "2.16.0"
firebase_core_platform_interface: firebase_core_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -287,28 +315,28 @@ packages:
name: firebase_core_web name: firebase_core_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.5.0" version: "2.8.0"
firebase_messaging: firebase_messaging:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: firebase_messaging name: firebase_messaging
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "14.6.2" version: "14.6.8"
firebase_messaging_platform_interface: firebase_messaging_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: firebase_messaging_platform_interface name: firebase_messaging_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.5.2" version: "4.5.7"
firebase_messaging_web: firebase_messaging_web:
dependency: transitive dependency: transitive
description: description:
name: firebase_messaging_web name: firebase_messaging_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.5.2" version: "3.5.7"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -348,7 +376,7 @@ packages:
name: flutter_lints name: flutter_lints
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.1" version: "2.0.2"
flutter_local_notifications: flutter_local_notifications:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -370,11 +398,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.0.0" version: "5.0.0"
flutter_localizations: flutter_native_contact_picker:
dependency: transitive dependency: "direct dev"
description: flutter description:
source: sdk name: flutter_native_contact_picker
version: "0.0.0" url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
dependency: transitive dependency: transitive
description: description:
@ -389,20 +419,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.0" version: "1.0.0"
flutter_styled_toast:
dependency: "direct dev"
description:
name: flutter_styled_toast
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
flutter_svg: flutter_svg:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_svg name: flutter_svg
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.3" version: "1.1.6"
flutter_svg_provider: flutter_svg_provider:
dependency: "direct main" dependency: "direct main"
description: description:
@ -440,7 +463,7 @@ packages:
name: geocoding_android name: geocoding_android
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.1.2"
geocoding_ios: geocoding_ios:
dependency: transitive dependency: transitive
description: description:
@ -468,35 +491,35 @@ packages:
name: geolocator_android name: geolocator_android
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.1.8" version: "4.3.1"
geolocator_apple: geolocator_apple:
dependency: transitive dependency: transitive
description: description:
name: geolocator_apple name: geolocator_apple
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.6" version: "2.3.2"
geolocator_platform_interface: geolocator_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: geolocator_platform_interface name: geolocator_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.0.7" version: "4.1.0"
geolocator_web: geolocator_web:
dependency: transitive dependency: transitive
description: description:
name: geolocator_web name: geolocator_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.6" version: "2.2.0"
geolocator_windows: geolocator_windows:
dependency: transitive dependency: transitive
description: description:
name: geolocator_windows name: geolocator_windows
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.1" version: "0.1.3"
get: get:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -531,7 +554,7 @@ packages:
name: google_maps_flutter_android name: google_maps_flutter_android
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.4.15" version: "2.4.16"
google_maps_flutter_ios: google_maps_flutter_ios:
dependency: transitive dependency: transitive
description: description:
@ -545,14 +568,14 @@ packages:
name: google_maps_flutter_platform_interface name: google_maps_flutter_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.7" version: "2.4.0"
google_maps_flutter_web: google_maps_flutter_web:
dependency: transitive dependency: transitive
description: description:
name: google_maps_flutter_web name: google_maps_flutter_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.5.0+1" version: "0.5.3"
google_maps_place_picker_mb: google_maps_place_picker_mb:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -594,49 +617,63 @@ packages:
name: image name: image
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.3" version: "3.3.0"
image_picker: image_picker:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: image_picker name: image_picker
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.8.7+5" version: "0.8.9"
image_picker_android: image_picker_android:
dependency: transitive dependency: transitive
description: description:
name: image_picker_android name: image_picker_android
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.8.6+19" version: "0.8.7+4"
image_picker_for_web: image_picker_for_web:
dependency: transitive dependency: transitive
description: description:
name: image_picker_for_web name: image_picker_for_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.12" version: "2.2.0"
image_picker_ios: image_picker_ios:
dependency: transitive dependency: transitive
description: description:
name: image_picker_ios name: image_picker_ios
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.8.7+4" version: "0.8.8"
image_picker_linux:
dependency: transitive
description:
name: image_picker_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.1"
image_picker_macos:
dependency: transitive
description:
name: image_picker_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.1"
image_picker_platform_interface: image_picker_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: image_picker_platform_interface name: image_picker_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.6.4" version: "2.9.0"
imei_plugin: image_picker_windows:
dependency: "direct dev" dependency: transitive
description: description:
name: imei_plugin name: image_picker_windows
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "0.2.1"
intl: intl:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -721,6 +758,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.0" version: "1.8.0"
mime:
dependency: transitive
description:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
multi_image_picker: multi_image_picker:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -811,14 +855,14 @@ packages:
name: path_provider_linux name: path_provider_linux
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.11" version: "2.2.0"
path_provider_platform_interface: path_provider_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: path_provider_platform_interface name: path_provider_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.6" version: "2.1.0"
path_provider_windows: path_provider_windows:
dependency: transitive dependency: transitive
description: description:
@ -832,35 +876,35 @@ packages:
name: permission_handler name: permission_handler
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "10.3.0" version: "10.4.5"
permission_handler_android: permission_handler_android:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_android name: permission_handler_android
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "10.2.3" version: "10.3.6"
permission_handler_apple: permission_handler_apple:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_apple name: permission_handler_apple
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "9.1.0" version: "9.1.4"
permission_handler_platform_interface: permission_handler_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_platform_interface name: permission_handler_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.10.0" version: "3.11.5"
permission_handler_windows: permission_handler_windows:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_windows name: permission_handler_windows
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.2" version: "0.1.3"
petitparser: petitparser:
dependency: transitive dependency: transitive
description: description:
@ -888,14 +932,14 @@ packages:
name: platform name: platform
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.0" version: "3.1.1"
plugin_platform_interface: plugin_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: plugin_platform_interface name: plugin_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.4" version: "2.1.5"
pointycastle: pointycastle:
dependency: transitive dependency: transitive
description: description:
@ -923,56 +967,56 @@ packages:
name: sanitize_html name: sanitize_html
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "2.1.0"
shared_preferences: shared_preferences:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: shared_preferences name: shared_preferences
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.2" version: "2.2.0"
shared_preferences_android: shared_preferences_android:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_android name: shared_preferences_android
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.4" version: "2.2.0"
shared_preferences_foundation: shared_preferences_foundation:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_foundation name: shared_preferences_foundation
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.2" version: "2.3.3"
shared_preferences_linux: shared_preferences_linux:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_linux name: shared_preferences_linux
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.0" version: "2.3.0"
shared_preferences_platform_interface: shared_preferences_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_platform_interface name: shared_preferences_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.0" version: "2.3.0"
shared_preferences_web: shared_preferences_web:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_web name: shared_preferences_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.2.0"
shared_preferences_windows: shared_preferences_windows:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_windows name: shared_preferences_windows
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.0" version: "2.3.0"
sizer: sizer:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -1047,7 +1091,7 @@ packages:
name: tuple name: tuple
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.1" version: "2.0.2"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@ -1075,7 +1119,7 @@ packages:
name: url_launcher_android name: url_launcher_android
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.0.35" version: "6.0.38"
url_launcher_ios: url_launcher_ios:
dependency: transitive dependency: transitive
description: description:
@ -1096,28 +1140,28 @@ packages:
name: url_launcher_macos name: url_launcher_macos
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.5" version: "3.0.6"
url_launcher_platform_interface: url_launcher_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_platform_interface name: url_launcher_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.2" version: "2.1.3"
url_launcher_web: url_launcher_web:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_web name: url_launcher_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.17" version: "2.0.18"
url_launcher_windows: url_launcher_windows:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_windows name: url_launcher_windows
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.6" version: "3.0.7"
uuid: uuid:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1152,7 +1196,7 @@ packages:
name: xml name: xml
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.4.1" version: "6.1.0"
yaml: yaml:
dependency: transitive dependency: transitive
description: description:

@ -38,7 +38,6 @@ dev_dependencies:
url_launcher: ^6.1.9 url_launcher: ^6.1.9
intl: ^0.17.0 intl: ^0.17.0
flutter_svg: ^1.0.1 flutter_svg: ^1.0.1
flutter_styled_toast: ^2.1.3
google_maps_place_picker_mb: ^2.0.0-mb.22 google_maps_place_picker_mb: ^2.0.0-mb.22
flutter_datetime_picker: ^1.5.1 flutter_datetime_picker: ^1.5.1
date_time_picker: ^2.1.0 date_time_picker: ^2.1.0
@ -48,7 +47,6 @@ dev_dependencies:
flutter_local_notifications: ^9.0.2 flutter_local_notifications: ^9.0.2
cloud_firestore: ^4.5.2 cloud_firestore: ^4.5.2
flutter_device_type: ^0.4.0 flutter_device_type: ^0.4.0
imei_plugin: ^1.2.0
device_information: ^0.0.4 device_information: ^0.0.4
device_info_plus: ^3.2.4 device_info_plus: ^3.2.4
overlay_support: ^2.1.0 overlay_support: ^2.1.0
@ -67,6 +65,7 @@ dev_dependencies:
dots_indicator: ^3.0.0 dots_indicator: ^3.0.0
multi_image_picker: ^4.8.1 multi_image_picker: ^4.8.1
charts_flutter: ^0.12.0 charts_flutter: ^0.12.0
flutter_native_contact_picker: ^0.0.4
flutter_icons: flutter_icons:
image_path_ios: 'images/appicon.png' image_path_ios: 'images/appicon.png'

@ -6,12 +6,15 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <file_selector_windows/file_selector_windows.h>
#include <firebase_core/firebase_core_plugin_c_api.h> #include <firebase_core/firebase_core_plugin_c_api.h>
#include <geolocator_windows/geolocator_windows.h> #include <geolocator_windows/geolocator_windows.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h> #include <permission_handler_windows/permission_handler_windows_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h> #include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows"));
FirebaseCorePluginCApiRegisterWithRegistrar( FirebaseCorePluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
GeolocatorWindowsRegisterWithRegistrar( GeolocatorWindowsRegisterWithRegistrar(

@ -3,6 +3,7 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
file_selector_windows
firebase_core firebase_core
geolocator_windows geolocator_windows
permission_handler_windows permission_handler_windows

Loading…
Cancel
Save