Null Safety Updates 3.16

update_flutter_3.16.0_voipcall
Aamir Muhammad 2 years ago
parent 1bc355b2c4
commit bb86949f65

@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 30 compileSdkVersion 34
signingConfigs { signingConfigs {
release { release {
@ -49,7 +49,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.hmg.hmgDr" applicationId "com.hmg.hmgDr"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 30 targetSdkVersion 33
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@ -59,7 +59,8 @@ android {
buildTypes { buildTypes {
release { release {
// TODO: Add your own signing config for the release build. // TODO: Add your own signing config for the release build.
signingConfig signingConfigs.release signingConfig signingConfigs.debug
} }
debug { debug {
@ -90,6 +91,8 @@ flutter {
source '../..' source '../..'
} }
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.appcompat:appcompat:1.1.0'
@ -112,5 +115,8 @@ dependencies {
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0' implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
implementation 'com.google.firebase:firebase-analytics:17.4.1' implementation 'com.google.firebase:firebase-analytics:17.4.1'
implementation 'com.android.support:multidex:2.0.1'
} }
apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.gms.google-services'

@ -39,6 +39,7 @@
android:name=".MainActivity" android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:exported="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize">

@ -1,14 +1,14 @@
buildscript { buildscript {
ext.kotlin_version = '1.3.50' ext.kotlin_version = '1.8.21'
repositories { repositories {
google() google()
jcenter() jcenter()
} }
dependencies { 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 "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') project.evaluationDependsOn(':app')
} }
task clean(type: Delete) { tasks.register("clean", Delete) {
delete rootProject.buildDir delete rootProject.buildDir
} }

@ -1,5 +1,5 @@
android.enableR8=true #android.enableR8=true
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
org.gradle.jvmargs=-Xmx4608m org.gradle.jvmargs=-Xmx4608m

@ -1,6 +1,5 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip

@ -280,7 +280,7 @@
"${BUILT_PRODUCTS_DIR}/DKPhotoGallery/DKPhotoGallery.framework", "${BUILT_PRODUCTS_DIR}/DKPhotoGallery/DKPhotoGallery.framework",
"${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.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}/FirebaseInstallations/FirebaseInstallations.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework", "${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework",
"${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework", "${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework",
@ -301,12 +301,11 @@
"${BUILT_PRODUCTS_DIR}/flutter_inappwebview/flutter_inappwebview.framework", "${BUILT_PRODUCTS_DIR}/flutter_inappwebview/flutter_inappwebview.framework",
"${BUILT_PRODUCTS_DIR}/flutter_keyboard_visibility/flutter_keyboard_visibility.framework", "${BUILT_PRODUCTS_DIR}/flutter_keyboard_visibility/flutter_keyboard_visibility.framework",
"${BUILT_PRODUCTS_DIR}/fluttertoast/fluttertoast.framework", "${BUILT_PRODUCTS_DIR}/fluttertoast/fluttertoast.framework",
"${BUILT_PRODUCTS_DIR}/hexcolor/hexcolor.framework", "${BUILT_PRODUCTS_DIR}/local_auth_ios/local_auth_ios.framework",
"${BUILT_PRODUCTS_DIR}/local_auth/local_auth.framework",
"${BUILT_PRODUCTS_DIR}/maps_launcher/maps_launcher.framework", "${BUILT_PRODUCTS_DIR}/maps_launcher/maps_launcher.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
"${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework", "${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences_ios/shared_preferences_ios.framework", "${BUILT_PRODUCTS_DIR}/shared_preferences_foundation/shared_preferences_foundation.framework",
"${BUILT_PRODUCTS_DIR}/speech_to_text/speech_to_text.framework", "${BUILT_PRODUCTS_DIR}/speech_to_text/speech_to_text.framework",
"${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework", "${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework",
"${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.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}/DKPhotoGallery.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.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}/FirebaseInstallations.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.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_inappwebview.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_keyboard_visibility.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}/fluttertoast.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hexcolor.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/maps_launcher.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/maps_launcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.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}/path_provider_foundation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_ios.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}/speech_to_text.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework",

@ -1,4 +1,3 @@
import 'dart:js_interop';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/auth/activation_Code_req_model.dart'; import 'package:doctor_app_flutter/core/model/auth/activation_Code_req_model.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:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:hijri/hijri_calendar.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:jhijri_picker/_src/_jWidgets.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'CustomEditableText.dart'; import 'CustomEditableText.dart';
@ -29,16 +29,22 @@ class RegisterConfirmationPatientPage extends StatefulWidget {
final PatiantInformtion? patient; final PatiantInformtion? patient;
final PatientRegistrationViewModel? model; 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 @override
_RegisterConfirmationPatientPageState createState() => _RegisterConfirmationPatientPageState(); _RegisterConfirmationPatientPageState createState() =>
_RegisterConfirmationPatientPageState();
} }
class _RegisterConfirmationPatientPageState extends State<RegisterConfirmationPatientPage> { class _RegisterConfirmationPatientPageState
extends State<RegisterConfirmationPatientPage> {
bool isSubmitted = false; bool isSubmitted = false;
late ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
TextEditingController firstNameN = TextEditingController(), middleNameN = TextEditingController(), lastNameN = TextEditingController(); TextEditingController firstNameN = TextEditingController(),
middleNameN = TextEditingController(),
lastNameN = TextEditingController();
TextEditingController firstNameAr = TextEditingController(); TextEditingController firstNameAr = TextEditingController();
TextEditingController middleNameAr = TextEditingController(); TextEditingController middleNameAr = TextEditingController();
TextEditingController lastNameAr = TextEditingController(); TextEditingController lastNameAr = TextEditingController();
@ -48,13 +54,17 @@ class _RegisterConfirmationPatientPageState extends State<RegisterConfirmationPa
@override @override
void initState() { void initState() {
firstNameN = TextEditingController(text: widget.model!.getPatientInfoResponseModel.firstNameEn); firstNameN = TextEditingController(
text: widget.model!.getPatientInfoResponseModel.firstNameEn);
middleNameN = TextEditingController(text: ""); middleNameN = TextEditingController(text: "");
lastNameN = TextEditingController(text: widget.model!.getPatientInfoResponseModel.lastNameEn); lastNameN = TextEditingController(
text: widget.model!.getPatientInfoResponseModel.lastNameEn);
firstNameAr = TextEditingController(text: widget.model!.getPatientInfoResponseModel.firstNameAr); firstNameAr = TextEditingController(
text: widget.model!.getPatientInfoResponseModel.firstNameAr);
middleNameAr = TextEditingController(text: ""); middleNameAr = TextEditingController(text: "");
lastNameAr = TextEditingController(text: widget.model!.getPatientInfoResponseModel.lastNameAr); lastNameAr = TextEditingController(
text: widget.model!.getPatientInfoResponseModel.lastNameAr);
emailAddressController = TextEditingController(text: ""); emailAddressController = TextEditingController(text: "");
super.initState(); super.initState();
} }
@ -85,27 +95,49 @@ class _RegisterConfirmationPatientPageState extends State<RegisterConfirmationPa
widthFactor: 0.9, widthFactor: 0.9,
child: Column( child: Column(
children: [ children: [
CustomEditableText(controller: firstNameN, isSubmitted: isSubmitted, hint: TranslationBase.of(context).firstName), CustomEditableText(
controller: firstNameN,
isSubmitted: isSubmitted,
hint: TranslationBase.of(context).firstName),
SizedBox( SizedBox(
height: 4, height: 4,
), ),
CustomEditableText(controller: middleNameN, isEditable: middleNameN.text.isEmpty, isSubmitted: isSubmitted, hint: TranslationBase.of(context).middleName), CustomEditableText(
controller: middleNameN,
isEditable: middleNameN.text.isEmpty,
isSubmitted: isSubmitted,
hint: TranslationBase.of(context).middleName),
SizedBox( SizedBox(
height: 4, height: 4,
), ),
CustomEditableText(controller: lastNameN, isSubmitted: isSubmitted, hint: TranslationBase.of(context).lastName), CustomEditableText(
controller: lastNameN,
isSubmitted: isSubmitted,
hint: TranslationBase.of(context).lastName),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
CustomEditableText(controller: firstNameAr, isSubmitted: isSubmitted, hint: TranslationBase.of(context).firstNameInAr), CustomEditableText(
controller: firstNameAr,
isSubmitted: isSubmitted,
hint:
TranslationBase.of(context).firstNameInAr),
SizedBox( SizedBox(
height: 4, height: 4,
), ),
CustomEditableText(controller: middleNameAr, isEditable: middleNameN.text.isEmpty, isSubmitted: isSubmitted, hint: TranslationBase.of(context).middleNameInAr), CustomEditableText(
controller: middleNameAr,
isEditable: middleNameN.text.isEmpty,
isSubmitted: isSubmitted,
hint:
TranslationBase.of(context).middleNameInAr),
SizedBox( SizedBox(
height: 4, height: 4,
), ),
CustomEditableText(controller: lastNameAr, isSubmitted: isSubmitted, hint: TranslationBase.of(context).lastNameInAr), CustomEditableText(
controller: lastNameAr,
isSubmitted: isSubmitted,
hint: TranslationBase.of(context).lastNameInAr),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
@ -115,12 +147,18 @@ class _RegisterConfirmationPatientPageState extends State<RegisterConfirmationPa
child: Column( child: Column(
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
AppText(TranslationBase.of(context).healthID, fontSize: 12, color: Colors.black), AppText(
TranslationBase.of(context)
.healthID,
fontSize: 12,
color: Colors.black),
AppText( AppText(
"${widget.model!.getPatientInfoResponseModel.healthId}", "${widget.model!.getPatientInfoResponseModel.healthId}",
fontSize: 12, fontSize: 12,
@ -129,9 +167,14 @@ class _RegisterConfirmationPatientPageState extends State<RegisterConfirmationPa
], ],
), ),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
AppText(TranslationBase.of(context).identityNumber, fontSize: 12, color: Colors.black), AppText(
TranslationBase.of(context)
.identityNumber,
fontSize: 12,
color: Colors.black),
AppText( AppText(
"${widget.model!.getPatientInfoResponseModel.idNumber}", "${widget.model!.getPatientInfoResponseModel.idNumber}",
fontSize: 12, fontSize: 12,
@ -148,12 +191,18 @@ class _RegisterConfirmationPatientPageState extends State<RegisterConfirmationPa
height: 20, height: 20,
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
AppText(TranslationBase.of(context).nationality, fontSize: 12, color: Colors.black), AppText(
TranslationBase.of(context)
.nationality,
fontSize: 12,
color: Colors.black),
AppText( AppText(
"${widget.model!.getPatientInfoResponseModel.nationality}", "${widget.model!.getPatientInfoResponseModel.nationality}",
fontSize: 12, fontSize: 12,
@ -162,9 +211,14 @@ class _RegisterConfirmationPatientPageState extends State<RegisterConfirmationPa
], ],
), ),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
AppText(TranslationBase.of(context).occupation, fontSize: 12, color: Colors.black), AppText(
TranslationBase.of(context)
.occupation,
fontSize: 12,
color: Colors.black),
AppText( AppText(
"${widget.model!.getPatientInfoResponseModel.occupation}", "${widget.model!.getPatientInfoResponseModel.occupation}",
fontSize: 12, fontSize: 12,
@ -181,12 +235,18 @@ class _RegisterConfirmationPatientPageState extends State<RegisterConfirmationPa
height: 20, height: 20,
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
AppText(TranslationBase.of(context).mobileNo, fontSize: 12, color: Colors.black), AppText(
TranslationBase.of(context)
.mobileNo,
fontSize: 12,
color: Colors.black),
AppText( AppText(
"${widget.model!.checkPatientForRegistrationModel!.patientMobileNumber}", "${widget.model!.checkPatientForRegistrationModel!.patientMobileNumber}",
fontSize: 12, fontSize: 12,
@ -212,7 +272,8 @@ class _RegisterConfirmationPatientPageState extends State<RegisterConfirmationPa
onClick: () { onClick: () {
openMaritalStatusList(context); openMaritalStatusList(context);
}, },
hintText: TranslationBase.of(context).maritalStatus, hintText:
TranslationBase.of(context).maritalStatus,
maxLines: 1, maxLines: 1,
minLines: 1, minLines: 1,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
@ -255,7 +316,11 @@ class _RegisterConfirmationPatientPageState extends State<RegisterConfirmationPa
maxLines: 1, maxLines: 1,
minLines: 1, minLines: 1,
hasBorder: true, hasBorder: true,
validationError: emailAddressController.text.isEmpty && isSubmitted ? TranslationBase.of(context).emptyMessage : "", validationError:
emailAddressController.text.isEmpty &&
isSubmitted
? TranslationBase.of(context).emptyMessage
: "",
), ),
SizedBox( SizedBox(
height: 400, height: 400,
@ -310,59 +375,87 @@ class _RegisterConfirmationPatientPageState extends State<RegisterConfirmationPa
isSubmitted = true; isSubmitted = true;
}); });
if (isFormValid()) { if (isFormValid()) {
print(widget.model!.getPatientInfoResponseModel.dateOfBirth); print(widget
.model!.getPatientInfoResponseModel.dateOfBirth);
var dateFormat = DateFormat('MM/dd/yyyy').parse(widget.model!.getPatientInfoResponseModel.dateOfBirth!); var dateFormat = DateFormat('MM/dd/yyyy').parse(widget
String wellFormat = "${dateFormat.day}\/${dateFormat.month}\/${dateFormat.year}"; .model!.getPatientInfoResponseModel.dateOfBirth!);
String wellFormat =
"${dateFormat.day}\/${dateFormat.month}\/${dateFormat.year}";
print( print(
dateFormat.toUtc().toString(), dateFormat.toUtc().toString(),
); );
HijriCalendar hijriDate = HijriCalendar.fromDate( JDateModel hijriDate = JDateModel(
new DateTime(dateFormat.year, dateFormat.month, dateFormat.day), dateTime: DateTime(
dateFormat.year, dateFormat.month, dateFormat.day),
); );
// return ; // return ;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
PatientRegistrationModel patientRegistrationModel = PatientRegistrationModel( PatientRegistrationModel patientRegistrationModel =
patientobject: Patientobject( PatientRegistrationModel(
tempValue: true, patientobject: Patientobject(
patientIdentificationNo: widget.model!.checkPatientForRegistrationModel!.patientIdentificationID.toString(), tempValue: true,
patientIdentificationType: 1, patientIdentificationNo: widget
firstName: firstNameAr.text, .model!
firstNameN: firstNameN.text, .checkPatientForRegistrationModel!
lastName: lastNameAr.text, .patientIdentificationID
lastNameN: lastNameN.text, .toString(),
middleName: middleNameAr.text, patientIdentificationType: 1,
middleNameN: middleNameN.text, firstName: firstNameAr.text,
strDateofBirth: dateFormat.toUtc().toString(), firstNameN: firstNameN.text,
dateofBirth: AppDateUtils.convertToServerFormat(widget.model!.getPatientInfoResponseModel.dateOfBirth!, 'MM/dd/yyyy'), lastName: lastNameAr.text,
dateofBirthN: '$hijriDate', lastNameN: lastNameN.text,
gender: (widget.model!.getPatientInfoResponseModel.gender == "M") ? 1 : 2, middleName: middleNameAr.text,
sourceType: "1", middleNameN: middleNameN.text,
strDateofBirth: dateFormat.toUtc().toString(),
dateofBirth: AppDateUtils.convertToServerFormat(
widget.model!.getPatientInfoResponseModel
.dateOfBirth!,
'MM/dd/yyyy'),
dateofBirthN: '$hijriDate',
gender:
(widget.model!.getPatientInfoResponseModel.gender == "M")
? 1
: 2,
sourceType: "1",
patientOutSA: 0,
nationalityID: widget
.model!
.getPatientInfoResponseModel
.nationalityCode,
//todo Elham* change static value to dynamic
preferredLanguage: selectedLang.toString(),
marital: "0",
eHealthIDField: widget.model!
.getPatientInfoResponseModel.healthId,
emailAddress: emailAddressController.text,
mobileNumber: widget
.model!
.checkPatientForRegistrationModel!
.patientMobileNumber),
isHijri: 0,
logInTokenID: "zjgvKtLC/EK+saznJ/OkiA==",
isDentalAllowedBackend: false,
patientOutSA: 0, patientOutSA: 0,
nationalityID: widget.model!.getPatientInfoResponseModel.nationalityCode, sessionID: null,
//todo Elham* change static value to dynamic patientMobileNumber: widget
preferredLanguage: selectedLang.toString(), .model!
marital: "0", .checkPatientForRegistrationModel!
eHealthIDField: widget.model!.getPatientInfoResponseModel.healthId, .patientMobileNumber
emailAddress: emailAddressController.text, .toString(),
mobileNumber: widget.model!.checkPatientForRegistrationModel!.patientMobileNumber), healthId: widget.model!.getPatientInfoResponseModel.healthId,
isHijri: 0, generalid: GENERAL_ID,
logInTokenID: "zjgvKtLC/EK+saznJ/OkiA==", patientIdentificationID: widget.model!.checkPatientForRegistrationModel!.patientIdentificationID.toString(),
isDentalAllowedBackend: false, dOB: wellFormat,
patientOutSA: 0, zipCode: widget.model!.checkPatientForRegistrationModel!.zipCode);
sessionID: null, await widget.model!
patientMobileNumber: widget.model!.checkPatientForRegistrationModel!.patientMobileNumber.toString(), .registrationPatient(patientRegistrationModel);
healthId: widget.model!.getPatientInfoResponseModel.healthId,
generalid: GENERAL_ID,
patientIdentificationID: widget.model!.checkPatientForRegistrationModel!.patientIdentificationID.toString(),
dOB: wellFormat,
zipCode: widget.model!.checkPatientForRegistrationModel!.zipCode);
await widget.model!.registrationPatient(patientRegistrationModel);
if (widget.model!.state == ViewState.ErrorLocal) { if (widget.model!.state == ViewState.ErrorLocal) {
Utils.showErrorToast(widget.model!.error); Utils.showErrorToast(widget.model!.error);
} else { } else {
DrAppToastMsg.showSuccesToast("Patient added Successfully"); DrAppToastMsg.showSuccesToast(
"Patient added Successfully");
Navigator.of(context).pop(); Navigator.of(context).pop();
} }
@ -407,7 +500,10 @@ class _RegisterConfirmationPatientPageState extends State<RegisterConfirmationPa
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
child: Icon(DoctorApp.close_1, size: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5, color: Color(0xFF2B353E))), child: Icon(DoctorApp.close_1,
size: SizeConfig.getTextMultiplierBasedOnWidth() *
4.5,
color: Color(0xFF2B353E))),
), ),
], ],
), ),
@ -512,7 +608,10 @@ class _RegisterConfirmationPatientPageState extends State<RegisterConfirmationPa
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
child: Icon(DoctorApp.close_1, size: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5, color: Color(0xFF2B353E))), child: Icon(DoctorApp.close_1,
size: SizeConfig.getTextMultiplierBasedOnWidth() *
4.5,
color: Color(0xFF2B353E))),
), ),
], ],
), ),

@ -16,8 +16,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:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/country_textfield_custom.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/country_textfield_custom.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hijri/hijri_calendar.dart'; import 'package:jhijri/jHijri.dart';
import 'package:hijri_picker/hijri_picker.dart'; import 'package:jhijri_picker/jhijri_picker.dart';
class RegisterSearchPatientPage extends StatefulWidget { class RegisterSearchPatientPage extends StatefulWidget {
final Function? changePageViewIndex; final Function? changePageViewIndex;
@ -43,18 +43,20 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
bool isSubmitted = false; bool isSubmitted = false;
TextEditingController _phoneController = TextEditingController _phoneController =
TextEditingController(text: "508079569"); TextEditingController(text: "508079569");
TextEditingController _phoneCode = TextEditingController(text: "966"); TextEditingController _phoneCode = TextEditingController(text: "966");
String phoneError = ''; String phoneError = '';
TextEditingController _idController = TextEditingController _idController =
TextEditingController(text: "1062938285"); TextEditingController(text: "1062938285");
String idError = ''; String idError = '';
DateTime? _birthDateInGregorian; DateTime? _birthDateInGregorian;
String birthdateError = ''; String birthdateError = '';
var birthDateInHijri = new HijriCalendar.now();
// var birthDateInHijri = new HijriCalendar.now();
var birthDateInHijri = JDateModel(jhijri: JHijri.now());
CalenderType calenderType = CalenderType.Gregorian; CalenderType calenderType = CalenderType.Gregorian;
@override @override
@ -109,7 +111,9 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery
.of(context)
.size;
/// TODO Elham* add transaltion /// TODO Elham* add transaltion
@ -127,7 +131,9 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
TranslationBase.of(context).askForIdentification, TranslationBase
.of(context)
.askForIdentification,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier! * 2.2, fontSize: SizeConfig.textMultiplier! * 2.2,
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
@ -157,10 +163,15 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
Column( Column(
children: [ children: [
Container( Container(
width: MediaQuery.of(context).size.width * 0.28, width: MediaQuery
.of(context)
.size
.width * 0.28,
child: AppTextFieldCustom( child: AppTextFieldCustom(
height: screenSize.height * 0.075, height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).codeNo, hintText: TranslationBase
.of(context)
.codeNo,
inputType: TextInputType.phone, inputType: TextInputType.phone,
controller: _phoneCode, controller: _phoneCode,
validationError: phoneError, validationError: phoneError,
@ -181,13 +192,17 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
// width: MediaQuery.of(context).size.width*0.7, // width: MediaQuery.of(context).size.width*0.7,
child: AppTextFieldCustom( child: AppTextFieldCustom(
height: screenSize.height * 0.075, height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).phoneNumber, hintText: TranslationBase
.of(context)
.phoneNumber,
inputType: TextInputType.phone, inputType: TextInputType.phone,
controller: _phoneController, controller: _phoneController,
validationError: validationError:
_phoneController.text.isEmpty && isSubmitted _phoneController.text.isEmpty && isSubmitted
? TranslationBase.of(context).emptyMessage ? TranslationBase
: "", .of(context)
.emptyMessage
: "",
), ),
), ),
), ),
@ -198,18 +213,24 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
), ),
AppTextFieldCustom( AppTextFieldCustom(
height: screenSize.height * 0.075, height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).iDNumber, hintText: TranslationBase
.of(context)
.iDNumber,
inputType: TextInputType.phone, inputType: TextInputType.phone,
controller: _idController, controller: _idController,
validationError: _idController.text.isEmpty && isSubmitted validationError: _idController.text.isEmpty && isSubmitted
? TranslationBase.of(context).emptyMessage ? TranslationBase
.of(context)
.emptyMessage
: "", : "",
), ),
SizedBox( SizedBox(
height: 12, height: 12,
), ),
AppText( AppText(
TranslationBase.of(context).calender, TranslationBase
.of(context)
.calender,
fontSize: SizeConfig.textMultiplier! * 1.8, fontSize: SizeConfig.textMultiplier! * 1.8,
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
), ),
@ -221,7 +242,9 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
Expanded( Expanded(
child: RadioListTile<CalenderType>( child: RadioListTile<CalenderType>(
title: title:
AppText(TranslationBase.of(context).gregorian), AppText(TranslationBase
.of(context)
.gregorian),
value: CalenderType.Gregorian, value: CalenderType.Gregorian,
groupValue: calenderType, groupValue: calenderType,
onChanged: (CalenderType? value) { onChanged: (CalenderType? value) {
@ -233,7 +256,9 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
), ),
Expanded( Expanded(
child: RadioListTile<CalenderType>( child: RadioListTile<CalenderType>(
title: AppText(TranslationBase.of(context).hijri), title: AppText(TranslationBase
.of(context)
.hijri),
value: CalenderType.Hijri, value: CalenderType.Hijri,
groupValue: calenderType, groupValue: calenderType,
onChanged: (CalenderType? value) { onChanged: (CalenderType? value) {
@ -250,14 +275,18 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
), ),
AppTextFieldCustom( AppTextFieldCustom(
height: screenSize.height * 0.075, height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).birthdate, hintText: TranslationBase
.of(context)
.birthdate,
dropDownText: getBirthdate(), dropDownText: getBirthdate(),
enabled: false, enabled: false,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
validationError: validationError:
_birthDateInGregorian == null && isSubmitted _birthDateInGregorian == null && isSubmitted
? TranslationBase.of(context).emptyMessage ? TranslationBase
: "", .of(context)
.emptyMessage
: "",
suffixIcon: IconButton( suffixIcon: IconButton(
icon: Icon( icon: Icon(
Icons.calendar_today, Icons.calendar_today,
@ -270,30 +299,43 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
_birthDateInGregorian = DateTime.now(); _birthDateInGregorian = DateTime.now();
} }
_selectDate(context, _birthDateInGregorian!, _selectDate(context, _birthDateInGregorian!,
(dynamic selectedDate) { (dynamic selectedDate) {
setState(() { setState(() {
if (calenderType == CalenderType.Hijri) { if (calenderType == CalenderType.Hijri) {
birthDateInHijri = selectedDate; birthDateInHijri = selectedDate;
_birthDateInGregorian = HijriCalendar() // _birthDateInGregorian = HijriCalendar()
.hijriToGregorian( // .hijriToGregorian(
birthDateInHijri.hYear, // birthDateInHijri.hYear,
birthDateInHijri.hMonth, // birthDateInHijri.hMonth,
birthDateInHijri.hDay); // birthDateInHijri.hDay);
print(_birthDateInGregorian); //
print(birthDateInHijri);
} else {
_birthDateInGregorian = selectedDate;
birthDateInHijri = HijriCalendar()
.gregorianToHijri(
selectedDate.year,
selectedDate.month,
selectedDate.day) as HijriCalendar;
print(_birthDateInGregorian); _birthDateInGregorian = DateTime.parse(JHijri(
print(birthDateInHijri); 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( SizedBox(
@ -314,7 +356,9 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
Expanded( Expanded(
child: Container( child: Container(
child: AppButton( child: AppButton(
title: TranslationBase.of(context).cancel, title: TranslationBase
.of(context)
.cancel,
hasBorder: true, hasBorder: true,
// vPadding: 12, // vPadding: 12,
hPadding: 8, hPadding: 8,
@ -333,7 +377,9 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
Expanded( Expanded(
child: Container( child: Container(
child: AppButton( child: AppButton(
title: TranslationBase.of(context).next, title: TranslationBase
.of(context)
.next,
hasBorder: true, hasBorder: true,
borderColor: Color(0xFFB8382B), borderColor: Color(0xFFB8382B),
color: AppGlobal.appRedColor, color: AppGlobal.appRedColor,
@ -343,32 +389,36 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
isSubmitted = true; isSubmitted = true;
}); });
if (country == null) { if (country == null) {
countryError = TranslationBase.of(context).fieldRequired; countryError = TranslationBase
.of(context)
.fieldRequired;
} else { } else {
countryError = ""; countryError = "";
} }
if (isFormValid()) { if (isFormValid()) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
CheckPatientForRegistrationModel CheckPatientForRegistrationModel
checkPatientForRegistrationModel = checkPatientForRegistrationModel =
CheckPatientForRegistrationModel( CheckPatientForRegistrationModel(
patientIdentificationID: patientIdentificationID:
int.parse(_idController.text), int.parse(_idController.text),
patientMobileNumber: patientMobileNumber:
int.parse(_phoneController.text), int.parse(_phoneController.text),
zipCode: _phoneCode.text, zipCode: _phoneCode.text,
isHijri: 0, isHijri: 0,
patientID: 0, patientID: 0,
isRegister: false, isRegister: false,
isDentalAllowedBackend: false, isDentalAllowedBackend: false,
patientOutSA: 0, patientOutSA: 0,
generalid: GENERAL_ID, generalid: GENERAL_ID,
dOB: dOB:
"${AppDateUtils.convertStringToDateFormat(_birthDateInGregorian.toString(), "yyyy/MM/dd")}"); "${AppDateUtils.convertStringToDateFormat(
_birthDateInGregorian.toString(),
"yyyy/MM/dd")}");
await widget.model!.checkPatientForRegistration( await widget.model!.checkPatientForRegistration(
checkPatientForRegistrationModel); checkPatientForRegistrationModel);
GetPatientInfoRequestModel getPatientInfoRequestModel = GetPatientInfoRequestModel getPatientInfoRequestModel =
GetPatientInfoRequestModel( GetPatientInfoRequestModel(
//TODO Elham* this return the static to dynamic //TODO Elham* this return the static to dynamic
patientIdentificationID: "1062938285", patientIdentificationID: "1062938285",
// _idController.text, // _idController.text,
@ -378,13 +428,13 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
generalid: GENERAL_ID, generalid: GENERAL_ID,
sessionID: null, sessionID: null,
dOB: 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) { if (widget.model!.state == ViewState.ErrorLocal) {
Utils.showErrorToast(widget.model!.error); Utils.showErrorToast(widget.model!.error);
} else { } else {
await widget.model await widget.model!
!.getPatientInfo(getPatientInfoRequestModel); .getPatientInfo(getPatientInfoRequestModel);
if (widget.model!.state == ViewState.ErrorLocal) { if (widget.model!.state == ViewState.ErrorLocal) {
Utils.showErrorToast(widget.model!.error); Utils.showErrorToast(widget.model!.error);
} else { } else {
@ -417,26 +467,29 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
Future _selectDate(BuildContext context, DateTime dateTime, Future _selectDate(BuildContext context, DateTime dateTime,
Function(dynamic) updateDate) async { Function(dynamic) updateDate) async {
if (calenderType == CalenderType.Hijri) { if (calenderType == CalenderType.Hijri) {
HijriCalendar hijriDate = HijriCalendar.fromDate(DateTime.now()); JDateModel hijriDate = JDateModel(dateTime: DateTime.now());
final HijriCalendar? pickedH = await showHijriDatePicker( final JPickerValue? pickedH = await showGlobalDatePicker(
context: context, context: context,
initialDate: birthDateInHijri ?? hijriDate, pickerType: PickerType.JHijri,
lastDate: new HijriCalendar() startDate: birthDateInHijri ?? hijriDate,
..hYear = hijriDate.hYear endDate: JDateModel(
..hMonth = hijriDate.hMonth jhijri: JHijri(fDate: hijriDate.dateTime),
..hDay = hijriDate.hDay, ),
firstDate: new HijriCalendar()
..hYear = 1438 // firstDate: new HijriCalendar()
..hMonth = 12 // ..hYear = 1438
..hDay = 25, // ..hMonth = 12
initialDatePickerMode: DatePickerMode.day, // ..hDay = 25,
pickerMode: DatePickerMode.day,
); );
if (pickedH != null && birthDateInHijri != pickedH) updateDate(pickedH); if (pickedH != null && birthDateInHijri != pickedH) updateDate(pickedH);
} else { } else {
final DateTime? picked = await showDatePicker( final DateTime? picked = await showDatePicker(
context: context, context: context,
initialDate: dateTime ?? DateTime.now(), initialDate: dateTime ?? DateTime.now(),
firstDate: DateTime(DateTime.now().year - 150), firstDate: DateTime(DateTime
.now()
.year - 150),
lastDate: DateTime.now(), lastDate: DateTime.now(),
initialEntryMode: DatePickerEntryMode.calendar, initialEntryMode: DatePickerEntryMode.calendar,
); );
@ -453,7 +506,9 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
attributeName: attributeName, attributeName: attributeName,
attributeValueId: attributeValueId, attributeValueId: attributeValueId,
usingSearch: true, usingSearch: true,
okText: TranslationBase.of(context).ok, okText: TranslationBase
.of(context)
.ok,
okFunction: (selectedValue) { okFunction: (selectedValue) {
okFunction(selectedValue); okFunction(selectedValue);
}, },
@ -472,7 +527,8 @@ class _RegisterSearchPatientPageState extends State<RegisterSearchPatientPage> {
return birthDateInHijri != null ? "$birthDateInHijri" : null; return birthDateInHijri != null ? "$birthDateInHijri" : null;
} else { } else {
return _birthDateInGregorian != null return _birthDateInGregorian != null
? "${AppDateUtils.convertStringToDateFormat(_birthDateInGregorian.toString(), "yyyy/MM/dd")}" ? "${AppDateUtils.convertStringToDateFormat(
_birthDateInGregorian.toString(), "yyyy/MM/dd")}"
: null; : null;
} }
} }

@ -1,5 +1,5 @@
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_gif/flutter_gif.dart'; import 'package:gif/gif.dart';
class GifLoaderContainer extends StatefulWidget { class GifLoaderContainer extends StatefulWidget {
@override @override
@ -8,11 +8,11 @@ class GifLoaderContainer extends StatefulWidget {
class _GifLoaderContainerState extends State<GifLoaderContainer> class _GifLoaderContainerState extends State<GifLoaderContainer>
with TickerProviderStateMixin { with TickerProviderStateMixin {
late FlutterGifController controller1; late GifController controller1;
@override @override
void initState() { void initState() {
controller1 = FlutterGifController(vsync: this); controller1 = GifController(vsync: this);
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
controller1.repeat( controller1.repeat(
@ -33,7 +33,7 @@ class _GifLoaderContainerState extends State<GifLoaderContainer>
//progress-loading.gif //progress-loading.gif
child: Container( child: Container(
// margin: EdgeInsets.only(bottom: 40), // margin: EdgeInsets.only(bottom: 40),
child: GifImage( child: Gif(
controller: controller1, controller: controller1,
image: AssetImage( image: AssetImage(
"assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), "assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"),

@ -146,12 +146,12 @@ class _HtmlRichEditorState extends State<HtmlRichEditor> {
void resultListener(result) async { void resultListener(result) async {
recognizedWord = result.recognizedWords; recognizedWord = result.recognizedWords;
event.setValue({"searchText": recognizedWord}); event.setValue({"searchText": recognizedWord});
String txt = await widget.controller!.getText(); String? txt = await widget.controller!.getText();
if (result.finalResult == true) { if (result.finalResult == true) {
setState(() { setState(() {
SpeechToText.closeAlertDialog(context); SpeechToText.closeAlertDialog(context);
speech.stop(); speech.stop();
widget.controller!.setText(txt + recognizedWord); widget.controller!.setText(txt! + recognizedWord);
}); });
} else { } else {
print(result.finalResult); print(result.finalResult);

@ -79,7 +79,7 @@ dependencies:
#GIF image #GIF image
# flutter_gifimage: ^1.0.1 # flutter_gifimage: ^1.0.1
flutter_gif: ^0.0.4 gif: ^2.3.0
#Autocomplete TextField #Autocomplete TextField
autocomplete_textfield: ^2.0.1 autocomplete_textfield: ^2.0.1
#date_time_picker: ^2.0.0 #date_time_picker: ^2.0.0
@ -89,9 +89,10 @@ dependencies:
html: ^0.15.4 html: ^0.15.4
# Flutter Html View # Flutter Html View
flutter_html: ^2.1.0 flutter_html: ^3.0.0-beta.2
sticky_headers: ^0.3.0+2 sticky_headers: ^0.3.0+2
file_picker: any file_picker: 5.2.0+1
#speech to text #speech to text
# speech_to_text: # speech_to_text:
@ -105,27 +106,28 @@ dependencies:
# Html Editor Enhanced # Html Editor Enhanced
#html_editor_enhanced: any #html_editor_enhanced: any
html_editor_enhanced: ^2.5.1 html_editor_enhanced: ^2.5.1
jhijri_picker: ^1.0.1
jhijri: ^1.0.0
#Network Image #Network Image
cached_network_image: ^3.3.0 cached_network_image: ^3.3.0
# Badges # Badges
badges: ^3.1.2 badges: ^3.1.2
# Hijri
# hijri: ^2.0.3
hijri_picker: ^3.0.0
flutter_datetime_picker: ^1.5.1 flutter_datetime_picker: ^1.5.1
localization: ^2.1.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: dependency_overrides:
flutter_localizations: flutter_localizations:
sdk: flutter sdk: flutter
intl: ^0.18.1 intl: ^0.18.1
#hijri_picker: ^3.0.0
dev_dependencies: dev_dependencies:
@ -134,6 +136,7 @@ dev_dependencies:
build_runner: any build_runner: any
build_web_compilers: any build_web_compilers: any
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec

Loading…
Cancel
Save