@ -1,10 +1,10 @@
import ' package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart ' ;
import ' package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart ' ;
import ' package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart ' ;
import ' package:diplomaticquarterapp/pages/base/base_view.dart ' ;
import ' package:diplomaticquarterapp/pages/base/base_view.dart ' ;
import ' package:diplomaticquarterapp/uitl/app_toast.dart ' ;
import ' package:diplomaticquarterapp/uitl/app_toast.dart ' ;
import ' package:diplomaticquarterapp/uitl/translations_delegate_base.dart ' ;
import ' package:diplomaticquarterapp/widgets/buttons/secondary_button.dart ' ;
import ' package:diplomaticquarterapp/widgets/buttons/secondary_button.dart ' ;
import ' package:diplomaticquarterapp/widgets/data_display/text.dart ' ;
import ' package:diplomaticquarterapp/widgets/data_display/text.dart ' ;
import ' package:diplomaticquarterapp/widgets/input/text_field.dart ' ;
import ' package:diplomaticquarterapp/widgets/input/text_field.dart ' ;
@ -13,214 +13,218 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import ' package:flutter/cupertino.dart ' ;
import ' package:flutter/cupertino.dart ' ;
import ' package:flutter/material.dart ' ;
import ' package:flutter/material.dart ' ;
class ChildVaccinesPage extends StatefulWidget {
class ChildVaccinesPage extends StatefulWidget {
@ override
@ override
_ChildVaccinesPageState createState ( ) = > _ChildVaccinesPageState ( ) ;
_ChildVaccinesPageState createState ( ) = > _ChildVaccinesPageState ( ) ;
}
}
class _ChildVaccinesPageState extends State < ChildVaccinesPage >
class _ChildVaccinesPageState extends State < ChildVaccinesPage >
with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
TextEditingController titleController = TextEditingController ( ) ;
TextEditingController titleController = TextEditingController ( ) ;
var checkedValue = false ;
var checkedValue = false ;
String addEmail = " " ;
String addEmail = " " ;
@ override
@ override
Widget build ( BuildContext context ) {
Widget build ( BuildContext context ) {
return BaseView < UserInformationViewModel > (
return BaseView < UserInformationViewModel > (
onModelReady: ( model ) = > model . getUserInformationRequestOrders ( ) ,
onModelReady: ( model ) = > model . getUserInformationRequestOrders ( ) ,
builder: ( _ , model , w ) = > AppScaffold (
builder: ( _ , model , w ) = > AppScaffold (
isShowAppBar: true ,
isShowAppBar: true ,
baseViewModel: model ,
baseViewModel: model ,
appBarTitle: " Vaccination " , / / TranslationBase . of ( context ) . advancePayment ,
appBarTitle: TranslationBase . of ( context ) . vaccination ,
body: SingleChildScrollView (
/ / TranslationBase . of ( context ) . advancePayment ,
physics: ScrollPhysics ( ) ,
body: SingleChildScrollView (
child: Column (
physics: ScrollPhysics ( ) ,
crossAxisAlignment: CrossAxisAlignment . start ,
child: Column (
mainAxisAlignment: MainAxisAlignment . spaceAround ,
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
mainAxisAlignment: MainAxisAlignment . spaceAround ,
SizedBox (
children: [
height: 20 ,
SizedBox (
) ,
height: 20 ,
) ,
Padding (
Padding (
padding: const EdgeInsets . all ( 10.0 ) ,
padding: const EdgeInsets . all ( 10.0 ) ,
child: Container (
child: Container (
child: Texts ( " Welcome back " , fontSize: 20 , ) ,
child: Texts (
) ,
TranslationBase . of ( context ) . welcomeBack ,
) ,
fontSize: 20 ,
Divider ( color: Colors . black , indent: 10 ,
endIndent: 10 , ) ,
SizedBox (
height: 20 ,
) ,
Padding (
padding: const EdgeInsets . all ( 10.0 ) ,
child: Container (
child: Texts ( " Please ensure that the email address is up-to-date and process to view the schedule " , fontSize: 20 , ) ,
) ,
) ,
) ,
) ,
Divider ( color: Colors . black , indent: 10 ,
) ,
endIndent: 10 , ) ,
Divider (
Padding (
color: Colors . black ,
padding: const EdgeInsets . all ( 10.0 ) ,
indent: 10 ,
child: Container (
endIndent: 10 ,
) ,
margin: EdgeInsets . only ( left: 10 , right: 10 , top: 15 ) ,
SizedBox (
child: TextFields (
height: 20 ,
fillColor: Colors . red ,
) ,
Padding (
hintText: model . user . emailAddress ,
padding: const EdgeInsets . all ( 10.0 ) ,
controller: titleController ,
child: Container (
fontSize: 20 ,
child: Texts (
hintColor: Colors . black ,
TranslationBase . of ( context ) . msg_email_address_up_to_date ,
fontWeight: FontWeight . w600 ,
fontSize: 20 ,
onChanged: ( text ) {
addEmail = text ;
model . user . emailAddress = = addEmail ? checkedValue = false : checkedValue = true ;
} ,
validator: ( value ) {
if ( value = = null )
{
return model . user . emailAddress ;
}
else
{
return model . user . emailAddress ; }
} ,
) ,
) ,
) ,
) ,
Container (
) ,
height: MediaQuery . of ( context ) . size . height * 0.12 ,
) ,
width: double . infinity ,
padding: EdgeInsets . all ( 15 ) ,
child: SecondaryButton (
textColor: Colors . white ,
color: checkedValue = = false ? Colors . white24: Color . fromRGBO ( 63 , 72 , 74 , 1 , ) ,
label: " UPDATE EMAIL " ,
/ /
onTap: ( ) {
model . user . emailAddress = addEmail . toString ( ) ;
AppToast . showSuccessToast (
message: " Email updated " ) ;
/ / bloodDetails . city = _selectedHospital . toString ( ) ;
/ / bloodDetails .
} ,
) ,
Divider (
color: Colors . black ,
indent: 10 ,
endIndent: 10 ,
) ,
Padding (
padding: const EdgeInsets . all ( 10.0 ) ,
child: Container (
margin: EdgeInsets . only ( left: 10 , right: 10 , top: 15 ) ,
child: TextFields (
fillColor: Colors . red ,
hintText: model . user . emailAddress ,
controller: titleController ,
fontSize: 20 ,
hintColor: Colors . black ,
fontWeight: FontWeight . w600 ,
onChanged: ( text ) {
addEmail = text ;
model . user . emailAddress = = addEmail
? checkedValue = false
: checkedValue = true ;
} ,
validator: ( value ) {
if ( value = = null ) {
return model . user . emailAddress ;
} else {
return model . user . emailAddress ;
}
} ,
) ,
) ,
Container (
) ,
height: MediaQuery . of ( context ) . size . height * 0.12 ,
) ,
width: double . infinity ,
Container (
height: MediaQuery . of ( context ) . size . height * 0.12 ,
padding: EdgeInsets . all ( 15 ) ,
width: double . infinity ,
child: SecondaryButton (
padding: EdgeInsets . all ( 15 ) ,
textColor: Colors . white ,
child: SecondaryButton (
color: Color . fromRGBO ( 63 , 72 , 74 , 1 , ) ,
textColor: Colors . white ,
label: " VIEW LIST OF CHILDREN " ,
color: checkedValue = = false
/ /
? Colors . white24
onTap: ( ) = > Navigator . push (
: Color . fromRGBO (
context ,
63 ,
FadePage (
72 ,
page: ChildPage ( ) ,
74 ,
1 ,
) ,
) ,
) ,
label: TranslationBase . of ( context ) . updateEmail ,
/ /
) ,
onTap: ( ) {
) ,
model . user . emailAddress = addEmail . toString ( ) ;
AppToast . showSuccessToast (
/ / Texts (
message: TranslationBase . of ( context ) . updateEmailMsg ) ;
/ / / / TranslationBase . of ( context ) . advancePaymentLabel ,
/ / bloodDetails . city = _selectedHospital . toString ( ) ;
/ / model . user . emailAddress ,
/ / textAlign: TextAlign . center ,
/ / bloodDetails .
/ / ) ,
} ,
SizedBox (
) ,
height: 12 ,
) ,
) ,
Container (
SizedBox (
height: MediaQuery . of ( context ) . size . height * 0.12 ,
height: 12 ,
width: double . infinity ,
) ,
padding: EdgeInsets . all ( 15 ) ,
SizedBox (
child: SecondaryButton (
height: 12 ,
textColor: Colors . white ,
color: Color . fromRGBO (
63 ,
72 ,
74 ,
1 ,
) ,
) ,
label: TranslationBase . of ( context ) . viewListChildren ,
SizedBox (
/ /
height: 12 ,
onTap: ( ) = > Navigator . push (
context ,
FadePage (
page: ChildPage ( ) ,
) ,
) ,
) ,
) ,
) ,
SizedBox (
/ / Texts (
height: 12 ,
/ / / / TranslationBase . of ( context ) . advancePaymentLabel ,
) ,
/ / model . user . emailAddress ,
/ / textAlign: TextAlign . center ,
/ / ) ,
SizedBox (
height: 12 ,
) ,
SizedBox (
height: 12 ,
) ,
SizedBox (
height: 12 ,
) ,
SizedBox (
SizedBox (
height: 10 ,
height: 12 ,
) ,
) ,
/ / Row (
/ / mainAxisAlignment: MainAxisAlignment . center ,
/ / crossAxisAlignment: CrossAxisAlignment . center ,
/ / children: [
/ / Center (
/ / child: Container (
/ / color: Colors . white ,
/ / width: 350 ,
/ / child: InkWell (
/ / onTap: ( ) {
/ / showDialog (
/ / context: context ,
/ / builder: ( _ ) = >
/ / AssetGiffyDialog (
/ / title: Text (
/ / " " ,
/ / style: TextStyle (
/ / fontSize: 22.0 ,
/ / fontWeight:
/ / FontWeight
/ / . w600 ) ,
/ / ) ,
/ / image: Image . asset (
/ / ' assets/images/BloodChrt_EN.png ' ) ,
/ / buttonCancelText:
/ / Text ( ' cancel ' ) ,
/ / buttonCancelColor:
/ / Colors . grey ,
/ / onlyCancelButton: true ,
/ / ) ) ;
/ / } ,
/ / child: Container (
/ / width: 250 ,
/ / height: 200 ,
/ / child: Image . asset (
/ / ' assets/images/BloodChrt_EN.png ' ) ) ,
/ / ) ,
/ / ) ,
/ / ) ,
/ / ] ,
/ / ) ,
SizedBox (
SizedBox (
height: MediaQuery . of ( context ) . size . height * 0.15 ,
height: 12 ,
)
] ,
) ,
) ,
SizedBox (
height: 10 ,
) ,
/ / Row (
/ / mainAxisAlignment: MainAxisAlignment . center ,
/ / crossAxisAlignment: CrossAxisAlignment . center ,
/ / children: [
/ / Center (
/ / child: Container (
/ / color: Colors . white ,
/ / width: 350 ,
/ / child: InkWell (
/ / onTap: ( ) {
/ / showDialog (
/ / context: context ,
/ / builder: ( _ ) = >
/ / AssetGiffyDialog (
/ / title: Text (
/ / " " ,
/ / style: TextStyle (
/ / fontSize: 22.0 ,
/ / fontWeight:
/ / FontWeight
/ / . w600 ) ,
/ / ) ,
/ / image: Image . asset (
/ / ' assets/images/BloodChrt_EN.png ' ) ,
/ / buttonCancelText:
/ / Text ( ' cancel ' ) ,
/ / buttonCancelColor:
/ / Colors . grey ,
/ / onlyCancelButton: true ,
/ / ) ) ;
/ / } ,
/ / child: Container (
/ / width: 250 ,
/ / height: 200 ,
/ / child: Image . asset (
/ / ' assets/images/BloodChrt_EN.png ' ) ) ,
/ / ) ,
/ / ) ,
/ / ) ,
/ / ] ,
/ / ) ,
SizedBox (
height: MediaQuery . of ( context ) . size . height * 0.15 ,
)
] ,
) ,
) ,
) ,
) ,
) ,
) ;
) ;
}
}
}
}