From 23cc63703abfafba8af8ec4deabde5b1d9d960b6 Mon Sep 17 00:00:00 2001 From: NG WEI HEN Date: Tue, 13 Aug 2024 20:35:39 +0800 Subject: [PATCH] Updates --- android/build.gradle | 2 + lib/Controller/Request Controller.dart | 2 +- lib/View/Patient/Body Status/Body Home.dart | 20 + .../Heart Beat/Pulse Dashboard.dart | 128 +++- .../Body Status/Heart Beat/Pulse History.dart | 78 ++- .../Temperature/Temperature Dashboard.dart | 580 +++++++++++++----- .../Temperature/Temperature History.dart | 82 ++- lib/main.dart | 2 +- pubspec.lock | 216 +++---- pubspec.yaml | 2 + 10 files changed, 844 insertions(+), 268 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index d2ffbff..c860ac9 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,3 +1,5 @@ + + allprojects { repositories { google() diff --git a/lib/Controller/Request Controller.dart b/lib/Controller/Request Controller.dart index ccd49d7..c11e8aa 100644 --- a/lib/Controller/Request Controller.dart +++ b/lib/Controller/Request Controller.dart @@ -11,7 +11,7 @@ class WebRequestController{ //10.0.2.2 //192.168.8.119 - String server = "http://192.168.115.212:8000/api/"; + String server = "http://192.168.0.8:8000/api/"; http.Response? _res; final Map _body = {}; final Map _headers = {}; diff --git a/lib/View/Patient/Body Status/Body Home.dart b/lib/View/Patient/Body Status/Body Home.dart index 15fa9c7..6c41a0f 100644 --- a/lib/View/Patient/Body Status/Body Home.dart +++ b/lib/View/Patient/Body Status/Body Home.dart @@ -1,4 +1,5 @@ import 'dart:convert'; //json encode/decode +import 'package:gradient_borders/box_borders/gradient_box_border.dart'; import 'package:http/http.dart' as http; import 'dart:io'; @@ -647,6 +648,13 @@ class _BodyHomeState extends State { child: Container( width: MediaQuery.of(context).size.width, height: 180, + decoration: BoxDecoration( + border: Border.all( + color: Colors.black, // Border color + width: 4.0, // Border width + ), + + ), child: Stack( children: [ Container( @@ -687,6 +695,12 @@ class _BodyHomeState extends State { child: Container( width: MediaQuery.of(context).size.width / 2, height: MediaQuery.of(context).size.width / 2, + decoration: BoxDecoration( + border: Border.all( + color: Colors.black, // Border color + width: 4.0, // Border width + ), + ), child: Stack( children: [ Container( @@ -763,6 +777,12 @@ class _BodyHomeState extends State { child: Container( width: MediaQuery.of(context).size.width / 2, height: MediaQuery.of(context).size.width / 2, + decoration: BoxDecoration( + border: Border.all( + color: Colors.black, // Border color + width: 4.0, // Border width + ), + ), child: Stack( children: [ Container( diff --git a/lib/View/Patient/Body Status/Heart Beat/Pulse Dashboard.dart b/lib/View/Patient/Body Status/Heart Beat/Pulse Dashboard.dart index e444841..8b9d3d1 100644 --- a/lib/View/Patient/Body Status/Heart Beat/Pulse Dashboard.dart +++ b/lib/View/Patient/Body Status/Heart Beat/Pulse Dashboard.dart @@ -1,3 +1,4 @@ +import 'package:calendar_date_picker2/calendar_date_picker2.dart'; import 'package:fl_chart/fl_chart.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; @@ -80,6 +81,29 @@ class _PulseDashboardState extends State { } } + @override + void initState() { + // TODO: implement initState + super.initState(); + // Initialize with today's date + selectedDate = DateTime.now(); + } + + DateTime? selectedDate; + + DateTime today = DateTime.now(); + + // List of month names + final List monthNames = [ + 'January', 'February', 'March', 'April', + 'May', 'June', 'July', 'August', + 'September', 'October', 'November', 'December' + ]; + + DateTime? startRange, endRange; + + String? dateRange; + @override Widget build(BuildContext context) { return Scaffold( @@ -132,11 +156,55 @@ class _PulseDashboardState extends State { Padding( padding: const EdgeInsets.all(8.0), - child: Text("Today", style: GoogleFonts.poppins( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 20.0 - ),), + child: InkWell( + onTap: ()async{ + var date_result = await showCalendarDatePicker2Dialog( + context: context, + config: CalendarDatePicker2WithActionButtonsConfig( + controlsTextStyle: GoogleFonts.poppins(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + weekdayLabelTextStyle: GoogleFonts.poppins(fontWeight: FontWeight.bold, color: Colors.black), + lastMonthIcon: Icon(Icons.arrow_back_ios, color: Colors.black), + nextMonthIcon: Icon(Icons.arrow_forward_ios, color: Colors.black), + + dayTextStyle: GoogleFonts.poppins(color: Colors.black), + monthTextStyle: GoogleFonts.poppins(color: Color(0xFF000000)), + yearTextStyle: GoogleFonts.poppins(color: Colors.black), + okButtonTextStyle: GoogleFonts.poppins(color: Color(0xFFFF4081), fontWeight: FontWeight.bold), + selectedMonthTextStyle: GoogleFonts.poppins(color: Colors.white), + selectedDayTextStyle: GoogleFonts.poppins(color: Colors.white), + selectedDayHighlightColor: Color(0xFFFF4081), + + cancelButtonTextStyle: GoogleFonts.poppins(color: Color(0xFFFF4081), fontWeight: FontWeight.bold), + + + ), + dialogSize: const Size(325, 400), + value: [selectedDate], + borderRadius: BorderRadius.circular(15), + + ); + + // If results are not null and contain at least one date, update the selected date + if (date_result != null) { + setState(() { + selectedDate = date_result.last; // Update selected date to the first (and only) selected date + }); + print("Selected Date: ${selectedDate.toString()}"); // Print the selected date + + } + }, + child: Row( + children: [ + Text("${selectedDate == today ? "Today" : "${selectedDate!.day.toString()} ${monthNames[selectedDate!.month - 1]} ${selectedDate!.year.toString()}"} ", style: GoogleFonts.poppins( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 18.0 + ),), + + Icon(Icons.arrow_drop_down_sharp, color: Colors.white), + ], + ), + ), ), SizedBox(height: 10), @@ -393,11 +461,18 @@ class _PulseDashboardState extends State { SizedBox(height: 20), - + Padding( + padding: const EdgeInsets.all(8.0), + child: Text("${dateRange == null ? "" : dateRange}", style: GoogleFonts.poppins( + color: Colors.white, + fontSize: 13.0, + ), textAlign: TextAlign.center), + ), + Container( alignment: Alignment.center, - height: 160, + height: 200, padding: const EdgeInsets.all(8.0), child: Column( children: [ @@ -419,6 +494,7 @@ class _PulseDashboardState extends State { getAllPulseRecordsByToday(); setState(() { graphTitle = "Today Pulse"; + dateRange = null; }); }, child: Card( @@ -459,8 +535,42 @@ class _PulseDashboardState extends State { InkWell( - onTap: (){ - + onTap: () async{ + var date_result = await showCalendarDatePicker2Dialog( + context: context, + config: CalendarDatePicker2WithActionButtonsConfig( + controlsTextStyle: GoogleFonts.poppins(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + selectedDayHighlightColor: Color(0xFFFF4081), + weekdayLabelTextStyle: GoogleFonts.poppins(fontWeight: FontWeight.bold, color: Colors.black), + lastMonthIcon: Icon(Icons.arrow_back_ios, color: Colors.black), + nextMonthIcon: Icon(Icons.arrow_forward_ios, color: Colors.black), + + dayTextStyle: GoogleFonts.poppins(color: Colors.black), + monthTextStyle: GoogleFonts.poppins(color: Color(0xFF000000)), + yearTextStyle: GoogleFonts.poppins(color: Colors.black), + okButtonTextStyle: GoogleFonts.poppins(color: Color(0xFFFF4081), fontWeight: FontWeight.bold), + selectedMonthTextStyle: GoogleFonts.poppins(color: Colors.white), + selectedDayTextStyle: GoogleFonts.poppins(color: Colors.white), + calendarType: CalendarDatePicker2Type.range, + cancelButtonTextStyle: GoogleFonts.poppins(color: Color(0xFFFF4081), fontWeight: FontWeight.bold), + + ), + dialogSize: const Size(325, 400), + value: [startRange, endRange], + borderRadius: BorderRadius.circular(15), + + ); + + // If results are not null and contain at least one date, update the selected date + if (date_result != null) { + setState(() { + startRange = date_result.first; // Update selected date to the first (and only) selected date + endRange = date_result.last; + dateRange = "Date Selected: ${startRange!.day} ${monthNames[startRange!.month - 1]} ${startRange!.year} - ${endRange!.day} ${monthNames[endRange!.month - 1]} ${endRange!.year} "; + }); + + + } }, child: Card( elevation: 3, diff --git a/lib/View/Patient/Body Status/Heart Beat/Pulse History.dart b/lib/View/Patient/Body Status/Heart Beat/Pulse History.dart index a7746ad..ee77efa 100644 --- a/lib/View/Patient/Body Status/Heart Beat/Pulse History.dart +++ b/lib/View/Patient/Body Status/Heart Beat/Pulse History.dart @@ -1,3 +1,4 @@ +import 'package:calendar_date_picker2/calendar_date_picker2.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; @@ -84,6 +85,15 @@ class _PulseHistoryState extends State { } } + DateTime? selectedDate; + + // List of month names + final List monthNames = [ + 'January', 'February', 'March', 'April', + 'May', 'June', 'July', 'August', + 'September', 'October', 'November', 'December' + ]; + @override Widget build(BuildContext context) { @@ -135,10 +145,70 @@ class _PulseHistoryState extends State { children: [ Padding( padding: const EdgeInsets.all(8.0), - child: Text("History", style: GoogleFonts.poppins( - fontWeight: FontWeight.bold, color: Colors.white, - fontSize: 20.0 - ),), + child: Row( + children: [ + Text("History", style: GoogleFonts.poppins( + fontWeight: FontWeight.bold, color: Colors.white, + fontSize: 20.0 + ),), + + Spacer(), + + Padding( + padding: const EdgeInsets.all(8.0), + child: InkWell( + onTap: ()async{ + var date_result = await showCalendarDatePicker2Dialog( + context: context, + config: CalendarDatePicker2WithActionButtonsConfig( + controlsTextStyle: GoogleFonts.poppins(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + weekdayLabelTextStyle: GoogleFonts.poppins(fontWeight: FontWeight.bold, color: Colors.black), + lastMonthIcon: Icon(Icons.arrow_back_ios, color: Colors.black), + nextMonthIcon: Icon(Icons.arrow_forward_ios, color: Colors.black), + selectedDayHighlightColor: Color(0xFFFF4081), + dayTextStyle: GoogleFonts.poppins(color: Colors.black), + monthTextStyle: GoogleFonts.poppins(color: Color(0xFF000000)), + yearTextStyle: GoogleFonts.poppins(color: Colors.black), + okButtonTextStyle: GoogleFonts.poppins(color: Color(0xFFFF4081), fontWeight: FontWeight.bold), + selectedMonthTextStyle: GoogleFonts.poppins(color: Colors.white), + selectedDayTextStyle: GoogleFonts.poppins(color: Colors.white), + cancelButtonTextStyle: GoogleFonts.poppins(color: Color(0xFFFF4081), fontWeight: FontWeight.bold), + + ), + dialogSize: const Size(325, 400), + value: [selectedDate], + borderRadius: BorderRadius.circular(15), + + ); + + // If results are not null and contain at least one date, update the selected date + if (date_result != null) { + setState(() { + selectedDate = date_result.last; // Update selected date to the first (and only) selected date + }); + print("Selected Date: ${selectedDate.toString()}"); // Print the selected date + + } + else{ + selectedDate = null; + } + + }, + child: Row( + children: [ + Text("${selectedDate == null ? "-" : "${selectedDate!.day.toString()} ${monthNames[selectedDate!.month - 1]} ${selectedDate!.year.toString()}"} ", style: GoogleFonts.poppins( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 18.0 + ),), + + Icon(Icons.arrow_drop_down_sharp, color: Colors.white), + ], + ), + ), + ), + ], + ), ), Expanded( diff --git a/lib/View/Patient/Body Status/Temperature/Temperature Dashboard.dart b/lib/View/Patient/Body Status/Temperature/Temperature Dashboard.dart index 8a7e9a5..49f582c 100644 --- a/lib/View/Patient/Body Status/Temperature/Temperature Dashboard.dart +++ b/lib/View/Patient/Body Status/Temperature/Temperature Dashboard.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:syncfusion_flutter_charts/charts.dart'; +import 'package:calendar_date_picker2/calendar_date_picker2.dart'; import '../../../../Controller/MongoDBController.dart'; import '../../../../Model/GraphData.dart'; @@ -25,6 +26,23 @@ class _TempDashboardState extends State { String graphTitle = ''; + DateTime? selectedDate; + + DateTime? startRange, endRange; + + String? dateRange; + + + DateTime today = DateTime.now(); + + // List of month names + final List monthNames = [ + 'January', 'February', 'March', 'April', + 'May', 'June', 'July', 'August', + 'September', 'October', 'November', 'December' + ]; + + // Function to format DateTime to string String formatDate(String date) { // Parse the date string @@ -44,7 +62,7 @@ class _TempDashboardState extends State { return '$hour12:$minute:$second $period'; } - + // get today records Future getAllTempRecordsByToday() async { setState(() { graphTitle = "Today records"; @@ -84,6 +102,181 @@ class _TempDashboardState extends State { } } + + + // Get records for a specific date + Future getTempRecordsByDate(DateTime selectedDate) async { + setState(() { + graphTitle = "Records for ${selectedDate.day} ${monthNames[selectedDate.month - 1]} ${selectedDate.year}"; + }); + + try { + var tempRecords = await MongoDatabase().getByQuery( + "Temperature", + { + "PatientID": 'P-${widget.id}', + "MeasureDate": { + "\$gte": DateTime(selectedDate.year, selectedDate.month, selectedDate.day), + "\$lt": DateTime(selectedDate.year, selectedDate.month, selectedDate.day).add(Duration(days: 1)), + } + }, + ); + + setState(() { + temperatures = tempRecords.map((json) => Temperature.fromJson(json)).toList(); + temperatureData = temperatures.map((temp) => GraphData(day: formatTime(temp.measureTime.toString()), value: temp.temperature.toDouble())).toList(); + }); + } catch (e, printStack) { + print('Error fetching temperature records for the specific date: $e'); + print(printStack); + } + } + + + + // get highest records for recent 5 days + Future getHighestTempRecordsForRecentDays() async { + setState(() { + graphTitle = "Highest temperature records for Recent 5 days"; + }); + DateTime now = DateTime.now(); + DateTime today = DateTime(now.year, now.month, now.day); + DateTime fiveDaysAgo = today.subtract(Duration(days: 5)); + + try { + var tempRecords = await MongoDatabase().getByQuery( + "Temperature", + { + "PatientID": 'P-${widget.id}', + "MeasureDate": { + "\$gte": fiveDaysAgo, + "\$lt": today.add(Duration(days: 1)), + } + }, + ); + + List temps = tempRecords.map((json) => Temperature.fromJson(json)).toList(); + Map highestTemps = {}; + + for (var temp in temps) { + DateTime date = DateTime(temp.measureDate!.year, temp.measureDate!.month, temp.measureDate!.day); + if (!highestTemps.containsKey(date) || highestTemps[date]!.temperature < temp.temperature) { + highestTemps[date] = temp; + + print("Highest: ${highestTemps[date]}"); + } + } + + setState(() { + temperatures = highestTemps.values.toList(); + temperatureData = temperatures.map((temp) => GraphData(day: formatDate(temp.measureDate.toString()), value: temp.temperature.toDouble())).toList(); + }); + } catch (e, printStack) { + print('Error fetching temperature records: $e'); + print(printStack); + } + } + + // get records based on certain date range selected + Future getTempRecordsByDateRange(DateTime startDate, DateTime endDate) async { + try { + var tempRecords = await MongoDatabase().getByQuery( + "Temperature", + { + "PatientID": 'P-${widget.id}', + "MeasureDate": { + "\$gte": startDate, + "\$lt": endDate.add(Duration(days: 1)), + } + }, + ); + + setState(() { + temperatures = tempRecords.map((json) => Temperature.fromJson(json)).toList(); + + print("Records between ${startDate} and ${endDate}: ${temperatures}"); + temperatureData = temperatures.map((temp) => GraphData(day: "${formatDate(temp.measureDate.toString())} ${formatTime(temp.measureTime.toString())}", value: temp.temperature.toDouble())).toList(); + }); + } catch (e, printStack) { + print('Error fetching temperature records: $e'); + print(printStack); + } + } + + // Get records for the week based on the specific date + Future getTempRecordsForWeek(DateTime selectedDate) async { + setState(() { + graphTitle = "Records for the week of ${selectedDate.day} ${monthNames[selectedDate.month - 1]} ${selectedDate.year}"; + }); + + DateTime startOfWeek = selectedDate.subtract(Duration(days: selectedDate.weekday - 1)); + DateTime endOfWeek = startOfWeek.add(Duration(days: 6)); + + try { + var tempRecords = await MongoDatabase().getByQuery( + "Temperature", + { + "PatientID": 'P-${widget.id}', + "MeasureDate": { + "\$gte": startOfWeek, + "\$lt": endOfWeek.add(Duration(days: 1)), + } + }, + ); + + setState(() { + temperatures = tempRecords.map((json) => Temperature.fromJson(json)).toList(); + temperatureData = temperatures.map((temp) => GraphData(day: formatDate(temp.measureDate.toString()), value: temp.temperature.toDouble())).toList(); + }); + } catch (e, printStack) { + print('Error fetching temperature records for the week: $e'); + print(printStack); + } + } + + // Get records for the month based on the specific date + Future getTempRecordsForMonth(DateTime selectedDate) async { + setState(() { + graphTitle = "Records for ${monthNames[selectedDate.month - 1]} ${selectedDate.year}"; + }); + + DateTime startOfMonth = DateTime(selectedDate.year, selectedDate.month, 1); + DateTime endOfMonth = DateTime(selectedDate.year, selectedDate.month + 1, 1).subtract(Duration(days: 1)); + + try { + var tempRecords = await MongoDatabase().getByQuery( + "Temperature", + { + "PatientID": 'P-${widget.id}', + "MeasureDate": { + "\$gte": startOfMonth, + "\$lt": endOfMonth.add(Duration(days: 1)), + } + }, + ); + + setState(() { + temperatures = tempRecords.map((json) => Temperature.fromJson(json)).toList(); + temperatureData = temperatures.map((temp) => GraphData(day: formatDate(temp.measureDate.toString()), value: temp.temperature.toDouble())).toList(); + }); + } catch (e, printStack) { + print('Error fetching temperature records for the month: $e'); + print(printStack); + } + } + + + @override + void initState() { + // TODO: implement initState + super.initState(); + // Initialize with today's date + selectedDate = DateTime.now(); + getAllTempRecordsByToday(); + } + + + @override Widget build(BuildContext context) { @@ -138,17 +331,66 @@ class _TempDashboardState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ + + SizedBox(height: 10), + Padding( padding: const EdgeInsets.all(8.0), - child: Text("Today", style: GoogleFonts.poppins( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 20.0 - ),), + child: InkWell( + onTap: ()async{ + var date_result = await showCalendarDatePicker2Dialog( + context: context, + config: CalendarDatePicker2WithActionButtonsConfig( + firstDate: DateTime(2000, 1, 1), + lastDate: DateTime(2099, 12, 31), + currentDate: today, + controlsTextStyle: GoogleFonts.poppins(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + weekdayLabelTextStyle: GoogleFonts.poppins(fontWeight: FontWeight.bold, color: Colors.black), + lastMonthIcon: Icon(Icons.arrow_back_ios, color: Colors.black), + nextMonthIcon: Icon(Icons.arrow_forward_ios, color: Colors.black), + + dayTextStyle: GoogleFonts.poppins(color: Colors.black), + monthTextStyle: GoogleFonts.poppins(color: Color(0xFF000000)), + yearTextStyle: GoogleFonts.poppins(color: Colors.black), + okButtonTextStyle: GoogleFonts.poppins(color: Colors.orange, fontWeight: FontWeight.bold), + selectedMonthTextStyle: GoogleFonts.poppins(color: Colors.white), + selectedDayTextStyle: GoogleFonts.poppins(color: Colors.white), + + + cancelButtonTextStyle: GoogleFonts.poppins(color: Colors.orange, fontWeight: FontWeight.bold), + + ), + dialogSize: const Size(325, 400), + value: [selectedDate], + borderRadius: BorderRadius.circular(15), + + ); + + // If results are not null and contain at least one date, update the selected date + if (date_result != null) { + setState(() { + selectedDate = date_result.last; // Update selected date to the first (and only) selected date + getTempRecordsByDate(selectedDate!); + dateRange == null; + }); + print("Selected Date: ${selectedDate.toString()}"); // Print the selected date + + } + }, + child: Row( + children: [ + Text("${selectedDate == today ? "Today" : "${selectedDate!.day.toString()} ${monthNames[selectedDate!.month - 1]} ${selectedDate!.year.toString()}"} ", style: GoogleFonts.poppins( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 18.0 + ),), + + Icon(Icons.arrow_drop_down_sharp, color: Colors.white), + ], + ), + ), ), - - SizedBox(height: 10), - + Container( child: Row( children: [ @@ -212,6 +454,14 @@ class _TempDashboardState extends State { // The button that is tapped is set to true, and the others to false. for (int i = 0; i < _selectedDays.length; i++) { _selectedDays[i] = i == index; + + } + if (_selectedDays[0]) { + getTempRecordsByDate(selectedDate!); + } else if (_selectedDays[1]) { + getTempRecordsForWeek(selectedDate!); + } else if (_selectedDays[2]) { + getTempRecordsForMonth(selectedDate!); } }); }, @@ -246,147 +496,150 @@ class _TempDashboardState extends State { SizedBox(height: 20), - Container( - height: 200, + Padding( + padding: const EdgeInsets.all(5.0), child: SfCartesianChart( - // Initialize category axis - plotAreaBorderWidth: 0.0, - primaryXAxis: CategoryAxis( - // For days view - labelStyle: GoogleFonts.poppins( - color: Color(0xFFFFFFFF), - fontWeight: FontWeight.w600, - fontSize: 10.0), - /* title: AxisTitle( - text: 'Day', - textStyle: GoogleFonts.poppins( - color: Colors.black, - fontWeight: FontWeight.w600, - fontSize: 15.0), - ), */ - ), - - primaryYAxis: NumericAxis( - labelStyle: GoogleFonts.poppins( - color: Color(0xFFFFFFFF), fontWeight: FontWeight.w600, - fontSize: 15.0 - ), - title: AxisTitle( - text: 'Pulse(BPM)', // Set the label for X axis - textStyle: GoogleFonts.poppins( - color: Colors.white, fontWeight: FontWeight.w600, - fontSize: 15.0 - ), - ), - /* title: AxisTitle( - text: 'Celsius', // Set the label for X axis - textStyle: GoogleFonts.poppins( - color: Colors.black, fontWeight: FontWeight.w600, - fontSize: 15.0 - ), - ), */ - ), - - - - - series: [ - - /* - ColumnSeries: Displays data as vertical columns, with height representing the data value. - BarSeries: Similar to ColumnSeries, but the columns are horizontal. - AreaSeries: Displays data as a filled area, with the area under the curve filled with color. - SplineSeries: Similar to LineSeries, but the curve is smoothed out. - ScatterSeries: Represents individual data points as symbols without connecting them. - BubbleSeries: Represents data points as bubbles, with the size of the bubble representing the data value. - PieSeries: Displays data as slices of a pie, with each slice representing a category and its size representing the data value. - DoughnutSeries: Similar to PieSeries, but with a hole in the center. - */ - - temperatureData.length > 1 - // Temperature Series - ? SplineSeries( - xAxisName: "BPM", - yAxisName: "Month", - color: Color(0xFFFFFFFF), - dataSource: temperatureData, - xValueMapper: (GraphData value, _) => value.day, - yValueMapper: (GraphData value, _) => value.value, - enableTooltip: true, - name: 'Heart rate (BPM)', // Name of the series - /* dataLabelSettings: DataLabelSettings( - isVisible: true, textStyle: GoogleFonts.poppins( - color: Colors.black, - fontSize: 8.0 - ),) */ - ) - - : ColumnSeries( - - color: Color(0xFFFFFFFF), - dataSource: temperatureData, - xValueMapper: (GraphData value, _) => value.day, - yValueMapper: (GraphData value, _) => value.value, - enableTooltip: true, - name: 'Heart rate (BPM)', // Name of the series - dataLabelSettings: DataLabelSettings( - isVisible: true, textStyle: GoogleFonts.poppins( - color: Color(0xFFFFFFFF), - fontSize: 8.0 - ),) - ), - - - - - - - - ], - // Enable legend - - // Custom legend position - legend: Legend( - isVisible: false, - position: LegendPosition.auto, // Adjust the position here - textStyle: GoogleFonts.poppins( - color: Color(0xFFFFFFFF), - fontSize: 10.0 - ), - ), - - // Enable zooming and panning - zoomPanBehavior: ZoomPanBehavior( - enableSelectionZooming: true, - enableMouseWheelZooming: true, - enablePanning: true, - enablePinching: true, - zoomMode: ZoomMode.x, - ), - - // Add tooltip - tooltipBehavior: TooltipBehavior( - textStyle: GoogleFonts.poppins( - color: Colors.white, - fontSize: 8.0 - ), - enable: true, - + // Initialize category axis + primaryXAxis: CategoryAxis( + // For days view + labelStyle: GoogleFonts.poppins( + color: Color(0xFFFFFFFF), + fontWeight: FontWeight.w600, + fontSize: 10.0), + /* title: AxisTitle( + text: 'Day', + textStyle: GoogleFonts.poppins( + color: Colors.black, + fontWeight: FontWeight.w600, + fontSize: 15.0), + ), */ + ), + + primaryYAxis: NumericAxis( + labelStyle: GoogleFonts.poppins( + color: Colors.white, fontWeight: FontWeight.w600, + fontSize: 15.0 + ), + title: AxisTitle( + text: 'Celsius', // Set the label for X axis + textStyle: GoogleFonts.poppins( + color: Colors.white, fontWeight: FontWeight.w600, + fontSize: 15.0 ), - - + ), + ), + + + title: ChartTitle( + text: '${graphTitle}', + textStyle: GoogleFonts.poppins( + color: Colors.white, fontWeight: FontWeight.w600, + fontSize: 15.0 + ), + ), + + series: [ + + /* + ColumnSeries: Displays data as vertical columns, with height representing the data value. + BarSeries: Similar to ColumnSeries, but the columns are horizontal. + AreaSeries: Displays data as a filled area, with the area under the curve filled with color. + SplineSeries: Similar to LineSeries, but the curve is smoothed out. + ScatterSeries: Represents individual data points as symbols without connecting them. + BubbleSeries: Represents data points as bubbles, with the size of the bubble representing the data value. + PieSeries: Displays data as slices of a pie, with each slice representing a category and its size representing the data value. + DoughnutSeries: Similar to PieSeries, but with a hole in the center. + */ + + // Temperature Series + temperatureData.length > 1 + + ? SplineSeries( + color: Color(0xFFFF5E00), + dataSource: temperatureData, + xValueMapper: (GraphData value, _) => value.day, + yValueMapper: (GraphData value, _) => value.value, + enableTooltip: true, + name: 'Temperature (°C)', // Name of the series + /* dataLabelSettings: DataLabelSettings( + isVisible: true, textStyle: GoogleFonts.poppins( + color: Colors.black, + fontSize: 8.0 + ),) */ + ) + + : ColumnSeries( + color: Color(0xFFFF5E00), + dataSource: temperatureData, + xValueMapper: (GraphData value, _) => value.day, + yValueMapper: (GraphData value, _) => value.value, + enableTooltip: true, + name: 'Temperature (°C)', // Name of the series + /* dataLabelSettings: DataLabelSettings( + isVisible: true, textStyle: GoogleFonts.poppins( + color: Colors.black, + fontSize: 8.0 + ),) */ + ), + + + + + + + + ], + // Enable legend + + // Custom legend position + legend: Legend( + isVisible: true, + position: LegendPosition.auto, // Adjust the position here + textStyle: GoogleFonts.poppins( + color: Color(0xFFFFFFFF), + fontSize: 10.0 + ), + ), + + // Enable zooming and panning + zoomPanBehavior: ZoomPanBehavior( + enableSelectionZooming: true, + enableMouseWheelZooming: true, + enablePanning: true, + enablePinching: true, + zoomMode: ZoomMode.x, + ), + + // Add tooltip + tooltipBehavior: TooltipBehavior( + textStyle: GoogleFonts.poppins( + color: Colors.white, + fontSize: 8.0 + ), + enable: true, + ), + + + ), ), + SizedBox(height: 20), - + Padding( + padding: const EdgeInsets.all(8.0), + child: Text("${dateRange == null ? "" : dateRange}", style: GoogleFonts.poppins( + color: Colors.white, + fontSize: 13.0, + ), textAlign: TextAlign.center), + ), Container( alignment: Alignment.center, - height: 160, + height: 200, padding: const EdgeInsets.all(8.0), child: Column( children: [ @@ -394,6 +647,8 @@ class _TempDashboardState extends State { color: Colors.white, fontWeight: FontWeight.w800, fontSize: 17.0 ),), + + Row( mainAxisAlignment: MainAxisAlignment.center, // Center the row's children @@ -406,7 +661,9 @@ class _TempDashboardState extends State { InkWell( onTap: (){ setState(() { - graphTitle = "Today Pulse"; + dateRange = null; + getAllTempRecordsByToday(); + selectedDate = DateTime.now(); }); }, child: Card( @@ -446,8 +703,46 @@ class _TempDashboardState extends State { InkWell( - onTap: (){ - + onTap: ()async{ + var date_result = await showCalendarDatePicker2Dialog( + context: context, + config: CalendarDatePicker2WithActionButtonsConfig( + controlsTextStyle: GoogleFonts.poppins(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + weekdayLabelTextStyle: GoogleFonts.poppins(fontWeight: FontWeight.bold, color: Colors.black), + lastMonthIcon: Icon(Icons.arrow_back_ios, color: Colors.black), + nextMonthIcon: Icon(Icons.arrow_forward_ios, color: Colors.black), + + dayTextStyle: GoogleFonts.poppins(color: Colors.black), + monthTextStyle: GoogleFonts.poppins(color: Color(0xFF000000)), + yearTextStyle: GoogleFonts.poppins(color: Colors.black), + okButtonTextStyle: GoogleFonts.poppins(color: Colors.orange, fontWeight: FontWeight.bold), + selectedMonthTextStyle: GoogleFonts.poppins(color: Colors.white), + selectedDayTextStyle: GoogleFonts.poppins(color: Colors.white), + calendarType: CalendarDatePicker2Type.range, + cancelButtonTextStyle: GoogleFonts.poppins(color: Colors.orange, fontWeight: FontWeight.bold), + + ), + dialogSize: const Size(325, 400), + value: [startRange, endRange], + borderRadius: BorderRadius.circular(15), + + ); + + // If results are not null and contain at least one date, update the selected date + if (date_result != null) { + setState(() async{ + startRange = date_result.first; // Update selected date to the first (and only) selected date + endRange = date_result.last; + print("$startRange - $endRange"); + await getTempRecordsByDateRange(startRange!, endRange!); + + dateRange = "Date Selected: ${startRange!.day} ${monthNames[startRange!.month - 1]} ${startRange!.year} - ${endRange!.day} ${monthNames[endRange!.month - 1]} ${endRange!.year} "; + graphTitle = "Temperature records between ${startRange!.day} ${monthNames[startRange!.month - 1]} ${startRange!.year} and ${endRange!.day} ${monthNames[endRange!.month - 1]} ${endRange!.year}"; + }); + + + + } }, child: Card( elevation: 3, @@ -489,6 +784,7 @@ class _TempDashboardState extends State { onTap: (){ setState(() { graphTitle = "Highest pulse records for Recent 5 days"; + getHighestTempRecordsForRecentDays(); }); }, child: Card( @@ -534,7 +830,7 @@ class _TempDashboardState extends State { ) ), - SizedBox(height: 50), + SizedBox(height: 70), ], ), diff --git a/lib/View/Patient/Body Status/Temperature/Temperature History.dart b/lib/View/Patient/Body Status/Temperature/Temperature History.dart index 940c31b..43ef3fc 100644 --- a/lib/View/Patient/Body Status/Temperature/Temperature History.dart +++ b/lib/View/Patient/Body Status/Temperature/Temperature History.dart @@ -1,3 +1,4 @@ +import 'package:calendar_date_picker2/calendar_date_picker2.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import '../../../../Controller/MongoDBController.dart'; @@ -84,7 +85,14 @@ class _TempHistoryState extends State { } } - + DateTime? selectedDate; + + // List of month names + final List monthNames = [ + 'January', 'February', 'March', 'April', + 'May', 'June', 'July', 'August', + 'September', 'October', 'November', 'December' + ]; @override Widget build(BuildContext context) { @@ -134,12 +142,72 @@ class _TempHistoryState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Text("History", style: GoogleFonts.poppins( - fontWeight: FontWeight.bold, color: Colors.white, - fontSize: 20.0 - ),), + Row( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text("History", style: GoogleFonts.poppins( + fontWeight: FontWeight.bold, color: Colors.white, + fontSize: 20.0 + ),), + ), + + Spacer(), + + Padding( + padding: const EdgeInsets.all(8.0), + child: InkWell( + onTap: ()async{ + var date_result = await showCalendarDatePicker2Dialog( + context: context, + config: CalendarDatePicker2WithActionButtonsConfig( + controlsTextStyle: GoogleFonts.poppins(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + weekdayLabelTextStyle: GoogleFonts.poppins(fontWeight: FontWeight.bold, color: Colors.black), + lastMonthIcon: Icon(Icons.arrow_back_ios, color: Colors.black), + nextMonthIcon: Icon(Icons.arrow_forward_ios, color: Colors.black), + + dayTextStyle: GoogleFonts.poppins(color: Colors.black), + monthTextStyle: GoogleFonts.poppins(color: Color(0xFF000000)), + yearTextStyle: GoogleFonts.poppins(color: Colors.black), + okButtonTextStyle: GoogleFonts.poppins(color: Colors.orange, fontWeight: FontWeight.bold), + selectedMonthTextStyle: GoogleFonts.poppins(color: Colors.white), + selectedDayTextStyle: GoogleFonts.poppins(color: Colors.white), + cancelButtonTextStyle: GoogleFonts.poppins(color: Colors.orange, fontWeight: FontWeight.bold), + + ), + dialogSize: const Size(325, 400), + value: [selectedDate], + borderRadius: BorderRadius.circular(15), + + ); + + // If results are not null and contain at least one date, update the selected date + if (date_result != null) { + setState(() { + selectedDate = date_result.last; // Update selected date to the first (and only) selected date + }); + print("Selected Date: ${selectedDate.toString()}"); // Print the selected date + + } + else{ + selectedDate = null; + } + + }, + child: Row( + children: [ + Text("${selectedDate == null ? "-" : "${selectedDate!.day.toString()} ${monthNames[selectedDate!.month - 1]} ${selectedDate!.year.toString()}"} ", style: GoogleFonts.poppins( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 18.0 + ),), + + Icon(Icons.arrow_drop_down_sharp, color: Colors.white), + ], + ), + ), + ), + ], ), Expanded( diff --git a/lib/main.dart b/lib/main.dart index 1f78c2f..c7e3e67 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -105,7 +105,7 @@ class _SplashScreenState extends State with SingleTickerProviderSt // 192.168.101.212 // 10.0.2.2 // 192.168.8.119 - await prefs.setString("localhost", "192.168.115.212"); + await prefs.setString("localhost", "192.168.0.8"); //IP based on NodeMCU await prefs.setString("nodeMCU", "192.168.115.65"); int? userID = await prefs.getInt("loggedUserId"); diff --git a/pubspec.lock b/pubspec.lock index 0a08f1b..e7c365b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -97,6 +97,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.3" + calendar_date_picker2: + dependency: "direct main" + description: + name: calendar_date_picker2 + sha256: c7684d1a6bae19dc78c0b59101b272b47d78713d4aa0fcca55e55cf2dde9e3e4 + url: "https://pub.dev" + source: hosted + version: "1.1.5" call_log: dependency: "direct main" description: @@ -189,10 +197,10 @@ packages: dependency: transitive description: name: cross_file - sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32" + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.4+1" + version: "0.3.4+2" crypto: dependency: "direct main" description: @@ -209,6 +217,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.8" + datepicker_dropdown: + dependency: "direct main" + description: + name: datepicker_dropdown + sha256: "541a80af2fd5b0e53b9d310b09e5d95400de9de0e69c27ff2610373003d7e65c" + url: "https://pub.dev" + source: hosted + version: "0.1.4" dbus: dependency: transitive description: @@ -237,10 +253,10 @@ packages: dependency: transitive description: name: device_info_plus_platform_interface - sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64 + sha256: "282d3cf731045a2feb66abfe61bbc40870ae50a3ed10a4d3d217556c35c8c2ba" url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" dropdown_button2: dependency: "direct main" description: @@ -269,10 +285,10 @@ packages: dependency: transitive description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" file: dependency: transitive description: @@ -285,10 +301,10 @@ packages: dependency: "direct main" description: name: file_picker - sha256: a7eed9716c82453da5c09d3a82d4644e7070dd2da81bfe5b6c6873ae4f07cf4f + sha256: "825aec673606875c33cd8d3c4083f1a3c3999015a84178b317b7ef396b7384f3" url: "https://pub.dev" source: hosted - version: "8.0.4" + version: "8.0.7" file_selector_linux: dependency: transitive description: @@ -317,10 +333,10 @@ packages: dependency: transitive description: name: file_selector_windows - sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0 + sha256: "2ad726953f6e8affbc4df8dc78b77c3b4a060967a291e528ef72ae846c60fb69" url: "https://pub.dev" source: hosted - version: "0.9.3+1" + version: "0.9.3+2" firebase_auth: dependency: "direct main" description: @@ -357,18 +373,18 @@ packages: dependency: transitive description: name: firebase_core_platform_interface - sha256: c437ae5d17e6b5cc7981cf6fd458a5db4d12979905f9aafd1fea930428a9fe63 + sha256: "3c3a1e92d6f4916c32deea79c4a7587aa0e9dbbe5889c7a16afcf005a485ee02" url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.2.0" firebase_core_web: dependency: transitive description: name: firebase_core_web - sha256: "22fcb352744908224fc7be3caae254836099786acfe5df6e9fe901e9c2575a41" + sha256: e8d1e22de72cb21cdcfc5eed7acddab3e99cd83f3b317f54f7a96c32f25fd11e url: "https://pub.dev" source: hosted - version: "2.17.1" + version: "2.17.4" fixnum: dependency: transitive description: @@ -434,10 +450,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: c6b0b4c05c458e1c01ad9bcc14041dd7b1f6783d487be4386f793f47a8a4d03e + sha256: "9d98bd47ef9d34e803d438f17fd32b116d31009f534a6fa5ce3a1167f189a6de" url: "https://pub.dev" source: hosted - version: "2.0.20" + version: "2.0.21" flutter_test: dependency: "direct dev" description: flutter @@ -476,10 +492,10 @@ packages: dependency: transitive description: name: geolocator_android - sha256: "00c7177a95823dd3ee35ef42fd8666cd27d219ae14cea472ac76a21dff43000b" + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" url: "https://pub.dev" source: hosted - version: "4.6.0" + version: "4.6.1" geolocator_apple: dependency: transitive description: @@ -492,10 +508,10 @@ packages: dependency: transitive description: name: geolocator_platform_interface - sha256: c6005787efe9e27cb0f6b50230c217e6f0ef8e1e7a8b854efb4f46489e502603 + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" url: "https://pub.dev" source: hosted - version: "4.2.3" + version: "4.2.4" geolocator_web: dependency: transitive description: @@ -524,10 +540,10 @@ packages: dependency: transitive description: name: google_identity_services_web - sha256: "9482364c9f8b7bd36902572ebc3a7c2b5c8ee57a9c93e6eb5099c1a9ec5265d8" + sha256: "5be191523702ba8d7a01ca97c17fca096822ccf246b0a9f11923a6ded06199b6" url: "https://pub.dev" source: hosted - version: "0.3.1+1" + version: "0.3.1+4" google_sign_in: dependency: "direct main" description: @@ -540,10 +556,10 @@ packages: dependency: transitive description: name: google_sign_in_android - sha256: "8f2606fffd912ff8c23e8d94da106764c116112ce65fb18c78123331ae628eb3" + sha256: "5a47ebec9af97daf0822e800e4f101c3340b5ebc3f6898cf860c1a71b53cf077" url: "https://pub.dev" source: hosted - version: "6.1.24" + version: "6.1.28" google_sign_in_ios: dependency: transitive description: @@ -564,10 +580,10 @@ packages: dependency: transitive description: name: google_sign_in_web - sha256: fc0f14ed45ea616a6cfb4d1c7534c2221b7092cc4f29a709f0c3053cc3e821bd + sha256: "042805a21127a85b0dc46bba98a37926f17d2439720e8a459d27045d8ef68055" url: "https://pub.dev" source: hosted - version: "0.12.4" + version: "0.12.4+2" gradient_borders: dependency: "direct main" description: @@ -588,10 +604,10 @@ packages: dependency: "direct main" description: name: http - sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" http_parser: dependency: transitive description: @@ -620,18 +636,18 @@ packages: dependency: transitive description: name: image_picker_android - sha256: "4161e1f843d8480d2e9025ee22411778c3c9eb7e40076dcf2da23d8242b7b51c" + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" url: "https://pub.dev" source: hosted - version: "0.8.12+3" + version: "0.8.12+12" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - sha256: "5d6eb13048cd47b60dbf1a5495424dea226c5faf3950e20bf8120a58efb5b5f3" + sha256: "65d94623e15372c5c51bebbcb820848d7bcb323836e12dfdba60b5d3a8b39e50" url: "https://pub.dev" source: hosted - version: "3.0.4" + version: "3.0.5" image_picker_ios: dependency: transitive description: @@ -788,18 +804,18 @@ packages: dependency: "direct main" description: name: mongo_dart - sha256: b590f44fc45b1e1e051f60c60476271897e1231529af1df9040772aec232bd5e + sha256: b0078dd433ecad7d250abaa6437cb720dd16cbfa9b8cc020460698e0703d7bc9 url: "https://pub.dev" source: hosted - version: "0.10.2" + version: "0.10.3" mongo_dart_query: dependency: transitive description: name: mongo_dart_query - sha256: "1b927371a53c626df53f75b2c56887e47d161c6bc1eff0dec0f9ced8a29f106a" + sha256: "7a0f3981c3d1df467040e5654696cb0bfde6ec6db86ba313118fb3e873cee657" url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.0.2" network_info_plus: dependency: "direct main" description: @@ -812,10 +828,10 @@ packages: dependency: transitive description: name: network_info_plus_platform_interface - sha256: "2e193d61d3072ac17824638793d3b89c6d581ce90c11604f4ca87311b42f2706" + sha256: b7f35f4a7baef511159e524499f3c15464a49faa5ec10e92ee0bce265e664906 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.0.1" nm: dependency: transitive description: @@ -828,10 +844,10 @@ packages: dependency: "direct main" description: name: onesignal_flutter - sha256: f3940387d6c7033a9c341aa0548f24d98217fce9182f9ad80bf2554b9dd3dc1a + sha256: df9a469b1de7857edbd1384217245ef7b3b5ea73d8f714d8c2b0aeea765c0165 url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.2.2" open_file: dependency: "direct main" description: @@ -868,18 +884,18 @@ packages: dependency: "direct main" description: name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "9c96da072b421e98183f9ea7464898428e764bc0ce5567f27ec8693442e72514" + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.5" + version: "2.2.10" path_provider_foundation: dependency: transitive description: @@ -908,18 +924,18 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" pdf: dependency: "direct main" description: name: pdf - sha256: "243f05342fc0bdf140eba5b069398985cdbdd3dbb1d776cf43d5ea29cc570ba6" + sha256: "05df53f8791587402493ac97b9869d3824eccbc77d97855f4545cf72df3cae07" url: "https://pub.dev" source: hosted - version: "3.10.8" + version: "3.11.1" pdf_widget_wrapper: dependency: transitive description: @@ -928,14 +944,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" - pedantic: - dependency: transitive - description: - name: pedantic - sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" - url: "https://pub.dev" - source: hosted - version: "1.11.1" petitparser: dependency: transitive description: @@ -948,10 +956,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -988,26 +996,26 @@ packages: dependency: transitive description: name: power_extensions - sha256: "9e9092bebe65c05de19eab134f3c2a00afb8857fcb0a8a4571dad1e8289f170c" + sha256: ad0e8b2420090d996fe8b7fd32cdf02b9b924b6d4fc0fb0b559ff6aa5e24d5b0 url: "https://pub.dev" source: hosted - version: "0.2.2" + version: "0.2.3" printing: dependency: "direct main" description: name: printing - sha256: "1c99cab90ebcc1fff65831d264627d5b529359d563e53f33ab9b8117f2d280bc" + sha256: cc4b256a5a89d5345488e3318897b595867f5181b8c5ed6fc63bfa5f2044aec3 url: "https://pub.dev" source: hosted - version: "5.12.0" + version: "5.13.1" qr: dependency: transitive description: name: qr - sha256: "64957a3930367bf97cc211a5af99551d630f2f4625e38af10edd6b19131b64b3" + sha256: "5a1d2586170e172b8a8c8470bbbffd5eb0cd38a66c0d77155ea138d3af3a4445" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" rational: dependency: transitive description: @@ -1036,66 +1044,66 @@ packages: dependency: transitive description: name: saslprep - sha256: "79c9e163a82f55da542feaf0f7a59031e74493299c92008b2b404cd88d639bb4" + sha256: "3d421d10be9513bf4459c17c5e70e7b8bc718c9fc5ad4ba5eb4f5fd27396f740" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.3" shared_preferences: dependency: "direct main" description: name: shared_preferences - sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180 + sha256: c272f9cabca5a81adc9b0894381e9c1def363e980f960fa903c604c471b22f68 url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.1" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "93d0ec9dd902d85f326068e6a899487d1f65ffcd5798721a95330b26c8131577" + sha256: a7e8467e9181cef109f601e3f65765685786c1a738a83d7fbbde377589c0d974 url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.1" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: "0a8a893bf4fd1152f93fec03a415d11c27c74454d96e2318a7ac38dd18683ab7" + sha256: c4b35f6cb8f63c147312c054ce7c2254c8066745125264f0c88739c417fc9d9f url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.5.2" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" + sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" + sha256: d2ca4132d3946fec2184261726b355836a82c33d7d5b67af32692aff18a4684e url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.4.2" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" simple_gesture_detector: dependency: transitive description: @@ -1225,10 +1233,10 @@ packages: dependency: transitive description: name: syncfusion_pdfviewer_platform_interface - sha256: cc448c7709e7ba39619b1b159d06ed97ede00cfda6578837d625b407b1b51793 + sha256: e472a355123c66171d5338fa96da6a05b65af8ca2af4fc4b13cb1f728e53f27b url: "https://pub.dev" source: hosted - version: "25.2.7" + version: "26.2.9" syncfusion_pdfviewer_web: dependency: transitive description: @@ -1249,10 +1257,10 @@ packages: dependency: "direct main" description: name: table_calendar - sha256: b759eb6caa88dda8e51c70ee43c19d1682f8244458f84cced9138ee35b2ce416 + sha256: "4ca32b2fc919452c9974abd4c6ea611a63e33b9e4f0b8c38dba3ac1f4a6549d1" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" term_glyph: dependency: transitive description: @@ -1281,10 +1289,10 @@ packages: dependency: transitive description: name: unorm_dart - sha256: "5b35bff83fce4d76467641438f9e867dc9bcfdb8c1694854f230579d68cd8f4b" + sha256: "23d8bf65605401a6a32cff99435fed66ef3dab3ddcad3454059165df46496a3b" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.3.0" url_launcher: dependency: transitive description: @@ -1297,26 +1305,26 @@ packages: dependency: transitive description: name: url_launcher_android - sha256: ceb2625f0c24ade6ef6778d1de0b2e44f2db71fded235eb52295247feba8c5cf + sha256: "94d8ad05f44c6d4e2ffe5567ab4d741b82d62e3c8e288cc1fcea45965edf47c9" url: "https://pub.dev" source: hosted - version: "6.3.3" + version: "6.3.8" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "7068716403343f6ba4969b4173cbf3b84fc768042124bc2c011e5d782b24fe89" + sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.3.1" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + sha256: e2b9622b4007f97f504cd64c0128309dfb978ae66adbe944125ed9e1750f06af url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.2.0" url_launcher_macos: dependency: transitive description: @@ -1337,26 +1345,26 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a" + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.3" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 + sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" uuid: dependency: transitive description: name: uuid - sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" + sha256: "83d37c7ad7aaf9aa8e275490669535c8080377cfa7a7004c24dfac53afffaa90" url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.4.2" vector_math: dependency: transitive description: @@ -1377,10 +1385,10 @@ packages: dependency: transitive description: name: vy_string_utils - sha256: fcb31a6a284c1f3793a376b50bad19fff0444a9ce9c819dc1c4b5d01dcea8acc + sha256: "03f4f2ebba283b32623459fa9c47d5c70e085253c7891f5ef7d4fd539c41c078" url: "https://pub.dev" source: hosted - version: "0.4.5" + version: "0.4.6" web: dependency: transitive description: @@ -1393,18 +1401,18 @@ packages: dependency: transitive description: name: win32 - sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4 + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.5.1" + version: "5.5.4" win32_registry: dependency: transitive description: name: win32_registry - sha256: "10589e0d7f4e053f2c61023a31c9ce01146656a70b7b7f0828c0b46d7da2a9bb" + sha256: "723b7f851e5724c55409bb3d5a32b203b3afe8587eaf5dafb93a5fed8ecda0d6" url: "https://pub.dev" source: hosted - version: "1.1.3" + version: "1.1.4" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 2179008..ff1aee0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -106,6 +106,8 @@ dependencies: crypto: ^3.0.3 intl: ^0.19.0 fl_chart: ^0.68.0 + datepicker_dropdown: ^0.1.4 + calendar_date_picker2: ^1.1.5 dev_dependencies: