diff --git a/android/app/build.gradle b/android/app/build.gradle index 59f0f344..e8edcc6e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion 34 signingConfigs { release { @@ -49,7 +49,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.hmg.hmgDr" minSdkVersion 21 - targetSdkVersion 30 + targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -59,7 +59,8 @@ android { buildTypes { release { // TODO: Add your own signing config for the release build. - signingConfig signingConfigs.release + signingConfig signingConfigs.debug + } debug { @@ -90,6 +91,8 @@ flutter { source '../..' } + + dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.1.0' @@ -112,5 +115,8 @@ dependencies { implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0' implementation 'com.google.firebase:firebase-analytics:17.4.1' + implementation 'com.android.support:multidex:2.0.1' + } -apply plugin: 'com.google.gms.google-services' \ No newline at end of file + +apply plugin: 'com.google.gms.google-services' diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 9cd98ee3..d6d2e9c7 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -39,6 +39,7 @@ android:name=".MainActivity" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" + android:exported="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:windowSoftInputMode="adjustResize"> diff --git a/android/build.gradle b/android/build.gradle index ae74fcf6..39833431 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,14 +1,14 @@ buildscript { - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.8.21' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.3' + classpath 'com.android.tools.build:gradle:7.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.google.gms:google-services:4.3.3' + classpath 'com.google.gms:google-services:4.3.14' } } @@ -31,6 +31,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/android/gradle.properties b/android/gradle.properties index 9c0729c9..ef383926 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ -android.enableR8=true +#android.enableR8=true android.useAndroidX=true android.enableJetifier=true org.gradle.jvmargs=-Xmx4608m diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index ed1a787b..8049c684 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 3c58fe30..41bc18c9 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -280,7 +280,7 @@ "${BUILT_PRODUCTS_DIR}/DKPhotoGallery/DKPhotoGallery.framework", "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", "${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework", - "${BUILT_PRODUCTS_DIR}/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.framework", "${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework", "${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework", "${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework", @@ -301,12 +301,11 @@ "${BUILT_PRODUCTS_DIR}/flutter_inappwebview/flutter_inappwebview.framework", "${BUILT_PRODUCTS_DIR}/flutter_keyboard_visibility/flutter_keyboard_visibility.framework", "${BUILT_PRODUCTS_DIR}/fluttertoast/fluttertoast.framework", - "${BUILT_PRODUCTS_DIR}/hexcolor/hexcolor.framework", - "${BUILT_PRODUCTS_DIR}/local_auth/local_auth.framework", + "${BUILT_PRODUCTS_DIR}/local_auth_ios/local_auth_ios.framework", "${BUILT_PRODUCTS_DIR}/maps_launcher/maps_launcher.framework", "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", - "${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework", - "${BUILT_PRODUCTS_DIR}/shared_preferences_ios/shared_preferences_ios.framework", + "${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework", + "${BUILT_PRODUCTS_DIR}/shared_preferences_foundation/shared_preferences_foundation.framework", "${BUILT_PRODUCTS_DIR}/speech_to_text/speech_to_text.framework", "${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework", "${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework", @@ -322,7 +321,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKPhotoGallery.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreDiagnostics.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreInternal.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework", @@ -343,12 +342,11 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_inappwebview.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_keyboard_visibility.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/fluttertoast.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hexcolor.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth_ios.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/maps_launcher.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_ios.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_ios.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_foundation.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/speech_to_text.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework", diff --git a/lib/core/service/authentication_service.dart b/lib/core/service/authentication_service.dart index 6e2ceb9a..45c06ea9 100644 --- a/lib/core/service/authentication_service.dart +++ b/lib/core/service/authentication_service.dart @@ -1,4 +1,3 @@ -import 'dart:js_interop'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/auth/activation_Code_req_model.dart'; diff --git a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart index ea91454c..70b7254c 100644 --- a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart @@ -18,8 +18,8 @@ import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; -import 'package:hijri/hijri_calendar.dart'; import 'package:intl/intl.dart'; +import 'package:jhijri_picker/_src/_jWidgets.dart'; import 'package:provider/provider.dart'; import 'CustomEditableText.dart'; @@ -29,16 +29,22 @@ class RegisterConfirmationPatientPage extends StatefulWidget { final PatiantInformtion? patient; final PatientRegistrationViewModel? model; - const RegisterConfirmationPatientPage({Key? key, this.operationReportViewModel, this.patient, this.model}) : super(key: key); + const RegisterConfirmationPatientPage( + {Key? key, this.operationReportViewModel, this.patient, this.model}) + : super(key: key); @override - _RegisterConfirmationPatientPageState createState() => _RegisterConfirmationPatientPageState(); + _RegisterConfirmationPatientPageState createState() => + _RegisterConfirmationPatientPageState(); } -class _RegisterConfirmationPatientPageState extends State { +class _RegisterConfirmationPatientPageState + extends State { bool isSubmitted = false; late ProjectViewModel projectViewModel; - TextEditingController firstNameN = TextEditingController(), middleNameN = TextEditingController(), lastNameN = TextEditingController(); + TextEditingController firstNameN = TextEditingController(), + middleNameN = TextEditingController(), + lastNameN = TextEditingController(); TextEditingController firstNameAr = TextEditingController(); TextEditingController middleNameAr = TextEditingController(); TextEditingController lastNameAr = TextEditingController(); @@ -48,13 +54,17 @@ class _RegisterConfirmationPatientPageState extends State { bool isSubmitted = false; TextEditingController _phoneController = - TextEditingController(text: "508079569"); + TextEditingController(text: "508079569"); TextEditingController _phoneCode = TextEditingController(text: "966"); String phoneError = ''; TextEditingController _idController = - TextEditingController(text: "1062938285"); + TextEditingController(text: "1062938285"); String idError = ''; DateTime? _birthDateInGregorian; String birthdateError = ''; - var birthDateInHijri = new HijriCalendar.now(); + + // var birthDateInHijri = new HijriCalendar.now(); + var birthDateInHijri = JDateModel(jhijri: JHijri.now()); CalenderType calenderType = CalenderType.Gregorian; @override @@ -109,7 +111,9 @@ class _RegisterSearchPatientPageState extends State { @override Widget build(BuildContext context) { - final screenSize = MediaQuery.of(context).size; + final screenSize = MediaQuery + .of(context) + .size; /// TODO Elham* add transaltion @@ -127,7 +131,9 @@ class _RegisterSearchPatientPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).askForIdentification, + TranslationBase + .of(context) + .askForIdentification, fontFamily: 'Poppins', fontSize: SizeConfig.textMultiplier! * 2.2, fontWeight: FontWeight.w800, @@ -157,10 +163,15 @@ class _RegisterSearchPatientPageState extends State { Column( children: [ Container( - width: MediaQuery.of(context).size.width * 0.28, + width: MediaQuery + .of(context) + .size + .width * 0.28, child: AppTextFieldCustom( height: screenSize.height * 0.075, - hintText: TranslationBase.of(context).codeNo, + hintText: TranslationBase + .of(context) + .codeNo, inputType: TextInputType.phone, controller: _phoneCode, validationError: phoneError, @@ -181,13 +192,17 @@ class _RegisterSearchPatientPageState extends State { // width: MediaQuery.of(context).size.width*0.7, child: AppTextFieldCustom( height: screenSize.height * 0.075, - hintText: TranslationBase.of(context).phoneNumber, + hintText: TranslationBase + .of(context) + .phoneNumber, inputType: TextInputType.phone, controller: _phoneController, validationError: - _phoneController.text.isEmpty && isSubmitted - ? TranslationBase.of(context).emptyMessage - : "", + _phoneController.text.isEmpty && isSubmitted + ? TranslationBase + .of(context) + .emptyMessage + : "", ), ), ), @@ -198,18 +213,24 @@ class _RegisterSearchPatientPageState extends State { ), AppTextFieldCustom( height: screenSize.height * 0.075, - hintText: TranslationBase.of(context).iDNumber, + hintText: TranslationBase + .of(context) + .iDNumber, inputType: TextInputType.phone, controller: _idController, validationError: _idController.text.isEmpty && isSubmitted - ? TranslationBase.of(context).emptyMessage + ? TranslationBase + .of(context) + .emptyMessage : "", ), SizedBox( height: 12, ), AppText( - TranslationBase.of(context).calender, + TranslationBase + .of(context) + .calender, fontSize: SizeConfig.textMultiplier! * 1.8, fontWeight: FontWeight.w800, ), @@ -221,7 +242,9 @@ class _RegisterSearchPatientPageState extends State { Expanded( child: RadioListTile( title: - AppText(TranslationBase.of(context).gregorian), + AppText(TranslationBase + .of(context) + .gregorian), value: CalenderType.Gregorian, groupValue: calenderType, onChanged: (CalenderType? value) { @@ -233,7 +256,9 @@ class _RegisterSearchPatientPageState extends State { ), Expanded( child: RadioListTile( - title: AppText(TranslationBase.of(context).hijri), + title: AppText(TranslationBase + .of(context) + .hijri), value: CalenderType.Hijri, groupValue: calenderType, onChanged: (CalenderType? value) { @@ -250,14 +275,18 @@ class _RegisterSearchPatientPageState extends State { ), AppTextFieldCustom( height: screenSize.height * 0.075, - hintText: TranslationBase.of(context).birthdate, + hintText: TranslationBase + .of(context) + .birthdate, dropDownText: getBirthdate(), enabled: false, isTextFieldHasSuffix: true, validationError: - _birthDateInGregorian == null && isSubmitted - ? TranslationBase.of(context).emptyMessage - : "", + _birthDateInGregorian == null && isSubmitted + ? TranslationBase + .of(context) + .emptyMessage + : "", suffixIcon: IconButton( icon: Icon( Icons.calendar_today, @@ -270,30 +299,43 @@ class _RegisterSearchPatientPageState extends State { _birthDateInGregorian = DateTime.now(); } _selectDate(context, _birthDateInGregorian!, - (dynamic selectedDate) { - setState(() { - if (calenderType == CalenderType.Hijri) { - birthDateInHijri = selectedDate; - _birthDateInGregorian = HijriCalendar() - .hijriToGregorian( - birthDateInHijri.hYear, - birthDateInHijri.hMonth, - birthDateInHijri.hDay); - print(_birthDateInGregorian); - print(birthDateInHijri); - } else { - _birthDateInGregorian = selectedDate; - birthDateInHijri = HijriCalendar() - .gregorianToHijri( - selectedDate.year, - selectedDate.month, - selectedDate.day) as HijriCalendar; + (dynamic selectedDate) { + setState(() { + if (calenderType == CalenderType.Hijri) { + birthDateInHijri = selectedDate; + // _birthDateInGregorian = HijriCalendar() + // .hijriToGregorian( + // birthDateInHijri.hYear, + // birthDateInHijri.hMonth, + // birthDateInHijri.hDay); + // - print(_birthDateInGregorian); - print(birthDateInHijri); - } - }); - }); + _birthDateInGregorian = DateTime.parse(JHijri( + fDay: birthDateInHijri.jhijri!.day, + fMonth: birthDateInHijri.jhijri!.month, + fYear: birthDateInHijri.jhijri!.year) + .toString()); + + + print(_birthDateInGregorian); + print(birthDateInHijri); + } else { + _birthDateInGregorian = selectedDate; + // birthDateInHijri = HijriCalendar() + // .gregorianToHijri( + // selectedDate.year, + // selectedDate.month, + // selectedDate.day) as HijriCalendar; + + birthDateInHijri = + JDateModel(dateTime: selectedDate); + + print(_birthDateInGregorian); + print(birthDateInHijri.dateTime); + print(birthDateInHijri.jhijri); + } + }); + }); }, ), SizedBox( @@ -314,7 +356,9 @@ class _RegisterSearchPatientPageState extends State { Expanded( child: Container( child: AppButton( - title: TranslationBase.of(context).cancel, + title: TranslationBase + .of(context) + .cancel, hasBorder: true, // vPadding: 12, hPadding: 8, @@ -333,7 +377,9 @@ class _RegisterSearchPatientPageState extends State { Expanded( child: Container( child: AppButton( - title: TranslationBase.of(context).next, + title: TranslationBase + .of(context) + .next, hasBorder: true, borderColor: Color(0xFFB8382B), color: AppGlobal.appRedColor, @@ -343,32 +389,36 @@ class _RegisterSearchPatientPageState extends State { isSubmitted = true; }); if (country == null) { - countryError = TranslationBase.of(context).fieldRequired; + countryError = TranslationBase + .of(context) + .fieldRequired; } else { countryError = ""; } if (isFormValid()) { GifLoaderDialogUtils.showMyDialog(context); CheckPatientForRegistrationModel - checkPatientForRegistrationModel = - CheckPatientForRegistrationModel( - patientIdentificationID: - int.parse(_idController.text), - patientMobileNumber: - int.parse(_phoneController.text), - zipCode: _phoneCode.text, - isHijri: 0, - patientID: 0, - isRegister: false, - isDentalAllowedBackend: false, - patientOutSA: 0, - generalid: GENERAL_ID, - dOB: - "${AppDateUtils.convertStringToDateFormat(_birthDateInGregorian.toString(), "yyyy/MM/dd")}"); + checkPatientForRegistrationModel = + CheckPatientForRegistrationModel( + patientIdentificationID: + int.parse(_idController.text), + patientMobileNumber: + int.parse(_phoneController.text), + zipCode: _phoneCode.text, + isHijri: 0, + patientID: 0, + isRegister: false, + isDentalAllowedBackend: false, + patientOutSA: 0, + generalid: GENERAL_ID, + dOB: + "${AppDateUtils.convertStringToDateFormat( + _birthDateInGregorian.toString(), + "yyyy/MM/dd")}"); await widget.model!.checkPatientForRegistration( checkPatientForRegistrationModel); GetPatientInfoRequestModel getPatientInfoRequestModel = - GetPatientInfoRequestModel( + GetPatientInfoRequestModel( //TODO Elham* this return the static to dynamic patientIdentificationID: "1062938285", // _idController.text, @@ -378,13 +428,13 @@ class _RegisterSearchPatientPageState extends State { generalid: GENERAL_ID, sessionID: null, dOB: - "31/07/1988", //"${AppDateUtils.convertStringToDateFormat(_birthDate.toString(), "dd/MM/yyyy")}" + "31/07/1988", //"${AppDateUtils.convertStringToDateFormat(_birthDate.toString(), "dd/MM/yyyy")}" ); if (widget.model!.state == ViewState.ErrorLocal) { Utils.showErrorToast(widget.model!.error); } else { - await widget.model - !.getPatientInfo(getPatientInfoRequestModel); + await widget.model! + .getPatientInfo(getPatientInfoRequestModel); if (widget.model!.state == ViewState.ErrorLocal) { Utils.showErrorToast(widget.model!.error); } else { @@ -417,26 +467,29 @@ class _RegisterSearchPatientPageState extends State { Future _selectDate(BuildContext context, DateTime dateTime, Function(dynamic) updateDate) async { if (calenderType == CalenderType.Hijri) { - HijriCalendar hijriDate = HijriCalendar.fromDate(DateTime.now()); - final HijriCalendar? pickedH = await showHijriDatePicker( + JDateModel hijriDate = JDateModel(dateTime: DateTime.now()); + final JPickerValue? pickedH = await showGlobalDatePicker( context: context, - initialDate: birthDateInHijri ?? hijriDate, - lastDate: new HijriCalendar() - ..hYear = hijriDate.hYear - ..hMonth = hijriDate.hMonth - ..hDay = hijriDate.hDay, - firstDate: new HijriCalendar() - ..hYear = 1438 - ..hMonth = 12 - ..hDay = 25, - initialDatePickerMode: DatePickerMode.day, + pickerType: PickerType.JHijri, + startDate: birthDateInHijri ?? hijriDate, + endDate: JDateModel( + jhijri: JHijri(fDate: hijriDate.dateTime), + ), + + // firstDate: new HijriCalendar() + // ..hYear = 1438 + // ..hMonth = 12 + // ..hDay = 25, + pickerMode: DatePickerMode.day, ); if (pickedH != null && birthDateInHijri != pickedH) updateDate(pickedH); } else { final DateTime? picked = await showDatePicker( context: context, initialDate: dateTime ?? DateTime.now(), - firstDate: DateTime(DateTime.now().year - 150), + firstDate: DateTime(DateTime + .now() + .year - 150), lastDate: DateTime.now(), initialEntryMode: DatePickerEntryMode.calendar, ); @@ -453,7 +506,9 @@ class _RegisterSearchPatientPageState extends State { attributeName: attributeName, attributeValueId: attributeValueId, usingSearch: true, - okText: TranslationBase.of(context).ok, + okText: TranslationBase + .of(context) + .ok, okFunction: (selectedValue) { okFunction(selectedValue); }, @@ -472,7 +527,8 @@ class _RegisterSearchPatientPageState extends State { return birthDateInHijri != null ? "$birthDateInHijri" : null; } else { return _birthDateInGregorian != null - ? "${AppDateUtils.convertStringToDateFormat(_birthDateInGregorian.toString(), "yyyy/MM/dd")}" + ? "${AppDateUtils.convertStringToDateFormat( + _birthDateInGregorian.toString(), "yyyy/MM/dd")}" : null; } } diff --git a/lib/widgets/shared/loader/gif_loader_container.dart b/lib/widgets/shared/loader/gif_loader_container.dart index 6c6fca9c..1e32784c 100644 --- a/lib/widgets/shared/loader/gif_loader_container.dart +++ b/lib/widgets/shared/loader/gif_loader_container.dart @@ -1,5 +1,5 @@ import 'package:flutter/cupertino.dart'; -import 'package:flutter_gif/flutter_gif.dart'; +import 'package:gif/gif.dart'; class GifLoaderContainer extends StatefulWidget { @override @@ -8,11 +8,11 @@ class GifLoaderContainer extends StatefulWidget { class _GifLoaderContainerState extends State with TickerProviderStateMixin { - late FlutterGifController controller1; + late GifController controller1; @override void initState() { - controller1 = FlutterGifController(vsync: this); + controller1 = GifController(vsync: this); WidgetsBinding.instance.addPostFrameCallback((_) { controller1.repeat( @@ -33,7 +33,7 @@ class _GifLoaderContainerState extends State //progress-loading.gif child: Container( // margin: EdgeInsets.only(bottom: 40), - child: GifImage( + child: Gif( controller: controller1, image: AssetImage( "assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), diff --git a/lib/widgets/shared/text_fields/html_rich_editor.dart b/lib/widgets/shared/text_fields/html_rich_editor.dart index 23400a01..a79bf107 100644 --- a/lib/widgets/shared/text_fields/html_rich_editor.dart +++ b/lib/widgets/shared/text_fields/html_rich_editor.dart @@ -146,12 +146,12 @@ class _HtmlRichEditorState extends State { void resultListener(result) async { recognizedWord = result.recognizedWords; event.setValue({"searchText": recognizedWord}); - String txt = await widget.controller!.getText(); + String? txt = await widget.controller!.getText(); if (result.finalResult == true) { setState(() { SpeechToText.closeAlertDialog(context); speech.stop(); - widget.controller!.setText(txt + recognizedWord); + widget.controller!.setText(txt! + recognizedWord); }); } else { print(result.finalResult); diff --git a/pubspec.yaml b/pubspec.yaml index 6094d1a9..f7f236cb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -79,7 +79,7 @@ dependencies: #GIF image # flutter_gifimage: ^1.0.1 - flutter_gif: ^0.0.4 + gif: ^2.3.0 #Autocomplete TextField autocomplete_textfield: ^2.0.1 #date_time_picker: ^2.0.0 @@ -89,9 +89,10 @@ dependencies: html: ^0.15.4 # Flutter Html View - flutter_html: ^2.1.0 + flutter_html: ^3.0.0-beta.2 + sticky_headers: ^0.3.0+2 - file_picker: any + file_picker: 5.2.0+1 #speech to text # speech_to_text: @@ -105,27 +106,28 @@ dependencies: # Html Editor Enhanced #html_editor_enhanced: any html_editor_enhanced: ^2.5.1 + jhijri_picker: ^1.0.1 + jhijri: ^1.0.0 #Network Image cached_network_image: ^3.3.0 - # Badges badges: ^3.1.2 - # Hijri - # hijri: ^2.0.3 - hijri_picker: ^3.0.0 + flutter_datetime_picker: ^1.5.1 localization: ^2.1.1 - # flutter_math_fork: ^0.6.0 -# flutter_math_fork: ^0.6.0 + + flutter_math_fork: ^0.7.2 + dependency_overrides: flutter_localizations: sdk: flutter intl: ^0.18.1 + #hijri_picker: ^3.0.0 dev_dependencies: @@ -134,6 +136,7 @@ dev_dependencies: build_runner: any build_web_compilers: any + # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec