@ -1,39 +1,42 @@
import ' package:diplomaticquarterapp/config/shared_pref_kay.dart ' ;
import ' package:diplomaticquarterapp/locator.dart ' ;
import ' package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart ' ;
import ' package:diplomaticquarterapp/config/config.dart ' ;
import ' package:diplomaticquarterapp/widgets/transitions/fade_page.dart ' ;
import ' package:diplomaticquarterapp/pages/landing/landing_page.dart ' ;
import ' package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart ' ;
import ' package:diplomaticquarterapp/routes.dart ' ;
import ' package:diplomaticquarterapp/config/shared_pref_kay.dart ' ;
import ' package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/project_view_model.dart ' ;
import ' package:diplomaticquarterapp/locator.dart ' ;
import ' package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart ' ;
import ' package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart ' as checkActivation ;
import ' package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart ' ;
import ' package:diplomaticquarterapp/models/Authentication/register_info_response.dart ' ;
import ' package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart ' ;
import ' package:diplomaticquarterapp/pages/landing/landing_page.dart ' ;
import ' package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart ' ;
import ' package:diplomaticquarterapp/routes.dart ' ;
import ' package:diplomaticquarterapp/services/authentication/auth_provider.dart ' ;
import ' package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart ' ;
import ' package:diplomaticquarterapp/uitl/app_shared_preferences.dart ' ;
import ' package:diplomaticquarterapp/uitl/app_toast.dart ' ;
import ' package:diplomaticquarterapp/uitl/date_uitl.dart ' ;
import ' package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart ' ;
import ' package:diplomaticquarterapp/uitl/translations_delegate_base.dart ' ;
import ' package:diplomaticquarterapp/uitl/utils.dart ' ;
import ' package:diplomaticquarterapp/uitl/utils_new.dart ' ;
import ' package:diplomaticquarterapp/widgets/buttons/defaultButton.dart ' ;
import ' package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart ' ;
import ' package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart ' ;
import ' package:diplomaticquarterapp/widgets/text/app_texts_widget.dart ' ;
import ' package:diplomaticquarterapp/widgets/transitions/fade_page.dart ' ;
import ' package:flutter/cupertino.dart ' ;
import ' package:flutter/material.dart ' ;
import ' package:hijri/hijri_calendar.dart ' ;
import ' package:intl/intl.dart ' ;
import ' package:provider/provider.dart ' ;
import ' package:diplomaticquarterapp/uitl/utils_new.dart ' ;
class RegisterInfo extends StatefulWidget {
final Function changePageViewIndex ;
final int page ;
const RegisterInfo ( { Key key , this . changePageViewIndex , this . page = 1 } ) : super ( key: key ) ;
@ override
_RegisterInfo createState ( ) = > _RegisterInfo ( ) ;
}
@ -348,22 +351,6 @@ class _RegisterInfo extends State<RegisterInfo> {
] ,
)
: SizedBox ( ) ,
/ / Column (
/ / mainAxisAlignment: MainAxisAlignment . end ,
/ / children: < Widget > [
/ / Row (
/ / children: < Widget > [
/ / Expanded (
/ / child: DefaultButton (
/ / page = = 1 ? TranslationBase . of ( context ) . next : TranslationBase . of ( context ) . register ,
/ / ( ) = > { nextPage ( ) } ,
/ / textColor: Colors . white ,
/ / color: this . isValid ( ) = = false & & page = = 2 ? Colors . grey : Colors . black ,
/ / ) )
/ / ] ,
/ / ) ,
/ / ] ,
/ / )
] ) ,
) ,
bottomSheet: Container (
@ -404,8 +391,6 @@ class _RegisterInfo extends State<RegisterInfo> {
. registerUser ( request )
. then ( ( result ) = > {
GifLoaderDialogUtils . hideDialog ( context ) ,
/ / userData = result . list ;
/ / AuthenticatedUser . fromJson ( result [ ' List ' ] [ 0 ] ) ,
if ( result is String )
{
new ConfirmDialog (
@ -437,6 +422,7 @@ class _RegisterInfo extends State<RegisterInfo> {
sharedPref . setObject ( LOGIN_TOKEN_ID , result . logInTokenID ) ,
sharedPref . setString ( TOKEN , result . authenticationTokenID ) ,
AppToast . showSuccessToast ( message: TranslationBase . of ( context ) . successRegister ) ,
checkIfUserAgreedBefore ( result ) ,
}
} )
@ -483,7 +469,7 @@ class _RegisterInfo extends State<RegisterInfo> {
return {
" Patientobject " : {
" TempValue " : true ,
" PatientIdentificationType " : 1 ,
" PatientIdentificationType " : registerInfo . idNumber . substring ( 0 , 1 ) = = " 1 " ? 1 : 2 ,
" PatientIdentificationNo " : registerInfo . idNumber ,
" MobileNumber " : registerd_data . patientMobileNumber ,
" PatientOutSA " : registerd_data . zipCode = = ' 966 ' ? 0 : 1 ,
@ -528,13 +514,21 @@ class _RegisterInfo extends State<RegisterInfo> {
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
App Text(
Text(
name1 ,
fontSize: 12 ,
fontWeight: FontWeight . bold ,
style: TextStyle (
fontSize: 14 ,
fontWeight: FontWeight . bold ,
letterSpacing: - 0.44 ,
) ,
) ,
AppText (
Text(
value1 ,
style: TextStyle (
fontSize: 12 ,
fontWeight: FontWeight . w600 ,
letterSpacing: - 0.44 ,
) ,
) ,
] ,
) ) ,
@ -542,12 +536,22 @@ class _RegisterInfo extends State<RegisterInfo> {
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
App Text(
Text(
name2 ,
fontSize: 12 ,
fontWeight: FontWeight . bold ,
style: TextStyle (
fontSize: 14 ,
fontWeight: FontWeight . bold ,
letterSpacing: - 0.44 ,
) ,
) ,
Text (
value2 ,
style: TextStyle (
fontSize: 12 ,
fontWeight: FontWeight . w600 ,
letterSpacing: - 0.44 ,
) ,
) ,
AppText ( value2 ) ,
] ,
) )
] ,
@ -556,7 +560,7 @@ class _RegisterInfo extends State<RegisterInfo> {
checkIfUserAgreedBefore ( checkActivation . CheckActivationCode result ) {
if ( result . isNeedUserAgreement = = true ) {
/ / need to implement agreement page here
/ / TODO need to implement agreement page here
insertIMEI ( ) ;
} else {
insertIMEI ( ) ;
@ -568,7 +572,6 @@ class _RegisterInfo extends State<RegisterInfo> {
authService . insertDeviceImei ( selectedOption ) . then ( ( value ) = > { goToHome ( ) } ) . catchError ( ( err ) {
print ( err ) ;
} ) ;
/ / authService . registeredAuthenticatedUser ( data , token , 0 , 0 ) . then ( ( res ) = > { } ) ;
}
goToHome ( ) async {
@ -624,11 +627,13 @@ class _RegisterInfo extends State<RegisterInfo> {
class Language {
final String name ;
final String value ;
Language ( { this . name , this . value } ) ;
}
class Location {
final String name ;
final String value ;
Location ( { this . name , this . value } ) ;
}