|
|
|
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/medical/my_balance_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.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/data_display/text.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/input/text_field.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 ChildVaccinesPage extends StatefulWidget {
|
|
|
|
@override
|
|
|
|
_ChildVaccinesPageState createState() => _ChildVaccinesPageState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _ChildVaccinesPageState extends State<ChildVaccinesPage>
|
|
|
|
with SingleTickerProviderStateMixin {
|
|
|
|
TextEditingController titleController = TextEditingController();
|
|
|
|
var checkedValue = false;
|
|
|
|
String addEmail = "";
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return BaseView<UserInformationViewModel>(
|
|
|
|
onModelReady: (model) => model.getUserInformationRequestOrders(),
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
isShowAppBar: true,
|
|
|
|
baseViewModel: model,
|
|
|
|
appBarTitle: TranslationBase.of(context).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(
|
|
|
|
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(
|
|
|
|
TranslationBase.of(context).msg_email_address_up_to_date,
|
|
|
|
fontSize: 20,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
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,
|
|
|
|
padding: EdgeInsets.all(15),
|
|
|
|
child: SecondaryButton(
|
|
|
|
textColor: Colors.white,
|
|
|
|
color: checkedValue == false
|
|
|
|
? Colors.white24
|
|
|
|
: Color.fromRGBO(
|
|
|
|
63,
|
|
|
|
72,
|
|
|
|
74,
|
|
|
|
1,
|
|
|
|
),
|
|
|
|
label: TranslationBase.of(context).updateEmail,
|
|
|
|
//
|
|
|
|
onTap: () {
|
|
|
|
model.user.emailAddress = addEmail.toString();
|
|
|
|
AppToast.showSuccessToast(
|
|
|
|
message: TranslationBase.of(context).updateEmailMsg);
|
|
|
|
// bloodDetails.city=_selectedHospital.toString();
|
|
|
|
|
|
|
|
// bloodDetails.
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
height: MediaQuery.of(context).size.height * 0.12,
|
|
|
|
width: double.infinity,
|
|
|
|
padding: EdgeInsets.all(15),
|
|
|
|
child: SecondaryButton(
|
|
|
|
textColor: Colors.white,
|
|
|
|
color: Color.fromRGBO(
|
|
|
|
63,
|
|
|
|
72,
|
|
|
|
74,
|
|
|
|
1,
|
|
|
|
),
|
|
|
|
label: TranslationBase.of(context).viewListChildren,
|
|
|
|
//
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
context,
|
|
|
|
FadePage(
|
|
|
|
page: ChildPage(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
// Texts(
|
|
|
|
// // TranslationBase.of(context).advancePaymentLabel,
|
|
|
|
// model.user.emailAddress,
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
// ),
|
|
|
|
SizedBox(
|
|
|
|
height: 12,
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
height: 12,
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
height: 12,
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
height: 12,
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
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,
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|