You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/lib/pages/ChildVaccines/child_vaccines_page.dart

457 lines
19 KiB
Dart

4 years ago
4 years ago
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart';
4 years ago
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
4 years ago
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart';
4 years ago
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
4 years ago
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
4 years ago
import 'package:flutter/cupertino.dart';
4 years ago
import 'package:flutter/material.dart';
4 years ago
4 years ago
4 years ago
class ChildVaccinesPage extends StatefulWidget {
@override
_ChildVaccinesPageState createState() => _ChildVaccinesPageState();
}
4 years ago
class _ChildVaccinesPageState extends State<ChildVaccinesPage>
with SingleTickerProviderStateMixin{
4 years ago
TextEditingController titleController = TextEditingController();
var checkedValue=false;
String addEmail="";
4 years ago
@override
Widget build(BuildContext context) {
4 years ago
4 years ago
return BaseView<UserInformationViewModel>(
onModelReady: (model) => model.getUserInformatioRequestOrders(),
4 years ago
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
appBarTitle: " Vaccination",//TranslationBase.of(context).advancePayment,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
SizedBox(
height: 20,
),
Padding(
padding: const EdgeInsets.all(10.0),
child:Container(
child: Texts("Welcome back",fontSize: 20,),
) ,
),
Divider(color:Colors.black ,),
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 ,),
Padding(
padding: const EdgeInsets.all(10.0),
child:Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: model.user.emailAddress,//'Title',
controller: titleController,
fontSize: 20,
hintColor: Colors.black,
fontWeight: FontWeight.w600,
onChanged: (text) {
addEmail=text;
model.user.emailAddress==addEmail?checkedValue=false:checkedValue=true;
// checkedValue=true;
// print("First text field: $text");
// print("First text field:"+ model.user.emailAddress);
},
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(12),
child: SecondaryButton(
textColor: Colors.white,
color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,),
label: "UPDATE EMAIL",
//
onTap: (){
4 years ago
model.user.emailAddress=addEmail.toString();
4 years ago
AppToast.showSuccessToast(
message: "Email updated");
// bloodDetails.city=_selectedHospital.toString();
// bloodDetails.
},
),
),
Container(
height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity,
padding: EdgeInsets.all(12),
child: SecondaryButton(
textColor: Colors.white,
color: Color.fromRGBO(63, 72, 74, 1,),
label: " VIEW LIST OF CHILDREN",
//
4 years ago
onTap: () => Navigator.push(
context,
FadePage(
page: ChildPage(),
//ChildPage(babyInformationModelList:model.BabyInformationModelList)
// HospitalsPage(
// findusHospitalModelList: model.FindusHospitalModelList,
// )
),
),
4 years ago
),
),
// Texts(
// // TranslationBase.of(context).advancePaymentLabel,
// model.user.emailAddress,
// textAlign: TextAlign.center,
// ),
SizedBox(
height: 12,
),
// InkWell(
// onTap: () => confirmSelectHospitalDialog(model.CitiesModelList),//model.hospitals
// child: Container(
// padding: EdgeInsets.all(12),
// width: double.infinity,
// height: 65,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(12),
// color: Colors.white),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Texts(getHospitalName()),
// Icon(Icons.arrow_drop_down)
// ],
// ),
// ),
// ),
SizedBox(
height: 12,
),
// InkWell(
// //======Gender========
// onTap: () => confirmSelectGenderDialog(),//confirmSelectBeneficiaryDialog(model),
// child: Container(
// padding: EdgeInsets.all(12),
// width: double.infinity,
// height: 65,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(12),
// color: Colors.white),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// //Texts(getBeneficiaryType()),
// Texts(getGender()),
// Icon(Icons.arrow_drop_down)
// ],
// ),
// ),
// ),
// if (beneficiaryType == BeneficiaryType.MyFamilyFiles)
// SizedBox(
// height: 12,
// ),
// if (beneficiaryType == BeneficiaryType.MyFamilyFiles)
// InkWell(
// onTap: () {
// model.getFamilyFiles().then((value) {
// confirmSelectFamilyDialog(model
// .getAllSharedRecordsByStatusResponse
// .getAllSharedRecordsByStatusList);
// }).showProgressBar(
// text: "Loading",
// backgroundColor: Colors.blue.withOpacity(0.6));
// },
// child: Container(
// padding: EdgeInsets.all(12),
// width: double.infinity,
// height: 65,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(12),
// color: Colors.white),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Texts(getFamilyMembersName()),
// Icon(Icons.arrow_drop_down)
// ],
// ),
// ),
// ),
SizedBox(
height: 12,
),
// InkWell(
// //======Gender========
// onTap: () => confirmSelectBloodDialog(),//confirmSelectBeneficiaryDialog(model),
// child: Container(
// padding: EdgeInsets.all(12),
// width: double.infinity,
// height: 65,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(12),
// color: Colors.white),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// //Texts(getBeneficiaryType()),
// Texts(getBlood()),
// Icon(Icons.arrow_drop_down)
// ],
// ),
// ),
// ),
// if (beneficiaryType == BeneficiaryType.MyFamilyFiles)
// SizedBox(
// height: 12,
// ),
// if (beneficiaryType == BeneficiaryType.MyFamilyFiles)
// InkWell(
// onTap: () {
// model.getFamilyFiles().then((value) {
// confirmSelectFamilyDialog(model
// .getAllSharedRecordsByStatusResponse
// .getAllSharedRecordsByStatusList);
// }).showProgressBar(
// text: "Loading",
// backgroundColor: Colors.blue.withOpacity(0.6));
// },
// child: Container(
// padding: EdgeInsets.all(12),
// width: double.infinity,
// height: 65,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(12),
// color: Colors.white),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Texts(getFamilyMembersName()),
// Icon(Icons.arrow_drop_down)
// ],
// ),
// ),
// ),
SizedBox(
height: 12,
),
// Row(
// children: [
// Container(
// child: Text(" To view the terms and conditions "),
// ),
// SizedBox(
// width: MediaQuery.of(context).size.height * 0.10,
// ),
// // InkWell(
// // onTap: () {
// // Navigator.of(context).push(MaterialPageRoute(
// // builder: (BuildContext context) => UserAgreementPage()));
// // },
// // child: Container(
// // child: Texts(" Click here ",color: Colors.blue,),
// // ),
// // )
// ],
// ),
SizedBox(
height: 12,
),
// Row(
// children: [
// Checkbox(
// onChanged: (bool value) {
// setState(() {
// checkedValue = value;
// });
// },
// // tristate: checkedValue==true,//i == 1,
// value: checkedValue,
// activeColor: Colors.red,//Color(0xFF6200EE),
// ),
// SizedBox(height: 10,),
// Row(children: [
//
// ],),
// SizedBox(
// width: 10,
// ),
// Text(
// 'I agree to the terms and conditions ',
// style: Theme.of(context).textTheme.subtitle1.copyWith(color: checkedValue? Colors.red : Colors.black),
// ),
// ],
// ),
// NewTextFields(
// hintText: TranslationBase.of(context).fileNumber,
// controller: _fileTextController,
// ),
// if (beneficiaryType == BeneficiaryType.OtherAccount)
// SizedBox(
// height: 12,
// ),
// if (beneficiaryType == BeneficiaryType.OtherAccount)
// InkWell(
// onTap: () {
// if (_fileTextController.text.isNotEmpty)
// model
// .getPatientInfoByPatientID(
// id: _fileTextController.text)
// .then((value) {
// confirmSelectPatientDialog(model.patientInfoList);
// }).showProgressBar(
// text: "Loading",
// backgroundColor:
// Colors.blue.withOpacity(0.6));
// else
// AppToast.showErrorToast(
// message: 'Please Enter The File Number');
// },
// child: Container(
// padding: EdgeInsets.all(12),
// width: double.infinity,
// height: 65,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(12),
// color: Colors.white),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Texts(getPatientName()),
// Icon(Icons.arrow_drop_down)
// ],
// ),
// ),
// ),
// SizedBox(
// height: 12,
// ),
// NewTextFields(
// hintText: TranslationBase.of(context).amount,
// keyboardType: TextInputType.number,
// onChanged: (value) {
// setState(() {
// amount = value;
// });
// },
// ),
// SizedBox(
// height: 12,
// ),
// NewTextFields(
// hintText: TranslationBase.of(context).depositorEmail,
// initialValue: model.user.emailAddress,
// onChanged: (value) {
// email = value;
// },
// ),
// SizedBox(
// height: 12,
// ),
// NewTextFields(
// hintText: TranslationBase.of(context).notes,
// controller: _notesTextController,
// ),
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,
)
],
),
),
),
);
4 years ago
}
}