diff --git a/assets/model/labels.txt b/assets/model/labels.txt deleted file mode 100644 index 36e2573..0000000 --- a/assets/model/labels.txt +++ /dev/null @@ -1,2 +0,0 @@ -Benign -Malignant \ No newline at end of file diff --git a/assets/model/model_unquant.tflite b/assets/model/model_unquant.tflite deleted file mode 100644 index 1696f71..0000000 Binary files a/assets/model/model_unquant.tflite and /dev/null differ diff --git a/lib/const/consts.dart b/lib/const/consts.dart index 4c4bcd2..62b9e28 100644 --- a/lib/const/consts.dart +++ b/lib/const/consts.dart @@ -1,7 +1,6 @@ // ignore_for_file: constant_identifier_names import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/app_localizations.dart'; class Consts { static const THEME_STATUS = "THEME_STATUS"; diff --git a/lib/main.dart b/lib/main.dart index 733c690..a0ec37a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,3 @@ -import 'dart:developer'; - import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -16,7 +14,6 @@ import 'providers/authprovider.dart'; import 'providers/breastcancerprovider.dart'; import 'providers/doctorprovider.dart'; import 'providers/languageprovider.dart'; -import 'providers/pdfgenerateprovider.dart'; import 'providers/reminderprovider.dart'; import 'providers/selfcheckprovider.dart'; import 'screens/auth/auth.dart'; @@ -25,7 +22,6 @@ import 'services/apiservice.dart'; import 'services/notificationservice.dart'; import 'providers/modelprovider.dart'; import 'providers/nav_bar_provider.dart'; -import 'providers/predictionprovider.dart'; import 'providers/themeprovider.dart'; void main() async { @@ -78,15 +74,9 @@ class MyApp extends StatelessWidget { ChangeNotifierProvider( create: (_) => ModelProvider(), ), - ChangeNotifierProvider( - create: (_) => PredictionProvider(), - ), ChangeNotifierProvider( create: (_) => ReminderProvider(), ), - ChangeNotifierProvider( - create: (_) => PdfGenerateProvider(), - ), ], builder: (context, child) { return Consumer(builder: (context, value, child) { @@ -137,7 +127,6 @@ class MyApp extends StatelessWidget { void removesplash() async { return await Future.delayed(const Duration(seconds: 3), () { - log('Splash Remove'); FlutterNativeSplash.remove(); }); } diff --git a/lib/providers/pdfgenerateprovider.dart b/lib/providers/pdfgenerateprovider.dart deleted file mode 100644 index 947f819..0000000 --- a/lib/providers/pdfgenerateprovider.dart +++ /dev/null @@ -1,242 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:intl/intl.dart'; -import 'package:syncfusion_flutter_pdf/pdf.dart'; -//Local imports -import '../const/consts.dart'; -import '../utils/savepdf_filemobile.dart' - if (dart.library.html) '../utils/savepdf_fileweb.dart'; - -class PdfGenerateProvider extends ChangeNotifier { - Future generateReport({ - required String patientName, - required String patientAge, - required String predictionconfidence, - required String predictionresult, - }) async { - final PdfColor pdfColor = PdfColor(255, 128, 171); - //Create a PDF document. - final PdfDocument document = PdfDocument(); - //Add page to the PDF - final PdfPage page = document.pages.add(); - //Get page client size - final Size pageSize = page.getClientSize(); - //Draw rectangle - page.graphics.drawRectangle( - bounds: Rect.fromLTWH(0, 0, pageSize.width, pageSize.height), - pen: PdfPen(pdfColor)); - - await drawHeader( - page: page, - pageSize: pageSize, - pdfColor: pdfColor, - headerTitle: Consts.APP_NAME, - logoUrl: 'assets/logo.png'); - - drawPatientInfo( - page: page, - pageSize: pageSize, - reportId: DateTime.now().millisecondsSinceEpoch.toString(), - patientDetails: '''Patient Name: $patientName\r\n\r\nAge: $patientAge''', - ); - - drawresult( - page: page, - pageSize: pageSize, - predictionconfidence: predictionconfidence, - predictionresult: predictionresult, - ); - - drawFooter( - page: page, - pageSize: pageSize, - pdfColor: pdfColor, - footersize: 60, - footerTitle: 'Note:', - footerDescription: - 'Please note that our AI mammography analysis algorithm is designed to assist medical professionals in making diagnostic decisions and is not intended to replace clinical judgment or expertise. It is important for patients to follow up with their healthcare providers to discuss their mammography results and any necessary next steps.'); - //Save the PDF document - final List bytes = document.saveSync(); - //Dispose the document. - document.dispose(); - //Save and launch the file. - await saveAndLaunchFile(bytes, 'MammographyReport.pdf'); - } - - //Draws the invoice header - Future drawHeader({ - required PdfPage page, - required Size pageSize, - required PdfColor pdfColor, - required String headerTitle, - required String logoUrl, - }) async { - //Draw rectangle - page.graphics.drawRectangle( - brush: PdfSolidBrush(pdfColor), - bounds: Rect.fromLTWH(0, 0, pageSize.width, 90)); - - //Draw image - page.graphics.drawImage( - PdfBitmap( - await getImageBytes(logoUrl), - ), - const Rect.fromLTWH(0, 0, 90, 90), - ); - - //Draw string - page.graphics.drawString( - headerTitle, - PdfStandardFont(PdfFontFamily.helvetica, 30), - brush: PdfBrushes.white, - bounds: Rect.fromLTWH(90, 0, pageSize.width, 90), - format: PdfStringFormat( - lineAlignment: PdfVerticalAlignment.middle, - ), - ); - } - - Future drawPatientInfo({ - required PdfPage page, - required Size pageSize, - required String reportId, - required String patientDetails, - }) async { - final PdfFont contentFont = PdfStandardFont(PdfFontFamily.helvetica, 9); - //Create data foramt and convert it to text. - final DateFormat format = DateFormat.yMMMMd('en_US'); - final String reportNumber = - 'Report ID: $reportId\r\n\r\nReport Date: ${format.format(DateTime.now())}'; - final Size contentSize = contentFont.measureString(reportNumber); - // ignore: leading_newlines_in_multiline_strings - - PdfTextElement(text: reportNumber, font: contentFont).draw( - page: page, - bounds: Rect.fromLTWH(pageSize.width - (contentSize.width + 30), 120, - contentSize.width + 30, pageSize.height - 120)); - - return PdfTextElement(text: patientDetails, font: contentFont).draw( - page: page, - bounds: Rect.fromLTWH(30, 120, pageSize.width - (contentSize.width + 30), - pageSize.height - 120), - )!; - } - - drawresult({ - required PdfPage page, - required Size pageSize, - required String predictionconfidence, - required String predictionresult, - }) { - const String title = 'Mammography Analysis Results:'; - final String body = - 'Our AI mammography analysis algorithm has evaluated the mammogram images of the patient\'s breast and identified the following findings:\r\n\r\nFindings: $predictionresult\r\nConfidence Rate: $predictionconfidence%\r\n\r\nBased on our analysis, we have identified $predictionresult findings in the patient\'s breast. The confidence rate for this analysis is $predictionconfidence%, which indicates the level of certainty that our algorithm has in the accuracy of these findings.\r\n\r\n ${predictionresult == 'Malignant' ? 'It is highly recommended that the patient undergo further diagnostic testing and follow-up with a medical professional as soon as possible to determine the appropriate course of treatment.\r\n\r\n' : 'While there are no significant findings that indicate a malignancy at this time, it is still recommended that the patient continues to receive regular mammography screenings as per their healthcare provider\'s recommendations.'}'; - // page.graphics.drawString( - // title, - // PdfStandardFont(PdfFontFamily.helvetica, 9), - // format: PdfStringFormat(), - // bounds: Rect.fromLTWH( - // 30, - // 250, - // pageSize.width - 50, - // 0, - // ), - // ); - // page.graphics.drawString( - // title, - // PdfStandardFont(PdfFontFamily.helvetica, 9, style: PdfFontStyle.bold), - // bounds: Rect.fromLTWH( - // 30, - // 250, - // pageSize.width - 50, - // 0, - // ), - // ); - - // final PdfFont contentFont = - // PdfStandardFont(PdfFontFamily.helvetica, 9, style: PdfFontStyle.bold); - // final Size contentSize = contentFont.measureString(title); - - page.graphics.drawString( - title, - PdfStandardFont( - PdfFontFamily.helvetica, - 9, - // style: PdfFontStyle.bold, - ), - format: PdfStringFormat(), - bounds: Rect.fromLTWH( - 30, - 250, - pageSize.width - 50, - 0, - ), - ); - String footerContent = '$title\r\n\r\n$body'; - - //Added 20 as a margin for the layout - page.graphics.drawString( - footerContent, - PdfStandardFont(PdfFontFamily.helvetica, 9), - format: PdfStringFormat(), - bounds: Rect.fromLTWH( - 30, - 250, - pageSize.width - 50, - 0, - ), - ); - } - - //Draw the invoice footer data. - void drawFooter({ - required PdfPage page, - required Size pageSize, - required PdfColor pdfColor, - required int footersize, - required String footerTitle, - required String footerDescription, - }) { - final PdfPen linePen = PdfPen(pdfColor, dashStyle: PdfDashStyle.custom); - linePen.dashPattern = [3, 3]; - //Draw line - page.graphics.drawLine(linePen, Offset(0, pageSize.height - footersize), - Offset(pageSize.width, pageSize.height - footersize)); - - page.graphics.drawString( - footerTitle, - PdfStandardFont( - PdfFontFamily.helvetica, - 9, - // style: PdfFontStyle.bold, - ), - format: PdfStringFormat(), - bounds: Rect.fromLTWH( - 10, - pageSize.height - footersize + 15, - pageSize.width - 20, - 0, - ), - ); - String footerContent = '$footerTitle $footerDescription'; - - //Added 20 as a margin for the layout - page.graphics.drawString( - footerContent, - PdfStandardFont(PdfFontFamily.helvetica, 9), - format: PdfStringFormat(), - bounds: Rect.fromLTWH( - 10, - pageSize.height - footersize + 15, - pageSize.width - 20, - 0, - ), - ); - } - - Future> getImageBytes(String imagePath) async { - final ByteData imageData = await rootBundle.load(imagePath); - final Uint8List imageBytes = imageData.buffer.asUint8List(); - return imageBytes.toList(); - } -} diff --git a/lib/providers/predictionprovider.dart b/lib/providers/predictionprovider.dart deleted file mode 100644 index b0bdc42..0000000 --- a/lib/providers/predictionprovider.dart +++ /dev/null @@ -1,178 +0,0 @@ -import 'dart:io'; -import 'package:flutter/material.dart'; -import 'package:flutter_tflite/flutter_tflite.dart'; - -import 'modelprovider.dart'; - -class PredictionProvider extends ChangeNotifier { - bool _loading = true; - bool get loading => _loading; - List? _output; - List? get output => _output; - - Future prediction({required File image}) async { - await initWithLocalModel(); - await classifyImage(image); - _loading = false; - notifyListeners(); - } - - Future initWithLocalModel() async { - await loadTFLiteModel( - modelFile: ModelProvider.memmographyPredictionModel!.file, - labelFile: ModelProvider.memmographyPredictionLabel!, - ); - } - - Future classifyImage(File image) async { - try { - _output = await Tflite.runModelOnImage( - path: image.path, - numResults: 2, - threshold: 0.5, - imageMean: 127.5, - imageStd: 127.5, - ); - debugPrint('output: $_output'); - } catch (e) { - debugPrint(e.toString()); - } - Tflite.close(); - notifyListeners(); - } - - Future loadTFLiteModel({ - required File modelFile, - required File labelFile, - }) async { - try { - await Tflite.loadModel( - model: modelFile.path, - labels: labelFile.path, - isAsset: false, - ); - debugPrint('Model loaded'); - } catch (exception) { - debugPrint( - 'Failed on loading your model to the TFLite interpreter: $exception'); - rethrow; - } - } -} - - - - - - -// import 'dart:developer'; -// import 'dart:io'; -// import 'package:flutter/foundation.dart'; -// import 'package:flutter/material.dart'; -// import 'package:tflite_flutter/tflite_flutter.dart'; -// import 'package:image/image.dart'; -// import 'modelprovider.dart'; - -// class PredictionProvider extends ChangeNotifier { -// bool _loading = true; -// bool get loading => _loading; -// List? _output; -// List? get output => _output; - -// Object? _objectoutput; -// Object? get objectoutput => _objectoutput; - -// late Interpreter _interpreter; -// final _modelFile = 'model/model_unquant.tflite'; -// final _vocabFile = 'labels.txt'; - -// Future prediction({required File image}) async { -// // await _loadModel(); -// await classifyImage(image); -// log('Prediction Done'); -// _loading = false; -// notifyListeners(); -// } - -// // classifyImage(File imageFile) async { -// // Interpreter interpreter = -// // await Interpreter.fromAsset(_modelFile, options: InterpreterOptions()); -// // var _inputShape = interpreter.getInputTensor(0).shape; -// // var _outputShape = interpreter.getOutputTensor(0).shape; -// // var _inputType = interpreter.getInputTensor(0).type; -// // var _outputType = interpreter.getOutputTensor(0).type; - -// // log(_inputShape.toString()); -// // log(_outputShape.toString()); -// // log(_inputType.toString()); -// // log(_outputType.toString()); -// // var input = [ -// // [1.23, 6.54, 7.81, 3.21, 2.22] -// // ]; - -// // // if output tensor shape [1,2] and type is float32 -// // var output = List.filled(1 * 2, 0).reshape([1, 2]); - -// // // inference -// // interpreter.run(input, output); - -// // // print the output -// // print(output); -// // } - -// Future classifyImage(File imageFile) async { -// // Load the TFLite model -// Interpreter interpreter = await Interpreter.fromAsset(_modelFile); -// var _inputShape = interpreter.getInputTensor(0).shape; -// var _outputShape = interpreter.getOutputTensor(0).shape; -// var _inputType = interpreter.getInputTensor(0).type; -// var _outputType = interpreter.getOutputTensor(0).type; - -// log(_inputShape.toString()); -// log(_outputShape.toString()); -// log(_inputType.toString()); -// log(_outputType.toString()); -// // Get the image bytes as a Uint8List -// Uint8List imageBytes = await imageFile.readAsBytes(); - -// // Load the image using the image package -// var image = decodeImage(imageBytes)!; - -// // Resize the image to 225x225 pixels -// var resizedImage = copyResize(image, width: 225, height: 225); - -// // Convert the resized image to a tensor -// var tensorImage = ByteConversionUtils.convertBytesToObject( -// resizedImage.getBytes(), TfLiteType.uint8, [1, 225, 225, 3]); - -// // Run the inference - -// interpreter.run(tensorImage, _objectoutput!); - -// // Get the top prediction -// // int topIndex = -// // _output![0].indexOf(_output![0].reduce((a, b) => a > b ? a : b)); - -// // String label = await getLabel(topIndex); - -// // // Get the confidence -// // double confidence = _output![0][topIndex]; -// log('message'); -// // Close the interpreter to free up resources -// interpreter.close(); - -// // Return the label and confidence -// // return '$label (${(confidence * 100).toStringAsFixed(1)}%)'; -// } - -// Future getLabel(int index) async { -// // Load the labels file -// String labels = await File('labels.txt').readAsString(); - -// // Split the labels by newline -// List labelList = labels.split('\n'); - -// // Return the label at the given index -// return labelList[index]; -// } -// } diff --git a/lib/providers/themeprovider.dart b/lib/providers/themeprovider.dart index 4058ebd..206b365 100644 --- a/lib/providers/themeprovider.dart +++ b/lib/providers/themeprovider.dart @@ -34,7 +34,9 @@ class ThemeProvider with ChangeNotifier { getSystemTheme(BuildContext context) { _isDarkTheme = - WidgetsBinding.instance.window.platformBrightness == Brightness.dark; + // WidgetsBinding.instance.window.platformBrightness == Brightness.dark; + WidgetsBinding.instance.platformDispatcher.platformBrightness == + Brightness.dark; notifyListeners(); } } diff --git a/lib/routes.dart b/lib/routes.dart index e2c4c2f..5e524e3 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'screens/doctors/doctorslist.dart'; -import 'screens/memmographyscreening/memmography.dart'; import 'screens/reminder/reminder.dart'; import 'screens/reminder/reminderlist.dart'; import 'widget/persistent_nav_bar.dart'; @@ -18,10 +17,6 @@ class RouteManager { return MaterialPageRoute( builder: (context) => const PersistentNavBar(), ); - case memmographyscreening: - return MaterialPageRoute( - builder: (context) => const MemmographyPrediction(), - ); case doctors: return MaterialPageRoute( builder: (context) => const DoctorsList(), diff --git a/lib/screens/auth/login.dart b/lib/screens/auth/login.dart index effe675..d2fe98f 100644 --- a/lib/screens/auth/login.dart +++ b/lib/screens/auth/login.dart @@ -1,3 +1,5 @@ +// ignore_for_file: use_build_context_synchronously + import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -189,7 +191,6 @@ class _LoginScreenState extends State { context, e.message!); } // Close the circular indicator dialog - // ignore: use_build_context_synchronously Navigator.pop(context); } }, diff --git a/lib/screens/auth/signup.dart b/lib/screens/auth/signup.dart index eb57f76..f5ef59a 100644 --- a/lib/screens/auth/signup.dart +++ b/lib/screens/auth/signup.dart @@ -1,3 +1,5 @@ +// ignore_for_file: use_build_context_synchronously + import 'dart:io'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/cupertino.dart'; @@ -305,12 +307,10 @@ class _SignupState extends State { password: confirmpassController.text.trim(), profilephoto: pickedimage!, ); - // ignore: use_build_context_synchronously Navigator.pop(context); } on FirebaseAuthException catch (e) { ResponsiveSnackbar.show(context, e.message!); } - // ignore: use_build_context_synchronously Navigator.pop(context); } }, diff --git a/lib/screens/memmographyscreening/memmography.dart b/lib/screens/memmographyscreening/memmography.dart deleted file mode 100644 index 1911e0c..0000000 --- a/lib/screens/memmographyscreening/memmography.dart +++ /dev/null @@ -1,321 +0,0 @@ -import 'dart:io'; -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/app_localizations.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; -import 'package:image_picker/image_picker.dart'; -import 'package:persistent_bottom_nav_bar/persistent_tab_view.dart'; -import 'package:provider/provider.dart'; - -import '../../const/consts.dart'; -import '../../providers/modelprovider.dart'; -import '../../providers/predictionprovider.dart'; -import '../../utils/utils.dart'; -import 'result.dart'; - -class MemmographyPrediction extends StatefulWidget { - const MemmographyPrediction({super.key}); - - @override - State createState() => _MemmographyPredictionState(); -} - -class _MemmographyPredictionState extends State { - ImagePicker picker = ImagePicker(); - File? pickedimage; - @override - void initState() { - super.initState(); - _showMammogramInfoDialog(context); - } - - @override - Widget build(BuildContext context) { - void pickImage() async { - try { - var image = await picker.pickImage(source: ImageSource.gallery); - if (image == null) return; - - setState(() { - pickedimage = File(image.path); - }); - } catch (error) { - ScaffoldMessenger.of(context).showSnackBar( - SnackBar( - content: Text(error.toString()), - ), - ); - } - } - - final size = MediaQuery.of(context).size; - return Scaffold( - appBar: AppBar( - title: Text(AppLocalizations.of(context)!.mammographyscreening), - // centerTitle: true, - ), - body: context.watch().isDownloading - ? Center( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - SpinKitDoubleBounce( - color: Theme.of(context).primaryColor, - ), - const SizedBox( - height: 10, - ), - Text( - AppLocalizations.of(context)!.mammographymodeldownloading, - style: TextStyle( - color: Theme.of(context).primaryColor, - ), - ) - ], - ), - ) - : Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Row( - // crossAxisAlignment: CrossAxisAlignment.start, - // mainAxisAlignment: MainAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Container( - height: 30, - width: 30, - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondary, - borderRadius: BorderRadius.circular( - Consts.DefaultBorderRadius)), - child: Container( - margin: const EdgeInsets.all(10), - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - shape: BoxShape.circle, - ), - ), - ), - ), - Expanded( - child: Utils(context).boldsentenceword( - text: AppLocalizations.of(context)!.mammographyNote( - AppLocalizations.of(context)!.mammogram, - ), - boldTextList: [ - { - 'text': AppLocalizations.of(context)!.mammogram, - 'url': '', - }, - ], - ), - ) - ], - ), - const SizedBox( - height: 10, - ), - Column( - children: [ - Container( - height: size.width * 0.7, - width: size.width * 0.7, - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondary, - borderRadius: - BorderRadius.circular(Consts.DefaultBorderRadius), - border: Border.all( - width: 2.0, - strokeAlign: BorderSide.strokeAlignOutside, - style: BorderStyle.solid, - color: Theme.of(context).primaryColor, - ), - ), - child: pickedimage == null - ? Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - AppLocalizations.of(context)!.waitingforimage, - style: TextStyle( - color: Theme.of(context).primaryColor, - fontSize: 18.0, - ), - ), - ElevatedButton.icon( - label: Text(AppLocalizations.of(context)! - .uploadimage), - onPressed: pickImage, - icon: const Icon(Icons.photo_camera_outlined), - ), - ], - ) - : ClipRRect( - borderRadius: BorderRadius.circular( - Consts.DefaultBorderRadius), - child: Image.file( - pickedimage!, - fit: BoxFit.cover, - ), - ), - ), - const SizedBox( - height: 10, - ), - pickedimage == null - ? GestureDetector( - onTap: () => Utils(context).showCustomDialog( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Container( - margin: const EdgeInsets.only( - top: 5.0, bottom: 5.0), - child: Text( - AppLocalizations.of(context)! - .mammogramHintTitle, - style: TextStyle( - fontSize: 18.0, - color: Theme.of(context).primaryColor, - fontWeight: FontWeight.bold, - ), - ), - ), - const SizedBox( - height: 10, - ), - ClipRRect( - borderRadius: BorderRadius.circular( - Consts.DefaultBorderRadius), - child: Image.asset( - 'assets/images/mammogram.jpeg', - ), - ), - const SizedBox( - height: 10, - ), - Text( - AppLocalizations.of(context)! - .mammogramHintBody, - textAlign: TextAlign.center, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 18, - ), - ), - const SizedBox( - height: 10, - ), - ], - ), - ), - ), - child: Utils(context).boldsentenceword( - text: AppLocalizations.of(context)!.whatis( - AppLocalizations.of(context)!.mammogram), - boldTextList: [ - { - 'text': - AppLocalizations.of(context)!.mammogram, - 'url': '', - }, - ], - ), - ) - : Column( - children: [ - ElevatedButton.icon( - label: Text( - AppLocalizations.of(context)!.changeimage, - ), - onPressed: pickImage, - icon: const Icon(Icons.photo_camera_outlined), - ), - ElevatedButton.icon( - onPressed: () async { - await context - .read() - .prediction( - image: pickedimage!, - ); - // ignore: use_build_context_synchronously - await PersistentNavBarNavigator.pushNewScreen( - context, - screen: const PredictionResult(), - withNavBar: - false, // OPTIONAL VALUE. True by default. - pageTransitionAnimation: - PageTransitionAnimation.cupertino, - ); - }, - icon: const Icon( - Icons.description_outlined, - ), - label: Text(AppLocalizations.of(context)! - .getpredictionresultbutton), - ), - ], - ), - ], - ), - ], - ), - ); - } - - Future _showMammogramInfoDialog( - BuildContext context, - ) async { - WidgetsBinding.instance.addPostFrameCallback((_) { - Utils(context).showCustomDialog( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Container( - margin: const EdgeInsets.only(top: 5.0, bottom: 5.0), - child: Text( - AppLocalizations.of(context)!.mammogramHintTitle, - style: TextStyle( - fontSize: 18.0, - color: Theme.of(context).primaryColor, - fontWeight: FontWeight.bold, - ), - ), - ), - const SizedBox( - height: 10, - ), - ClipRRect( - borderRadius: BorderRadius.circular(Consts.DefaultBorderRadius), - child: Image.asset( - 'assets/images/mammogram.jpeg', - ), - ), - const SizedBox( - height: 10, - ), - Text( - AppLocalizations.of(context)!.mammogramHintBody, - textAlign: TextAlign.center, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 18, - ), - ), - const SizedBox( - height: 10, - ), - ], - ), - ), - ); - }); - } -} diff --git a/lib/screens/memmographyscreening/result.dart b/lib/screens/memmographyscreening/result.dart deleted file mode 100644 index 5ff25f7..0000000 --- a/lib/screens/memmographyscreening/result.dart +++ /dev/null @@ -1,249 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/app_localizations.dart'; -import 'package:intl/intl.dart'; -import 'package:mothercare/providers/authprovider.dart'; -import 'package:provider/provider.dart'; -import 'package:syncfusion_flutter_gauges/gauges.dart'; - -import '../../const/consts.dart'; -import '../../providers/pdfgenerateprovider.dart'; -import '../../providers/predictionprovider.dart'; -import '../../utils/utils.dart'; - -class PredictionResult extends StatelessWidget { - const PredictionResult({ - super.key, - }); - - @override - Widget build(BuildContext context) { - return Consumer( - builder: (context, value, child) { - var predictionLabel = value.output![0]['label']; - var predictionConfidence = value.output![0]['confidence'] * 100; - return Scaffold( - appBar: AppBar( - title: Text( - AppLocalizations.of(context)!.predictionresult, - ), - ), - body: value.loading - ? Container( - alignment: Alignment.center, - child: const CircularProgressIndicator.adaptive(), - ) - : Padding( - padding: const EdgeInsets.all(0.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Row( - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Container( - height: 30, - width: 30, - decoration: BoxDecoration( - color: - Theme.of(context).colorScheme.secondary, - borderRadius: BorderRadius.circular( - Consts.DefaultBorderRadius)), - child: Container( - margin: const EdgeInsets.all(10), - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - shape: BoxShape.circle, - ), - ), - ), - ), - Expanded( - child: Utils(context).boldsentenceword( - text: - AppLocalizations.of(context)!.mammographyNote( - AppLocalizations.of(context)!.mammogram, - ), - boldTextList: [ - { - 'text': - AppLocalizations.of(context)!.mammogram, - 'url': '', - }, - ], - ), - ) - ], - ), - SfRadialGauge( - enableLoadingAnimation: true, - animationDuration: 4500, - axes: [ - RadialAxis( - interval: 10, - startAngle: 90, - endAngle: 90, - showTicks: false, - showLabels: false, - axisLineStyle: const AxisLineStyle( - thickness: 30, - // cornerStyle: CornerStyle.bothCurve, - // thicknessUnit: GaugeSizeUnit.logicalPixel, - // gradient: SweepGradient( - // colors: [ - // Colors.green, - // Colors.yellow, - // Colors.red, - // ], - // stops: [0.4, 0.7, 1], - // ), - ), - // ranges: [ - // GaugeRange( - // startValue: 0, - // endValue: 40, - // color: Colors.green, - // startWidth: 10, - // endWidth: 10), - // GaugeRange( - // startValue: 40, - // endValue: 70, - // color: Colors.orange, - // startWidth: 10, - // endWidth: 10), - // GaugeRange( - // startValue: 70, - // endValue: 100, - // color: Colors.red, - // startWidth: 10, - // endWidth: 10, - // ), - // ], - pointers: [ - RangePointer( - // value: double.parse( - // predictionConfidence.toString(), - // ), - value: predictionConfidence, - width: 30, - gradient: const SweepGradient( - colors: [ - Consts.primaryColor, - Consts.darkprimaryColor, - ], - stops: [ - 0.4, - 1, - ], - ), - enableAnimation: true, - cornerStyle: CornerStyle.bothCurve, - ), - MarkerPointer( - enableAnimation: true, - markerType: MarkerType.circle, - color: - Theme.of(context).colorScheme.secondary, - markerHeight: 20, - markerWidth: 20, - // value: double.parse( - // predictionConfidence - // .toStringAsFixed(1), - // ) - - // 2, - value: predictionConfidence - 2, - ), - ], - annotations: [ - GaugeAnnotation( - widget: Column( - mainAxisAlignment: - MainAxisAlignment.center, - crossAxisAlignment: - CrossAxisAlignment.center, - children: [ - Row( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Text( - Utils(context).formatPersentage( - number: predictionConfidence), - style: const TextStyle( - fontSize: 40, - fontWeight: FontWeight.bold, - ), - ), - const Text( - '%', - style: TextStyle( - fontSize: 18, - fontWeight: FontWeight.bold, - ), - ), - ], - ), - Text( - Utils(context).translateText( - string: predictionLabel, - ), - style: const TextStyle( - fontSize: 18, - ), - ), - ], - ), - // angle: 270, - positionFactor: 0.1, - ) - ]) - ]), - ElevatedButton.icon( - onPressed: () => - context.read().generateReport( - patientName: - "${context.read().user!.firstName} ${context.read().user!.lastName}", - patientAge: calculateYears(context - .read() - .user! - .dateofbirth), - predictionconfidence: - predictionConfidence.toStringAsFixed(1), - predictionresult: predictionLabel, - ), - icon: const Icon( - Icons.save_outlined, - ), - label: Text( - AppLocalizations.of(context)!.generatePdfButton, - ), - ), - ], - ), - ), - ); - }, - ); - } - - String calculateYears(String date) { - DateTime currentDate = DateTime.now(); - - DateFormat dateFormat = DateFormat('EEE, dd MMMM yyyy'); - DateTime parsedDate = dateFormat.parse(date); - - int years = currentDate.year - parsedDate.year; - - // Check if the current date has passed the birth date this year - if (currentDate.month < parsedDate.month || - (currentDate.month == parsedDate.month && - currentDate.day < parsedDate.day)) { - years--; - } - - return years.toString(); - } -} diff --git a/lib/utils/savepdf_filemobile.dart b/lib/utils/savepdf_filemobile.dart deleted file mode 100644 index dfaf7ce..0000000 --- a/lib/utils/savepdf_filemobile.dart +++ /dev/null @@ -1,36 +0,0 @@ -// ignore_for_file: depend_on_referenced_packages - -import 'dart:io'; -import 'package:better_open_file/better_open_file.dart'; -import 'package:path_provider/path_provider.dart' as path_provider; -import 'package:path_provider_platform_interface/path_provider_platform_interface.dart'; - -///To save the pdf file in the device -Future saveAndLaunchFile(List bytes, String fileName) async { - //Get the storage folder location using path_provider package. - String? path; - if (Platform.isAndroid || - Platform.isIOS || - Platform.isLinux || - Platform.isWindows) { - final Directory directory = - await path_provider.getApplicationSupportDirectory(); - path = directory.path; - } else { - path = await PathProviderPlatform.instance.getApplicationSupportPath(); - } - final File file = - File(Platform.isWindows ? '$path\\$fileName' : '$path/$fileName'); - await file.writeAsBytes(bytes, flush: true); - if (Platform.isAndroid || Platform.isIOS) { - //Launch the file (used open_file package) - await OpenFile.open('$path/$fileName'); - } else if (Platform.isWindows) { - await Process.run('start', ['$path\\$fileName'], runInShell: true); - } else if (Platform.isMacOS) { - await Process.run('open', ['$path/$fileName'], runInShell: true); - } else if (Platform.isLinux) { - await Process.run('xdg-open', ['$path/$fileName'], - runInShell: true); - } -} diff --git a/lib/utils/savepdf_fileweb.dart b/lib/utils/savepdf_fileweb.dart deleted file mode 100644 index 99d117c..0000000 --- a/lib/utils/savepdf_fileweb.dart +++ /dev/null @@ -1,14 +0,0 @@ -///Dart imports -import 'dart:async'; -import 'dart:convert'; -// ignore: avoid_web_libraries_in_flutter -import 'dart:html'; - -///To save the pdf file in the device -Future saveAndLaunchFile(List bytes, String fileName) async { - AnchorElement( - href: - 'data:application/octet-stream;charset=utf-16le;base64,${base64.encode(bytes)}') - ..setAttribute('download', fileName) - ..click(); -} diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 8fafc45..090e39e 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -1,3 +1,5 @@ +// ignore_for_file: use_build_context_synchronously + import 'package:flutter/gestures.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter/cupertino.dart'; @@ -157,22 +159,6 @@ class Utils { return f.format(number); } -//TODO: Translate prediction output Text is not working - String translateText({required String string}) { - // log(string); - var input = string; - final bengaliTranslation = Intl.message( - input, - locale: context.read().languageCode, - // args: [], - // desc: 'Cancerers', - ); - - debugPrint( - '${context.read().languageCode}: $bengaliTranslation'); - return bengaliTranslation; - } - String calculateAge({ required String dateOfBirth, }) { diff --git a/lib/widget/drawer_widget.dart b/lib/widget/drawer_widget.dart index 1648380..e4dedd6 100644 --- a/lib/widget/drawer_widget.dart +++ b/lib/widget/drawer_widget.dart @@ -8,7 +8,6 @@ import 'package:provider/provider.dart'; import '../models/usermodel.dart'; import '../providers/authprovider.dart'; import '../screens/doctors/doctorslist.dart'; -import '../screens/memmographyscreening/memmography.dart'; import '../screens/reminder/reminderlist.dart'; import '../screens/settings/settings.dart'; import '../utils/utils.dart'; @@ -75,18 +74,6 @@ class DrawerWidget extends StatelessWidget { // context.read().deleteModel(); // }, // ), - _buildListtile( - iconData: Icons.insights_outlined, - tiletitle: AppLocalizations.of(context)!.mammographyscreening, - onTap: () { - PersistentNavBarNavigator.pushNewScreen( - context, - screen: const MemmographyPrediction(), - withNavBar: false, // OPTIONAL VALUE. True by default. - pageTransitionAnimation: PageTransitionAnimation.cupertino, - ); - }, - ), _buildListtile( iconData: LineIcons.calendarAlt, tiletitle: AppLocalizations.of(context)!.reminders, diff --git a/pubspec.lock b/pubspec.lock index 98cd7a0..3be9851 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: a742f71d7f3484253a623b30e19256aa4668ecbb3de6ad1beb0bcf8d4777ecd8 + sha256: "1a5e13736d59235ce0139621b4bbe29bc89839e202409081bc667eb3cd20674c" url: "https://pub.dev" source: hosted - version: "1.3.3" + version: "1.3.5" animated_checkmark: dependency: transitive description: @@ -117,10 +117,10 @@ packages: dependency: transitive description: name: cli_util - sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c" + sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7 url: "https://pub.dev" source: hosted - version: "0.3.5" + version: "0.4.0" clock: dependency: transitive description: @@ -133,34 +133,34 @@ packages: dependency: "direct main" description: name: cloud_firestore - sha256: "988351d4fcc58c47578d95d014018888b2ce7a228f84ce322fea4a127707a0d4" + sha256: "0ff0baec167e308df192398dbd81ec13c1799635885c6aa6ed9ab8b5ed61f52c" url: "https://pub.dev" source: hosted - version: "4.8.1" + version: "4.9.1" cloud_firestore_platform_interface: dependency: transitive description: name: cloud_firestore_platform_interface - sha256: b6652ce95507e604f00cb0c9c9be2363d21746e82667f2f3d61edf2d33cad3bf + sha256: "5749b81aea93afdce220e02d34369162010d210011054ac494b2c38c4e9ebeb7" url: "https://pub.dev" source: hosted - version: "5.15.1" + version: "5.16.0" cloud_firestore_web: dependency: transitive description: name: cloud_firestore_web - sha256: "22d02595eb7a304c0f1b4a717e78cc054522e8f237eb7b1122886f93130f3f7a" + sha256: fef99ad0599e983092adb1bb01f14a596dba601a7a8efaaffd7b2721d64e2c51 url: "https://pub.dev" source: hosted - version: "3.6.1" + version: "3.7.0" collection: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.17.2" convert: dependency: transitive description: @@ -197,18 +197,18 @@ packages: dependency: "direct main" description: name: cupertino_icons - sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" day_night_time_picker: dependency: "direct main" description: name: day_night_time_picker - sha256: "7bdad72e01b52cd6555d99ffe0b8e2b8854c60480bdc5bfadcc05219983794fb" + sha256: f7606d140a05fd22b2b37485371d6342ef1043d15d5b0ad254a3776d1ea81f80 url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.0+1" dbus: dependency: transitive description: @@ -221,18 +221,18 @@ packages: dependency: transitive description: name: dots_indicator - sha256: "58b6a365744aa62aa1b70c4ea29e5106fbe064f5edaf7e9652e9b856edbfd9bb" + sha256: f1599baa429936ba87f06ae5f2adc920a367b16d08f74db58c3d0f6e93bcdb5c url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "2.1.2" easy_stepper: dependency: "direct main" description: name: easy_stepper - sha256: "34f70371eac024658c7c782b63995939a4592f3608be3cd8dc204411c5c5a6a5" + sha256: "4df1e4e5bb979bd4ede9e4162e47e68133eaada74885424e4f7cec3f144c4b3b" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.3" fake_async: dependency: transitive description: @@ -293,34 +293,34 @@ packages: dependency: "direct main" description: name: firebase_auth - sha256: f693c0aa998b1101453878951b171b69f0db5199003df1c943b33493a1de7917 + sha256: "6d9be853426ab686d68076b8007ac29b2c31e7d549444a45b5c3fe1abc249fb0" url: "https://pub.dev" source: hosted - version: "4.6.3" + version: "4.9.0" firebase_auth_platform_interface: dependency: transitive description: name: firebase_auth_platform_interface - sha256: "689ae048b78ad088ba31acdec45f5badb56201e749ed8b534947a7303ddb32aa" + sha256: "2946cfdc17f925fa9771dd0ba3ce9dd2d019100a8685d0557c161f7786ea9b14" url: "https://pub.dev" source: hosted - version: "6.15.3" + version: "6.18.0" firebase_auth_web: dependency: transitive description: name: firebase_auth_web - sha256: f35d637a1707afd51f30090bb5234b381d5071ccbfef09b8c393bc7c65e440cd + sha256: d8972d754702a3f4881184706b8056e2837d0dae91613a43b988c960b8e0d988 url: "https://pub.dev" source: hosted - version: "5.5.3" + version: "5.8.0" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: a4a99204da264a0aa9d54a332ea0315ce7b0768075139c77abefe98093dd98be + sha256: c78132175edda4bc532a71e01a32964e4b4fcf53de7853a422d96dac3725f389 url: "https://pub.dev" source: hosted - version: "2.14.0" + version: "2.15.1" firebase_core_platform_interface: dependency: transitive description: @@ -333,50 +333,50 @@ packages: dependency: transitive description: name: firebase_core_web - sha256: "0fd5c4b228de29b55fac38aed0d9e42514b3d3bd47675de52bf7f8fccaf922fa" + sha256: "4cf4d2161530332ddc3c562f19823fb897ff37a9a774090d28df99f47370e973" url: "https://pub.dev" source: hosted - version: "2.6.0" + version: "2.7.0" firebase_ml_model_downloader: dependency: "direct main" description: name: firebase_ml_model_downloader - sha256: c92fda8102184f5e7da16434ca06d856047a6e2be7d0d7a969d05b0b7d336be3 + sha256: "2c0349911a964f322ae7e3bce0cbbc71f358e670fc6f34aba63812db33bf26f3" url: "https://pub.dev" source: hosted - version: "0.2.3+3" + version: "0.2.3+5" firebase_ml_model_downloader_platform_interface: dependency: transitive description: name: firebase_ml_model_downloader_platform_interface - sha256: d4cc095084d489b5bc225b8b0e2e1d508f6ea7a154028194d567742ced1c2894 + sha256: "52949b3d103356befbcb8b413c9b264493c6c9d6a75399b65b550eca2fb2621f" url: "https://pub.dev" source: hosted - version: "0.1.4+3" + version: "0.1.4+5" firebase_storage: dependency: "direct main" description: name: firebase_storage - sha256: e9e889adc839a1a68e48762457bd91e247c3b02e4a065842037c039ebb51fa27 + sha256: "11423ac63c1ec566069c80b1d01bc3c9e12a8f106bbc4ba77fa150afb88488a3" url: "https://pub.dev" source: hosted - version: "11.2.3" + version: "11.2.6" firebase_storage_platform_interface: dependency: transitive description: name: firebase_storage_platform_interface - sha256: be0f4254cae3ccaefd5d1435b82c1fa3bda33187387b241c55b27d7516ea9b93 + sha256: "2a8ee7b8a06ee5201f9a116db6972ba0020e3a314a5065acdcb616f4d6c99771" url: "https://pub.dev" source: hosted - version: "4.4.3" + version: "4.4.5" firebase_storage_web: dependency: transitive description: name: firebase_storage_web - sha256: a5aae39af27ecce997ea53e61a35e0a61b3d33f3c247d74748de0bc40f1c5c5a + sha256: bd110daa180dc9c89abb490c8a330571e103291b348358d320f5b20a61cd46fc url: "https://pub.dev" source: hosted - version: "3.6.3" + version: "3.6.6" flexi_chip: dependency: transitive description: @@ -402,10 +402,10 @@ packages: dependency: transitive description: name: flutter_cache_manager - sha256: "32cd900555219333326a2d0653aaaf8671264c29befa65bbd9856d204a4c9fb3" + sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "3.3.1" flutter_keyboard_visibility: dependency: transitive description: @@ -458,26 +458,26 @@ packages: dependency: "direct dev" description: name: flutter_launcher_icons - sha256: ce0e501cfc258907842238e4ca605e74b7fd1cdf04b3b43e86c43f3e40a1592c + sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" url: "https://pub.dev" source: hosted - version: "0.11.0" + version: "0.13.1" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.3" flutter_local_notifications: dependency: "direct main" description: name: flutter_local_notifications - sha256: "812791d43ccfc1b443a0d39fa02a206fc228c597e28ff9337e09e3ca8d370391" + sha256: "3002092e5b8ce2f86c3361422e52e6db6776c23ee21e0b2f71b892bf4259ef04" url: "https://pub.dev" source: hosted - version: "14.1.1" + version: "15.1.1" flutter_local_notifications_linux: dependency: transitive description: @@ -503,10 +503,10 @@ packages: dependency: "direct main" description: name: flutter_native_splash - sha256: "6777a3abb974021a39b5fdd2d46a03ca390e03903b6351f21d10e7ecc969f12d" + sha256: ecff62b3b893f2f665de7e4ad3de89f738941fcfcaaba8ee601e749efafa4698 url: "https://pub.dev" source: hosted - version: "2.2.16" + version: "2.3.2" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -552,14 +552,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_tflite: - dependency: "direct main" - description: - name: flutter_tflite - sha256: "0d6b622af0fe90d92bd4d9bd28b98c3b213217f36ccb7b444d7104a742b03363" - url: "https://pub.dev" - source: hosted - version: "1.0.1" flutter_web_plugins: dependency: transitive description: flutter @@ -585,10 +577,10 @@ packages: dependency: "direct main" description: name: http - sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" url: "https://pub.dev" source: hosted - version: "0.13.6" + version: "1.1.0" http_parser: dependency: transitive description: @@ -601,42 +593,42 @@ packages: dependency: transitive description: name: image - sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" + sha256: a72242c9a0ffb65d03de1b7113bc4e189686fc07c7147b8b41811d0dd0e0d9bf url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "4.0.17" image_picker: dependency: "direct main" description: name: image_picker - sha256: b6951e25b795d053a6ba03af5f710069c99349de9341af95155d52665cb4607c + sha256: "7d7f2768df2a8b0a3cefa5ef4f84636121987d403130e70b17ef7e2cf650ba84" url: "https://pub.dev" source: hosted - version: "0.8.9" + version: "1.0.4" image_picker_android: dependency: transitive description: name: image_picker_android - sha256: "1ec6830289f5b6aeff3aa8239ea737c71950178dda389342dc2215adb06b4bd8" + sha256: d32a997bcc4ee135aebca8e272b7c517927aa65a74b9c60a81a2764ef1a0462d url: "https://pub.dev" source: hosted - version: "0.8.6+20" + version: "0.8.7+5" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - sha256: "98f50d6b9f294c8ba35e25cc0d13b04bfddd25dbc8d32fa9d566a6572f2c081c" + sha256: "869fe8a64771b7afbc99fc433a5f7be2fea4d1cb3d7c11a48b6b579eb9c797f0" url: "https://pub.dev" source: hosted - version: "2.1.12" + version: "2.2.0" image_picker_ios: dependency: transitive description: name: image_picker_ios - sha256: d779210bda268a03b57e923fb1e410f32f5c5e708ad256348bcbf1f44f558fd0 + sha256: c5538cacefacac733c724be7484377923b476216ad1ead35a0d2eadcdc0fc497 url: "https://pub.dev" source: hosted - version: "0.8.7+4" + version: "0.8.8+2" image_picker_linux: dependency: transitive description: @@ -673,18 +665,18 @@ packages: dependency: "direct main" description: name: intl - sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6 + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" url: "https://pub.dev" source: hosted - version: "0.18.0" + version: "0.18.1" introduction_screen: dependency: "direct main" description: name: introduction_screen - sha256: f39be426026785b8fea4ed93e226e7fc28ef49a4c78c3f86c958bae26dabef00 + sha256: ef5a5479a8e06a84b9a7eff16c698b9b82f70cd1b6203b264bc3686f9bfb77e2 url: "https://pub.dev" source: hosted - version: "3.1.9" + version: "3.1.11" js: dependency: transitive description: @@ -705,10 +697,10 @@ packages: dependency: "direct main" description: name: line_icons - sha256: "609ce366e38fb046199b7b8f627a703ca4e07018216f4e60d2d7027e7f666b71" + sha256: "249d781d922f5437ac763d9c8f5a02cf5b499a6dc3f85e4b92e074cff0a932ab" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.3" lints: dependency: transitive description: @@ -729,18 +721,18 @@ packages: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.5.0" meta: dependency: transitive description: @@ -749,6 +741,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + mime: + dependency: transitive + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" + source: hosted + version: "1.0.4" nested: dependency: transitive description: @@ -769,10 +769,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: ceb027f6bc6a60674a233b4a90a7658af1aebdea833da0b5b53c1e9821a78c7b + sha256: "6ff267fcd9d48cb61c8df74a82680e8b82e940231bb5f68356672fde0397334a" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.0" package_info_plus_platform_interface: dependency: transitive description: @@ -801,98 +801,90 @@ packages: dependency: "direct main" description: name: path_provider - sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2" + sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa url: "https://pub.dev" source: hosted - version: "2.0.15" + version: "2.1.1" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86" + sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1" url: "https://pub.dev" source: hosted - version: "2.0.27" + version: "2.2.0" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "1995d88ec2948dac43edf8fe58eb434d35d22a2940ecee1a9fefcd62beee6eb3" + sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.1" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: ffbb8cc9ed2c9ec0e4b7a541e56fd79b138e8f47d2fb86815f15358a349b3b57 + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted - version: "2.1.11" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.1.1" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: "1cb68ba4cd3a795033de62ba1b7b4564dace301f952de6bfb3cd91b202b6ee96" - url: "https://pub.dev" - source: hosted - version: "2.1.7" - pedantic: - dependency: transitive - description: - name: pedantic - sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "2.2.1" permission_handler: dependency: "direct main" description: name: permission_handler - sha256: "1b6b3e73f0bcbc856548bbdfb1c33084a401c4f143e220629a9055233d76c331" + sha256: "63e5216aae014a72fe9579ccd027323395ce7a98271d9defa9d57320d001af81" url: "https://pub.dev" source: hosted - version: "10.3.0" + version: "10.4.3" permission_handler_android: dependency: transitive description: name: permission_handler_android - sha256: "8f6a95ccbca13766882f95d32684d7c9bfe6c45650c32bedba948ef1c6a4ddf7" + sha256: d74e77a5ecd38649905db0a7d05ef16bed42ff263b9efb73ed794317c5764ec3 url: "https://pub.dev" source: hosted - version: "10.2.3" + version: "10.3.4" permission_handler_apple: dependency: transitive description: name: permission_handler_apple - sha256: "08dcb6ce628ac0b257e429944b4c652c2a4e6af725bdf12b498daa2c6b2b1edb" + sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5" url: "https://pub.dev" source: hosted - version: "9.1.0" + version: "9.1.4" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - sha256: de20a5c3269229c1ae2e5a6b822f6cb59578b23e8255c93fbeebfc82116e6b11 + sha256: "7c6b1500385dd1d2ca61bb89e2488ca178e274a69144d26bbd65e33eae7c02a9" url: "https://pub.dev" source: hosted - version: "3.10.0" + version: "3.11.3" permission_handler_windows: dependency: transitive description: name: permission_handler_windows - sha256: f67cab14b4328574938ecea2db3475dad7af7ead6afab6338772c5f88963e38b + sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098 url: "https://pub.dev" source: hosted - version: "0.1.2" + version: "0.1.3" persistent_bottom_nav_bar: dependency: "direct main" description: @@ -949,14 +941,6 @@ packages: url: "https://pub.dev" source: hosted version: "6.0.5" - quiver: - dependency: transitive - description: - name: quiver - sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 - url: "https://pub.dev" - source: hosted - version: "3.2.1" random_avatar: dependency: "direct main" description: @@ -985,10 +969,10 @@ packages: dependency: "direct main" description: name: shared_preferences - sha256: "396f85b8afc6865182610c0a2fc470853d56499f75f7499e2a73a9f0539d23d0" + sha256: b7f41bad7e521d205998772545de63ff4e6c97714775902c199353f8bf1511ac url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.2.1" shared_preferences_android: dependency: transitive description: @@ -1017,10 +1001,10 @@ packages: dependency: transitive description: name: shared_preferences_platform_interface - sha256: fb5cf25c0235df2d0640ac1b1174f6466bd311f621574997ac59018a6664548d + sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.1" shared_preferences_web: dependency: transitive description: @@ -1054,10 +1038,10 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" sqflite: dependency: transitive description: @@ -1102,34 +1086,26 @@ packages: dependency: transitive description: name: syncfusion_flutter_core - sha256: "952f5ee970bc3fba2db95a8dac71a295d9a70ad2c0993c7279e3a883c3e1459f" + sha256: "2baf60cd245a21a7069f036bbca1ca222633d38f57748e133da97a305712627c" url: "https://pub.dev" source: hosted - version: "22.1.34" + version: "22.2.11" syncfusion_flutter_datepicker: dependency: "direct main" description: name: syncfusion_flutter_datepicker - sha256: "0325a9857f1dffd5ed323d1c80909637317dd53fbbc1e1b5df8ba08dbfcb2628" + sha256: c8f5b1f08bd4a0e7be409337540b26a5ab702a72fa03532433f8169a19e8c85b url: "https://pub.dev" source: hosted - version: "22.1.34" + version: "22.2.11" syncfusion_flutter_gauges: dependency: "direct main" description: name: syncfusion_flutter_gauges - sha256: "623c61387a425755819a659bb20b64845328bdbb60130c13c37896a7f61db8a7" + sha256: c086f17e84452e809b12f9832763ec4cea347b9f6e1e662a0e8addabca6cc2e5 url: "https://pub.dev" source: hosted - version: "22.1.34" - syncfusion_flutter_pdf: - dependency: "direct main" - description: - name: syncfusion_flutter_pdf - sha256: fd9b3dd2fde35be9bd61b7b22145e39f77b06bde65ae549d37669a61f2b0c8d1 - url: "https://pub.dev" - source: hosted - version: "22.1.34" + version: "22.2.11" synchronized: dependency: transitive description: @@ -1150,18 +1126,10 @@ packages: dependency: transitive description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb - url: "https://pub.dev" - source: hosted - version: "0.5.1" - tflite_flutter: - dependency: "direct main" - description: - name: tflite_flutter - sha256: d5acf30411b6a4ee299be25bad5a44e7fc103231fefaecb1c27f42df48251eb9 + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" url: "https://pub.dev" source: hosted - version: "0.10.1" + version: "0.6.0" timezone: dependency: "direct main" description: @@ -1190,10 +1158,10 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 + sha256: "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27" url: "https://pub.dev" source: hosted - version: "6.1.11" + version: "6.1.14" url_launcher_android: dependency: transitive description: @@ -1290,6 +1258,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + web: + dependency: transitive + description: + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" + source: hosted + version: "0.1.4-beta" widget_event: dependency: transitive description: @@ -1331,5 +1307,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.0.5 <4.0.0" + dart: ">=3.1.0-185.0.dev <4.0.0" flutter: ">=3.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index c415e77..74d3e4a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -33,50 +33,47 @@ dependencies: cached_network_image: ^3.2.3 carousel_slider: ^4.2.1 chips_choice: ^3.0.0 - cloud_firestore: ^4.8.1 - cupertino_icons: ^1.0.5 - day_night_time_picker: ^1.3.0 - easy_stepper: ^0.7.2 - firebase_auth: ^4.6.3 - firebase_core: ^2.14.0 - firebase_ml_model_downloader: ^0.2.3+3 - firebase_storage: ^11.2.3 + cloud_firestore: ^4.9.1 + cupertino_icons: ^1.0.6 + day_night_time_picker: ^1.3.0+1 + easy_stepper: ^0.7.3 + firebase_auth: ^4.9.0 + firebase_core: ^2.15.1 + firebase_ml_model_downloader: ^0.2.3+5 + firebase_storage: ^11.2.6 flutter: sdk: flutter - flutter_local_notifications: ^14.1.1 + flutter_local_notifications: ^15.1.1 flutter_localizations: sdk: flutter - flutter_native_splash: ^2.2.16 + flutter_native_splash: ^2.3.2 flutter_rating_bar: ^4.0.1 flutter_spinkit: ^5.2.0 flutter_statusbarcolor_ns: ^0.5.0 flutter_svg: ^2.0.7 - flutter_tflite: ^1.0.1 form_field_validator: ^1.1.0 - http: ^0.13.6 - image_picker: ^0.8.9 + http: ^1.1.0 + image_picker: ^1.0.4 intl: ^0.18.0 - introduction_screen: ^3.1.9 - line_icons: ^2.0.1 - package_info_plus: ^4.0.2 - path_provider: ^2.0.15 - permission_handler: ^10.3.0 + introduction_screen: ^3.1.11 + line_icons: ^2.0.3 + package_info_plus: ^4.1.0 + path_provider: ^2.1.1 + permission_handler: ^10.4.3 persistent_bottom_nav_bar: ^5.0.2 provider: ^6.0.5 random_avatar: ^0.0.8 readmore: ^2.2.0 - shared_preferences: ^2.1.2 + shared_preferences: ^2.2.1 shimmer: ^3.0.0 - syncfusion_flutter_datepicker: ^22.1.34 - syncfusion_flutter_gauges: ^22.1.34 - syncfusion_flutter_pdf: ^22.1.34 - tflite_flutter: ^0.10.1 + syncfusion_flutter_datepicker: ^22.2.11 + syncfusion_flutter_gauges: ^22.2.11 timezone: ^0.9.2 - url_launcher: ^6.1.11 + url_launcher: ^6.1.14 dev_dependencies: - flutter_launcher_icons: ^0.11.0 - flutter_lints: ^2.0.1 + flutter_launcher_icons: ^0.13.1 + flutter_lints: ^2.0.3 flutter_test: sdk: flutter flutter_icons: @@ -126,7 +123,6 @@ flutter: # To add assets to your application, add an assets section, like this: assets: - - assets/model/ - assets/images/ - assets/ # An image asset can refer to one or more resolution-specific "variants", see