@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model
import ' package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart ' ;
import ' package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart ' ;
import ' package:diplomaticquarterapp/pages/base/base_view.dart ' ;
import ' package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart ' ;
import ' package:diplomaticquarterapp/pages/landing/landing_page.dart ' ;
import ' package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart ' ;
import ' package:diplomaticquarterapp/theme/colors.dart ' ;
@ -9,12 +10,18 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import ' package:diplomaticquarterapp/uitl/translations_delegate_base.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/transitions/fade_page.dart ' ;
import ' package:flutter/cupertino.dart ' ;
import ' package:flutter/material.dart ' ;
class RateAppointmentDoctor extends StatefulWidget {
bool isFromRegistration ;
RateAppointmentDoctor ( { Key key , this . isFromRegistration = false } ) : super ( key: key ) ;
@ override
_RateAppointmentDoctorState createState ( ) = > _RateAppointmentDoctorState ( ) ;
}
@ -158,12 +165,31 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
child: DefaultButton (
TranslationBase . of ( context ) . later ,
( ) {
Navigator . pushReplacement (
context ,
FadePage (
page: LandingPage ( ) ,
) ,
) ;
/ / if ( widget . isFromRegistration ) {
ConfirmDialog dialog = new ConfirmDialog (
context: context ,
confirmMessage: TranslationBase . of ( context ) . validInsurance ,
okText: TranslationBase . of ( context ) . yes ,
cancelText: TranslationBase . of ( context ) . no ,
okFunction: ( ) {
ConfirmDialog . closeAlertDialog ( context ) ;
Navigator . pushAndRemoveUntil (
context ,
MaterialPageRoute ( builder: ( context ) = > LandingPage ( ) ) ,
( Route < dynamic > route ) = > false ,
) ;
Navigator . push ( context , FadePage ( page: InsuranceUpdate ( ) ) ) ;
} ,
cancelFunction: ( ) = > { } ) ;
dialog . showAlertDialog ( context ) ;
/ / } else {
/ / Navigator . pushReplacement (
/ / context ,
/ / FadePage (
/ / page: LandingPage ( ) ,
/ / ) ,
/ / ) ;
/ / }
} ,
color: CustomColors . accentColor ,
textColor: Colors . white ,