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.READ_CONTACTS" />
<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.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>

@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
tasks.register("clean", Delete) {
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: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/prescription_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/zoom_image.dart';
import 'package:healthcare_user/models/reports_model.dart';
import 'package:photo_view/photo_view.dart';
import 'package:intl/intl.dart';
class AllReports extends StatefulWidget {
const AllReports({Key? key}) : super(key: key);
@ -25,6 +28,7 @@ class _AllReportsState extends State<AllReports> {
bool isReportsDataLoading = false;
bool isSereverIssue = false;
TextEditingController searchController = TextEditingController();
TextEditingController dateInput = TextEditingController();
String dropdownSearchType = 'Problem';
var typeOfSearchItems = [
'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
void initState() {
getAllRecords();
@ -308,194 +337,230 @@ class _AllReportsState extends State<AllReports> {
padding: EdgeInsets.all(0),
itemCount: reportsList.length,
itemBuilder: (BuildContext context, int index) {
return Card(
//color: prescriptionsList[index].cardColor,
child: Padding(
padding:EdgeInsets.all(8) ,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: MediaQuery.of(context).size.width * .55,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Problem: '+reportsList[index].problem.toString().toUpperCase(),style: problemTextStyle()),
Text(reportsList[index].doctorName.toString().toUpperCase(),style: valuesTextStyle()),
Text(reportsList[index].hospitalName.toString().toUpperCase(),style: valuesTextStyle()),
Text(reportsList[index].date.toString().toUpperCase(),style: valuesTextStyle()),
Text(reportsList[index].patient_name.toString().toUpperCase(),style: valuesTextStyle()),
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: () {
return GestureDetector(
onTap: (){
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new AllReportsTab(recordDetails:reportsList[index],initialIndex: 0,))).then((value) {
getAllRecords();
});
},
child: Card(
//color: prescriptionsList[index].cardColor,
child: Padding(
padding:EdgeInsets.all(8) ,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: MediaQuery.of(context).size.width * .55,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Problem: '+reportsList[index].problem.toString().toUpperCase(),style: problemTextStyle()),
Text(reportsList[index].doctorName.toString().toUpperCase(),style: valuesTextStyle()),
Text(reportsList[index].hospitalName.toString().toUpperCase(),style: valuesTextStyle()),
Text(reportsList[index].date.toString().toUpperCase(),style: valuesTextStyle()),
Text('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.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');
Expanded(child:IconButton(
icon: const Icon(Icons.edit,color: primaryColor,),
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);
}
else{
AppSettings.longFailedToast('Record deletion failed');
Navigator.of(context).pop(true);
}
},
child: const Text('Yes',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
),
TextButton(
onPressed: () {
Navigator.of(context).pop(true);
},
child: const Text('No',
style: TextStyle(
color: primaryColor,
fontSize: 20,
)),
),
],
),
);
},
),)
],
),
Row(
children: [
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: primaryColor, // background
onPrimary: Colors.white, // foreground
},
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,
new MaterialPageRoute(
builder: (__) => new AllReportsTab(recordDetails:reportsList[index],initialIndex: 0,))).then((value) {
getAllRecords();
});
},
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 {
Navigator.push(
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
SizedBox(
width:MediaQuery.of(context).size.width * .05,
),
onPressed: () async {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ReportImages(imageDetails:reportsList[index].reportImages,recordId:reportsList[index].recordId ,))).then((value) {
getAllRecords();
});
},
child: Text('Reports: '+reportsList[index].reportImages.length.toString()),
),
SizedBox(
width:MediaQuery.of(context).size.width * .05,
),
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: primaryColor, // background
onPrimary: Colors.white, // foreground
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: primaryColor, // background
onPrimary: Colors.white, // foreground
),
onPressed: () async {
/*Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new PrescriptionImages(imageDetails:reportsList[index].prescriptionImages,recordId: reportsList[index].recordId,familyDetails:reportsList[index],details:reportsList[index] ,))).then((value) {
getAllRecords();
});*/
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new AllReportsTab(recordDetails:reportsList[index],initialIndex: 2,))).then((value) {
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();
});
},
child: Text('Prescriptions: '+reportsList[index].prescriptionImages.length.toString()),
),
],
),
Visibility(
visible: false,
child: Text('Findings',style: headingsTextStyle()),),
Visibility(
],
),
Visibility(
visible: false,
child: Text('Findings',style: headingsTextStyle()),),
Visibility(
visible: false,
child: findings(reportsList[index])),
Visibility(
visible: false,
child: findings(reportsList[index])),
Visibility(
visible: false,
child: Text('Reports',style: headingsTextStyle()),),
Visibility(
child: Text('Reports',style: headingsTextStyle()),),
Visibility(
visible: false,
child:reports(reportsList[index]) ),
Visibility(
visible: false,
child:reports(reportsList[index]) ),
Visibility(
visible: false,
child: Text('Prescriptions',style: headingsTextStyle()),),
Visibility(
visible:false,
child:prescriptions(reportsList[index]) ),
],
child: Text('Prescriptions',style: headingsTextStyle()),),
Visibility(
visible:false,
child:prescriptions(reportsList[index]) ),
],
),
),
),
);
@ -602,7 +667,7 @@ class _AllReportsState extends State<AllReports> {
Icons.clear,
color: greyColor,
),*/
suffixIcon: IconButton(
suffixIcon: searchController.text!=''?IconButton(
icon: Icon(
Icons.clear,
color: Colors.red,
@ -613,6 +678,13 @@ class _AllReportsState extends State<AllReports> {
});
getAllRecords();
},
):IconButton(
icon: Icon(
Icons.clear,
color: Colors.transparent,
),
onPressed: () {
},
),
border: OutlineInputBorder(
borderSide: BorderSide(color: primaryColor),
@ -660,7 +732,7 @@ class _AllReportsState extends State<AllReports> {
Icons.clear,
color: greyColor,
),*/
suffixIcon: IconButton(
suffixIcon: searchController.text!=''?IconButton(
icon: Icon(
Icons.clear,
color: Colors.red,
@ -671,6 +743,13 @@ class _AllReportsState extends State<AllReports> {
});
getAllRecords();
},
):IconButton(
icon: Icon(
Icons.clear,
color: Colors.transparent,
),
onPressed: () {
},
),
border: OutlineInputBorder(
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()),
Padding(
padding: EdgeInsets.fromLTRB(8, 8, 8, 8),
@ -775,7 +954,7 @@ class _AllReportsState extends State<AllReports> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar('Reports'),
appBar: AppSettings.appBar('Records'),
body: isReportsDataLoading?Center(
child: CircularProgressIndicator(
color: primaryColor,

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

@ -4,7 +4,7 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/services.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/zoom_image.dart';
import 'package:healthcare_user/prescriptions/oreder_medicines.dart';
@ -15,8 +15,9 @@ class PrescriptionImages extends StatefulWidget {
var imageDetails;
var recordId;
var familyDetails;
var details;
PrescriptionImages({this.imageDetails, this.recordId,this.familyDetails});
PrescriptionImages({this.imageDetails, this.recordId,this.familyDetails,this.details});
@override
State<PrescriptionImages> createState() => _PrescriptionImagesState();
@ -98,6 +99,7 @@ class _PrescriptionImagesState extends State<PrescriptionImages> {
Widget renderUi() {
if (widget.imageDetails.length != 0) {
return Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: GridView.builder(
@ -136,35 +138,72 @@ class _PrescriptionImagesState extends State<PrescriptionImages> {
child: IconButton(
iconSize: 30,
icon: const Icon(
Icons.cancel,
Icons.delete,
color: Colors.red,
),
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]
['url']
.split('/')
.last;
String fileName = widget.imageDetails[index]
['url']
.split('/')
.last;
var payload = new Map<String, dynamic>();
payload["urlType"] = 'prescription';
payload["url"] = widget.imageDetails[index]['url'];
var payload = new Map<String, dynamic>();
payload["urlType"] = 'prescription';
payload["url"] = widget.imageDetails[index]['url'];
try{
var res = await AppSettings.deleteRecordsNew(payload,widget.recordId);
print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop();
AppSettings.longSuccessToast("Image deleted Successfully");
setState(() {
widget.imageDetails = jsonDecode(res)['remainingUrls'];
});
}
catch(e){
print(e);
Navigator.of(context, rootNavigator: true).pop();
AppSettings.longFailedToast("Image deletion failed");
}
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,
)),
),
],
),
);
},
),
),
@ -177,21 +216,97 @@ class _PrescriptionImagesState extends State<PrescriptionImages> {
},
),
),
TextButton(
child: const Text(
'Order Medicines',
style: TextStyle(color: primaryColor),
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.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 {
@ -270,67 +385,7 @@ class _PrescriptionImagesState extends State<PrescriptionImages> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
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);
},
),
],
),
),
);
});
},
),
)
],
),
appBar:AppSettings.appBar('Prescriptions'),
body: Container(padding: EdgeInsets.all(12.0), child: renderUi()),
);
}

@ -93,80 +93,186 @@ class _ReportImagesState extends State<ReportImages> {
Widget renderUi() {
if(widget.imageDetails.length!=0){
return GridView.builder(
itemCount: widget.imageDetails.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
crossAxisSpacing: 2.0,
mainAxisSpacing: 2.0,
),
itemBuilder: (BuildContext context, int index) {
return GestureDetector(
onTap: () {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(
imageName: 'Findings',
imageDetails: widget.imageDetails[index]['url'])));
/*gridOntap(index);*/
},
child: Container(
width: MediaQuery.of(context).size.width * .30,
height: MediaQuery.of(context).size.height * .15,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
image: DecorationImage(
image: NetworkImage(widget.imageDetails[index]['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
child: Stack(children: [
Positioned(
right: 0,
child: Container(
child: IconButton(
iconSize: 30,
icon: const Icon(
Icons.cancel,
color: Colors.red,
),
onPressed: () async {
return Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(child: GridView.builder(
itemCount: widget.imageDetails.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
crossAxisSpacing: 2.0,
mainAxisSpacing: 2.0,
),
itemBuilder: (BuildContext context, int index) {
return GestureDetector(
onTap: () {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(
imageName: 'Findings',
imageDetails: widget.imageDetails[index]['url'])));
/*gridOntap(index);*/
},
child: Container(
width: MediaQuery.of(context).size.width * .30,
height: MediaQuery.of(context).size.height * .15,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
image: DecorationImage(
image: NetworkImage(widget.imageDetails[index]['url'])
as ImageProvider, // picked file
fit: BoxFit.fill)),
child: Stack(children: [
Positioned(
right: 0,
child: Container(
child: IconButton(
iconSize: 30,
icon: const Icon(
Icons.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>();
payload["urlType"] = 'reports';
payload["url"] = widget.imageDetails[index]['url'];
var payload = new Map<String, dynamic>();
payload["urlType"] = 'reports';
payload["url"] = widget.imageDetails[index]['url'];
try{
var res = await AppSettings.deleteRecordsNew(payload,widget.recordId);
print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop();
AppSettings.longSuccessToast("Image deleted Successfully");
setState(() {
widget.imageDetails = jsonDecode(res)['remainingUrls'];
});
}
catch(e){
print(e);
Navigator.of(context, rootNavigator: true).pop();
AppSettings.longFailedToast("Image deletion failed");
}
},
),
/* color: Colors.pinkAccent,
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,
width: 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{
@ -245,66 +351,7 @@ class _ReportImagesState extends State<ReportImages> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar:AppBar(
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);
},
),
],
),
),
);
});
},
),)
],
),
appBar:AppSettings.appBar('Repoprt Images'),
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/emergency.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/my_health.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/seekopinion.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:carousel_slider/carousel_slider.dart';
import 'dart:ui' as ui;
@ -280,7 +281,7 @@ class _DashboardState extends State<Dashboard> {
},
),
Text(
'Reports',
'Records',
style: dashboardTextStyle(),
),
],
@ -895,7 +896,13 @@ class _DashboardState extends State<Dashboard> {
style: drawerListItemsTextStyle()),
],
),
onTap: () {},
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const UpdateMyLocation()),
);
},
),
Divider(
color: Colors.grey,

@ -8,7 +8,6 @@ import 'package:http/http.dart' as http;
import 'package:http/http.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:intl/intl.dart';
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
import 'dart:async';
import 'package:geolocator/geolocator.dart';
import 'package:fluttertoast/fluttertoast.dart';
@ -35,6 +34,10 @@ TextStyle labelTextStyle() {
return TextStyle(color: primaryColor, fontSize: 12);
}
TextStyle labelTextStyleOrderMedicine() {
return TextStyle(color: primaryColor, fontSize: 12,fontWeight: FontWeight.bold);
}
TextStyle haveMotorTextStyle() {
return TextStyle(
color: Colors.red, fontSize: 12, fontWeight: FontWeight.bold);
@ -44,6 +47,10 @@ TextStyle textButtonStyle() {
return TextStyle(color: primaryColor, fontSize: 15);
}
TextStyle textButtonStyleReports() {
return TextStyle(color: Colors.white, fontSize: 12);
}
TextStyle iconBelowTextStyle() {
return TextStyle(fontSize: 10, color: primaryColor);
}
@ -55,6 +62,13 @@ TextStyle valuesTextStyle() {
);
}
TextStyle recordDetailsHeading() {
return TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
);
}
TextStyle problemTextStyle() {
return TextStyle(
fontSize: 12,
@ -133,7 +147,6 @@ TextStyle wrapTextStyleBlack() {
TextStyle withoutWrapTextStyle() {
return TextStyle(
color: primaryColor,
fontSize: 12,
fontWeight: FontWeight.bold,
);
@ -230,6 +243,7 @@ class AppSettings {
static String sugarCaluculateUrl = host + 'insertSugar';
static String profilePicUrl = host + 'users/profile-picture';
static String updateProfileUrl = host + 'update/currentUser';
static String updateLocationUrl = host + 'updateLocation';
static String uploadPicUrl = host + 'uploads';
static String getBmiHistoryUrl = host + 'usersbmi';
static String getBpHistoryUrl = host + 'usersbp';
@ -237,6 +251,9 @@ class AppSettings {
static String addMedicineTimingsUrl = host + 'medicine-timing';
static String getMedicineTimingsUrl = host + 'getmedicineztiming';
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 updateReportsUploadPicUrl = host + 'update-uploads-reports-prescription';
static String reportsUploadPicUrl = host + 'uploads-reports-prescription';
@ -248,14 +265,15 @@ class AppSettings {
static String getQuotationUrl = host + 'submitPicture';
static String addPrescriptionUrl = host + 'add-prescription-details';
static String addRecordsUrl = host + 'add-record';
static String updateRecordsUrl = host + 'records';
static String reportMySelfVideoUploadUrl = host + 'reportProblemVideo';
//static String getAllPrescriptionsDataUrl = host + 'usersinglerprecription';
static String getAllPrescriptionsDataUrl = host + 'getAllPrescriptionDetails';
static String getRecordsDataUrl = host + 'getAllRecords';
static String deleteRecordUrl = host + 'deleteRecord';
static String deleteFindingsUrl = host + 'uploads-findings-prescription';
static String deletePrescriptionsUrl = host + 'uploads-prescription-prescription';
static String deleteReportsUrl = host + 'uploads-reports-prescription';
static String deleteFindingsUrl = host + 'delete-uploads-findings';
static String deletePrescriptionsUrl = host + 'delete-prescription';
static String deleteReportsUrl = host + 'delete-report';
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 {
var uri = Uri.parse(getBmiHistoryUrl + '/' + customerId);
@ -748,6 +785,28 @@ class AppSettings {
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 {
var request = http.MultipartRequest(
@ -797,6 +856,28 @@ class AppSettings {
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 {
var request = http.MultipartRequest(
@ -846,6 +927,28 @@ class AppSettings {
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 {
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 {
var uri = Uri.parse(getAllPrescriptionsDataUrl + '/' + customerId);
//uri = uri.replace(query: 'customerId=$customerId');
@ -1187,8 +1322,8 @@ class AppSettings {
}
static Future<String> deleteFindings(fileName) async {
var uri = Uri.parse(deleteFindingsUrl + '/' + customerId+'/'+fileName);
static Future<String> deleteFindings(fileName,findingsId) async {
var uri = Uri.parse(deleteFindingsUrl + '/' + customerId+'/'+findingsId+'/'+fileName);
try {
var response = await http.delete(uri, headers: await buildRequestHeaders());
@ -1216,8 +1351,8 @@ class AppSettings {
}
}
static Future<String> deletePrescriptions(fileName) async {
var uri = Uri.parse(deletePrescriptionsUrl + '/' + customerId+'/'+fileName);
static Future<String> deletePrescriptions(fileName,prescriptionId) async {
var uri = Uri.parse(deletePrescriptionsUrl + '/' + customerId+'/'+prescriptionId+'/'+fileName);
try {
var response = await http.delete(uri, headers: await buildRequestHeaders());
@ -1245,8 +1380,8 @@ class AppSettings {
}
}
static Future<String> deleteReports(fileName) async {
var uri = Uri.parse(deleteReportsUrl + '/' + customerId+'/'+fileName);
static Future<String> deleteReports(fileName,reportsId) async {
var uri = Uri.parse(deleteReportsUrl + '/' + customerId+'/'+reportsId+'/'+fileName);
try {
var response = await http.delete(uri, headers: await buildRequestHeaders());
@ -1418,20 +1553,6 @@ class AppSettings {
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) {
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/services.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/zoom_image.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:photo_view/photo_view.dart';
import 'package:healthcare_user/models/prescriptions_model.dart';
import 'package:intl/intl.dart';
class Prescriptions extends StatefulWidget {
const Prescriptions({Key? key}) : super(key: key);
@ -38,6 +40,17 @@ class _PrescriptionsState extends State<Prescriptions> {
var AreaItems = ['2', '5', '10', '25', '50', '100'];
List pharmaciesCheckboxes = [];
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 {
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
void initState() {
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() {
if (FilteredList.length != 0) {
return Column(
@ -468,50 +587,254 @@ class _PrescriptionsState extends State<Prescriptions> {
}
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(
width: double.infinity,
height: MediaQuery.of(context).size.height * .20,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: obj.prescriptionImages.length,
itemBuilder: (context, index) {
return Column(
children: [
Card(
child: GestureDetector(
onTap: (){
//showPicDialog(obj.prescriptionImages[index]['url']);
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(imageName:'Prescriptions',imageDetails:obj.prescriptionImages[index]['url'])));
String fileName = obj.prescriptionImages[index]['url']
.split('/')
.last;
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) {
return Column(
crossAxisAlignment: CrossAxisAlignment.end,
@ -521,7 +844,7 @@ class _PrescriptionsState extends State<Prescriptions> {
itemCount: reportsList.length,
itemBuilder: (BuildContext context, int index) {
return Visibility(
visible: reportsList[index].prescriptionImages.length!=0,
visible: true,
child: Card(
//color: prescriptionsList[index].cardColor,
@ -567,19 +890,27 @@ class _PrescriptionsState extends State<Prescriptions> {
SizedBox(height:MediaQuery.of(context).size.height * .02,),
prescriptions(reportsList[index]),
TextButton(
child: const Text(
'Order Medicines',
style: TextStyle(color: primaryColor),
),
onPressed: () {
Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new OrderMedicines(prescriptionDetails:reportsList[index])));
//signup screen
},
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Icon(
Icons.shopping_cart,
color: primaryColor,
),
TextButton(
child: Text(
'Order Medicines / Other Products',
style: textButtonStyle(),
),
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{
return Center(
@ -596,7 +1271,7 @@ class _PrescriptionsState extends State<Prescriptions> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: MediaQuery.of(context).size.height * .25,),
Text('No prescriptions added as of now'),
Text('Click below icon to add new Record'),
SizedBox(
height: 20,
),
@ -606,10 +1281,13 @@ class _PrescriptionsState extends State<Prescriptions> {
child: IconButton(
iconSize: 40,
icon: const Icon(
Icons.info,
Icons.add,
color: Colors.white,
),
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 <file_selector_linux/file_selector_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
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 =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);

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

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

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

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

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

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

Loading…
Cancel
Save