modified Child vaccintion note

merge-update-with-lab-changes
Amjad amireh 6 years ago
parent 8ddec0ad99
commit 83735ab68d

@ -84,6 +84,10 @@ const GET_NEW_USER_REQUEST=
const GET_NEWCHILD_REQUEST= const GET_NEWCHILD_REQUEST=
'Services/Community.svc/REST/CreateNewBaby'; 'Services/Community.svc/REST/CreateNewBaby';
///delteChild
const DELETE_CHILD_REQUEST=
'Services/Community.svc/REST/DeleteBaby';
///addNewTABLE ///addNewTABLE
const GET_TABLE_REQUEST= const GET_TABLE_REQUEST=

@ -0,0 +1,76 @@
class DeleteBaby {
bool isLogin;
int babyID;
int editedBy;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
DeleteBaby(
{this.isLogin,
this.babyID,
this.editedBy,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
DeleteBaby.fromJson(Map<String, dynamic> json) {
isLogin = json['IsLogin'];
babyID = json['BabyID'];
editedBy = json['EditedBy'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['IsLogin'] = this.isLogin;
data['BabyID'] = this.babyID;
data['EditedBy'] = this.editedBy;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
return data;
}
}

@ -0,0 +1,75 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
import '../base_service.dart';
class DeleteBabyService extends BaseService{
List<CreateNewBaby> createNewBabyModelList = List();
List<List_UserInformationModel> userModelList = List();
List<CreateNewUser_New> newUserModelList = List();
List<DeleteBaby> deleteBabyModelList= List();
Future getDeleteBabyOrder({DeleteBaby deleteChild,int babyID}) async {
hasError = false;
await getUser();
Map<String, dynamic> body = Map.from(deleteChild.toJson());
// body['CreatedBy'] = 102;
body['EditedBy'] = 102;
//body['BabyID'] = babyID;
//body['BabyID'] = createNewBabyModelList ;
// body['AlertBy'] = 2;
// body['EmailAddress'] = user.emailAddress;
body['IsLogin'] = true;
body['LogInTokenID'] = await sharedPref.getString(TOKEN);
body['MobileNumber'] = user.mobileNumber;
body['NationalID'] = user.nationalityID;
body['ZipCode'] = user.zipCode;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(DELETE_CHILD_REQUEST,
onSuccess: (dynamic response, int statusCode) {
var asd ="";
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
// Future getCreateNewBabyOrders({CreateNewBaby newChild,int userID}) async {
// hasError = false;
// await getUser();
// Map<String, dynamic> body = Map.from(newChild.toJson());
// body['CreatedBy'] = 102;
// body['EditedBy'] = 102;
// body['UserID'] = userID;
// body['AlertBy'] = 2;
// body['EmailAddress'] = user.emailAddress;
// body['IsLogin'] = true;
// body['LogInTokenID'] = await sharedPref.getString(TOKEN);
// body['MobileNumber'] = user.mobileNumber;
// body['NationalID'] = user.nationalityID;
// body['ZipCode'] = user.zipCode;
//
// body['isDentalAllowedBackend'] = false;
//
// await baseAppClient.post(GET_NEWCHILD_REQUEST,
// onSuccess: (dynamic response, int statusCode) {
// var asd ="";
// },
// onFailure: (String error, int statusCode) {
// hasError = true;
// super.error = error;
// }, body: body);
// }
}

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart'; import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart'; import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/delete_baby_service.dart';
import '../../../locator.dart'; import '../../../locator.dart';
import '../base_view_model.dart'; import '../base_view_model.dart';
@ -11,6 +13,7 @@ class AddNewChildViewModel extends BaseViewModel {
CreteNewBabyService _creteNewBabyService = locator<CreteNewBabyService>(); CreteNewBabyService _creteNewBabyService = locator<CreteNewBabyService>();
ChildVaccinesService _childVaccinesService = locator<ChildVaccinesService>(); ChildVaccinesService _childVaccinesService = locator<ChildVaccinesService>();
// DeleteBabyService _deleteBabyService = locator<DeleteBabyService>();
bool isAdded = false; bool isAdded = false;
///create new baby ///create new baby
createNewBabyOrders({ CreateNewBaby newChild}) async { createNewBabyOrders({ CreateNewBaby newChild}) async {
@ -22,15 +25,18 @@ class AddNewChildViewModel extends BaseViewModel {
} else { } else {
isAdded = true; isAdded = true;
setState(ViewState.Idle); setState(ViewState.Idle);
// await _childVaccinesService.getAllBabyInformationOrders(); await _childVaccinesService.getAllBabyInformationOrders();
// if (_childVaccinesService.hasError) { if (_childVaccinesService.hasError) {
// error = _childVaccinesService.error; error = _childVaccinesService.error;
// setState(ViewState.Error); setState(ViewState.Error);
// } else{ } else{
//
// } }
} }
} }
} }

@ -1,7 +1,12 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart'; import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart';
//========
import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/delete_baby_service.dart';
import '../../../locator.dart'; import '../../../locator.dart';
import '../base_view_model.dart'; import '../base_view_model.dart';
@ -11,6 +16,16 @@ class ChildVaccinesViewModel extends BaseViewModel{
List<List_BabyInformationModel> get babyInformationModelList=> _childVaccinesService.babyInformationModelList; List<List_BabyInformationModel> get babyInformationModelList=> _childVaccinesService.babyInformationModelList;
//===========
CreteNewBabyService _creteNewBabyService = locator<CreteNewBabyService>();
DeleteBabyService _deleteBabyService = locator<DeleteBabyService>();
bool isAdded = false;
bool isDeleted = false;
//============
getNewUserOrders() async { getNewUserOrders() async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _childVaccinesService.getNewUserOrders(); await _childVaccinesService.getNewUserOrders();
@ -30,4 +45,29 @@ class ChildVaccinesViewModel extends BaseViewModel{
setState(ViewState.Idle); setState(ViewState.Idle);
} }
///delete baby
deleteBabyOrders({ DeleteBaby newChild}) async {
setState(ViewState.Busy);
//await _creteNewBabyService.getCreateNewBabyOrders(newChild: newChild, userID: _childVaccinesService.userID);
await _deleteBabyService.getDeleteBabyOrder(deleteChild: newChild,babyID: newChild.babyID);
//getDeleteBabyOrder(deleteChild: newChild,);
// getDeleteBabyOrder
if (_creteNewBabyService.hasError) {
error = _creteNewBabyService.error;
setState(ViewState.Error);
} else {
isDeleted = true;
setState(ViewState.Idle);
await _childVaccinesService.getAllBabyInformationOrders();
if (_childVaccinesService.hasError) {
error = _childVaccinesService.error;
setState(ViewState.Error);
} else{
}
}
}
} }

@ -13,6 +13,7 @@ import 'core/service/blood/blood_details_servies.dart';
import 'core/service/blood/blood_donation_service.dart'; import 'core/service/blood/blood_donation_service.dart';
import 'core/service/childvaccines/add_new_child_service.dart'; import 'core/service/childvaccines/add_new_child_service.dart';
import 'core/service/childvaccines/child_vaccines_service.dart'; import 'core/service/childvaccines/child_vaccines_service.dart';
import 'core/service/childvaccines/delete_baby_service.dart';
import 'core/service/childvaccines/user_information_service.dart'; import 'core/service/childvaccines/user_information_service.dart';
import 'core/service/childvaccines/vaccination_table_service.dart'; import 'core/service/childvaccines/vaccination_table_service.dart';
import 'core/service/contactus/finadus_service.dart'; import 'core/service/contactus/finadus_service.dart';
@ -123,6 +124,9 @@ void setupLocator() {
locator.registerLazySingleton(() => ChildVaccinesService()); locator.registerLazySingleton(() => ChildVaccinesService());
locator.registerLazySingleton(() => UserInformationService()); locator.registerLazySingleton(() => UserInformationService());
locator.registerLazySingleton(() => CreteNewBabyService()); locator.registerLazySingleton(() => CreteNewBabyService());
locator.registerLazySingleton(() => DeleteBabyService());
locator.registerLazySingleton(() => VaccinationTableService()); locator.registerLazySingleton(() => VaccinationTableService());

@ -133,13 +133,16 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
height: MediaQuery.of(context).size.height * 0.12, height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Container( Container(
height: MediaQuery.of(context).size.height * 0.12, height: MediaQuery.of(context).size.height * 0.12,
width: 170, width: 175,
color: Colors.white,
child: SecondaryButton( child: SecondaryButton(
textColor: textColor:
checkedValue == 1 ? Colors.white : Colors.black, checkedValue == 1 ? Colors.white : Colors.black,
@ -160,7 +163,8 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
), ),
Container( Container(
height: MediaQuery.of(context).size.height * 0.12, height: MediaQuery.of(context).size.height * 0.12,
width: 170, width: 175,
color: Colors.white,
child: SecondaryButton( child: SecondaryButton(
textColor: textColor:
checkedValue == 2 ? Colors.white : Colors.black, checkedValue == 2 ? Colors.white : Colors.black,
@ -236,15 +240,10 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
SizedBox( SizedBox(
height: 12, height: 12,
), ),
//========= Container(
],
),
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.12, height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(15),
child: SecondaryButton( child: SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
color: checkedValue == false color: checkedValue == false
@ -276,6 +275,12 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
}, },
), ),
), ),
//=========
],
),
),
),
// bottomSheet:
), ),
); );
} }

@ -1,8 +1,10 @@
import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
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/pages/ChildVaccines/add_newchild_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_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/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/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -11,6 +13,8 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'dialogs/delete_child.dart';
class ChildPage extends StatefulWidget { class ChildPage extends StatefulWidget {
@override @override
_ChildPageState createState() => _ChildPageState(); _ChildPageState createState() => _ChildPageState();
@ -18,6 +22,9 @@ class ChildPage extends StatefulWidget {
class _ChildPageState extends State<ChildPage> class _ChildPageState extends State<ChildPage>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
DeleteBaby deleteBaby = DeleteBaby();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var checkedValue = true; var checkedValue = true;
@ -84,23 +91,19 @@ class _ChildPageState extends State<ChildPage>
Icons.remove_red_eye, Icons.remove_red_eye,
color: Colors.red, color: Colors.red,
), ),
tooltip: 'Increase volume by 10', tooltip: '',
onPressed: () { onPressed: () {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: VaccinationTablePage(), page: VaccinationTablePage(),
//ChildPage(babyInformationModelList:model.BabyInformationModelList)
// HospitalsPage(
// findusHospitalModelList: model.FindusHospitalModelList,
// )
), ),
); );
// setState(() {
// // _volume += 10;
// // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber);
// });
}, },
) )
]), ]),
@ -111,11 +114,10 @@ class _ChildPageState extends State<ChildPage>
IconButton( IconButton(
icon: new Image.asset( icon: new Image.asset(
'assets/images/new-design/calender-secondary.png'), 'assets/images/new-design/calender-secondary.png'),
tooltip: 'Increase volume by 10', tooltip: '',
onPressed: () { onPressed: () {
setState(() { setState(() {
// _volume += 10;
// launch("tel://" +model.FindusHospitalModelList[index].phoneNumber);
}); });
}, },
), ),
@ -128,14 +130,31 @@ class _ChildPageState extends State<ChildPage>
icon: new Image.asset( icon: new Image.asset(
'assets/images/new-design/garbage.png'), 'assets/images/new-design/garbage.png'),
tooltip: '', tooltip: '',
onPressed: () { onPressed: ()async {
setState(() {
// _volume += 10; //=====================
// launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); await model.deleteBabyOrders(newChild:deleteBaby );
});
deleteBaby.babyID=model.babyInformationModelList[index]
.babyID;
await model.deleteBabyOrders(newChild:deleteBaby );
if(model.isDeleted){
AppToast.showSuccessToast(message: "Record Deleted");
Navigator.pop(context,model.isDeleted);
}else{
//TODO handling error
}
}, },
), ),
Texts("Birthday"), Texts("Delete"),
]), ]),
SizedBox( SizedBox(
height: 12, height: 12,
@ -153,7 +172,7 @@ class _ChildPageState extends State<ChildPage>
bottomSheet: Container( bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.12, height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(15),
child: SecondaryButton( child: SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
color: checkedValue == false color: checkedValue == false

@ -50,7 +50,8 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
child: Texts("Welcome back",fontSize: 20,), child: Texts("Welcome back",fontSize: 20,),
) , ) ,
), ),
Divider(color:Colors.black ,), Divider(color:Colors.black , indent: 10,
endIndent: 10,),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
@ -61,13 +62,17 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
) , ) ,
), ),
Divider(color:Colors.black ,), Divider(color:Colors.black , indent: 10,
endIndent: 10,),
Padding( Padding(
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
child:Container( child:Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15), margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields( child: TextFields(
hintText: model.user.emailAddress,//'Title', fillColor: Colors.red,
hintText: model.user.emailAddress,
controller: titleController, controller: titleController,
fontSize: 20, fontSize: 20,
hintColor: Colors.black, hintColor: Colors.black,
@ -75,9 +80,7 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
onChanged: (text) { onChanged: (text) {
addEmail=text; addEmail=text;
model.user.emailAddress==addEmail?checkedValue=false:checkedValue=true; model.user.emailAddress==addEmail?checkedValue=false:checkedValue=true;
// checkedValue=true;
// print("First text field: $text");
// print("First text field:"+ model.user.emailAddress);
}, },
validator: (value) { validator: (value) {
@ -99,7 +102,7 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
height: MediaQuery.of(context).size.height * 0.12, height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(15),
child: SecondaryButton( child: SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,),
@ -121,7 +124,7 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
height: MediaQuery.of(context).size.height * 0.12, height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(15),
child: SecondaryButton( child: SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
color: Color.fromRGBO(63, 72, 74, 1,), color: Color.fromRGBO(63, 72, 74, 1,),
@ -140,6 +143,7 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
), ),
), ),
// Texts( // Texts(
// // TranslationBase.of(context).advancePaymentLabel, // // TranslationBase.of(context).advancePaymentLabel,
// model.user.emailAddress, // model.user.emailAddress,
@ -148,253 +152,21 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
SizedBox( SizedBox(
height: 12, 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( SizedBox(
height: 12, 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( SizedBox(
height: 12, 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( SizedBox(
height: 12, 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( SizedBox(
height: 12, 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( SizedBox(
height: 10, height: 10,
), ),

@ -1,10 +1,14 @@
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class SelectGenderDialog extends StatefulWidget { class SelectGenderDialog extends StatefulWidget {
final Email;
const SelectGenderDialog({Key key, this.Email}) : super(key: key);
@override @override
_SelectGenderDialogState createState() => _SelectGenderDialogState(); _SelectGenderDialogState createState() => _SelectGenderDialogState();
} }
@ -31,6 +35,7 @@ class _SelectGenderDialogState extends State<SelectGenderDialog> {
child: ListTile( child: ListTile(
title: Text("Send the child's schedule to the email\n Tamer.dasdasdas@gmail.com "), title: Text("Send the child's schedule to the email\n Tamer.dasdasdas@gmail.com "),
), ),
), ),
) )
@ -77,6 +82,7 @@ class _SelectGenderDialogState extends State<SelectGenderDialog> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
AppToast.showSuccessToast(message: "Email Sended");
// widget.onValueSelected(beneficiaryType); // widget.onValueSelected(beneficiaryType);
Navigator.pop(context); Navigator.pop(context);
}, },

@ -0,0 +1,103 @@
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class DeleteChild extends StatefulWidget {
@override
_DeleteChildState createState() => _DeleteChildState();
}
class _DeleteChildState extends State<DeleteChild> {
@override
Widget build(BuildContext context) {
return SimpleDialog(
children: [
Container(
child: Column(
children: [
Divider(),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
setState(() {
//beneficiaryType = Gender.Male;
});
},
child: ListTile(
title: Text("Delete the child "),
),
),
)
],
),
SizedBox(
height: 5.0,
),
SizedBox(
height: 5.0,
),
SizedBox(
height: 5.0,
),
Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
child: Center(
child: Texts(
TranslationBase.of(context).cancel.toUpperCase(),
color: Colors.red,
),
),
),
),
),
),
Container(
width: 1,
height: 30,
color: Colors.grey[500],
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
// widget.onValueSelected(beneficiaryType);
Navigator.pop(context);
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(
TranslationBase.of(context).ok,
fontWeight: FontWeight.w400,
),
),
),
),
),
],
)
],
),
)
],
);
}
}

@ -61,67 +61,7 @@ class VaccinationTablePage extends StatelessWidget {
],), ],),
Divider(color:Colors.black ,), Divider(color:Colors.black ,),
// Row(children:[Texts("CHILD NAME"),]),
// Row(children:[Texts(model.babyInformationModelList[index].babyName.trim()),]),
// Row(
// children: [IconButton(
// icon: Image.asset(model.babyInformationModelList[index].gender==1? 'assets/images/new-design/male.png':'assets/images/new-design/female.png'),
// tooltip: '',
// onPressed: () {
// setState(() {
// // _volume += 10;
// // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber);
// });
// },
// ),
// Texts(model.babyInformationModelList[index].genderDescription),
// IconButton(
// icon: Icon(Icons.remove_red_eye,color: Colors.red,),
// tooltip: 'Increase volume by 10',
// onPressed: () {
// Navigator.push(
// context,
// FadePage(
// page: VaccinationTablePage(),
//
// //ChildPage(babyInformationModelList:model.BabyInformationModelList)
// // HospitalsPage(
// // findusHospitalModelList: model.FindusHospitalModelList,
// // )
//
// ),
// );
// // setState(() {
// // // _volume += 10;
// // // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber);
// // });
// },
// )]
// ),
// Row(children:[Texts("Birthday"),]),
// Row(children:[IconButton(
// icon: new Image.asset('assets/images/new-design/calender-secondary.png'),
// tooltip: 'Increase volume by 10',
// onPressed: () {
// setState(() {
// // _volume += 10;
// // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber);
// });
// },
// ),
// Texts(DateUtil.yearMonthDay(model.babyInformationModelList[index].dOB)),]),
// Row(children:[IconButton(
// icon: new Image.asset('assets/images/new-design/garbage.png'),
// tooltip: '',
// onPressed: () {
// setState(() {
// // _volume += 10;
// // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber);
// });
// },
// ),
// Texts("Birthday"),]),
], ],
) )

@ -46,6 +46,7 @@ class TextFields extends StatefulWidget {
this.suffixIcon, this.suffixIcon,
this.autoFocus, this.autoFocus,
this.onChanged, this.onChanged,
// this.initialValue, // this.initialValue,
this.minLines, this.minLines,
this.maxLines, this.maxLines,
@ -72,6 +73,7 @@ class TextFields extends StatefulWidget {
this.fontSize = 16.0, this.fontSize = 16.0,
this.fontWeight = FontWeight.w700, this.fontWeight = FontWeight.w700,
this.autoValidate = false, this.autoValidate = false,
this.fillColor,
this.hintColor}) this.hintColor})
: super(key: key); : super(key: key);
@ -108,6 +110,7 @@ class TextFields extends StatefulWidget {
final bool focus; final bool focus;
final bool borderOnlyError; final bool borderOnlyError;
final Color hintColor; final Color hintColor;
final Color fillColor;
@override @override
_TextFieldsState createState() => _TextFieldsState(); _TextFieldsState createState() => _TextFieldsState();
@ -242,6 +245,7 @@ class _TextFieldsState extends State<TextFields> {
.textTheme .textTheme
.body2 .body2
.copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight), .copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight),
inputFormatters: widget.keyboardType == TextInputType.phone inputFormatters: widget.keyboardType == TextInputType.phone
? <TextInputFormatter>[ ? <TextInputFormatter>[
WhitelistingTextInputFormatter.digitsOnly, WhitelistingTextInputFormatter.digitsOnly,
@ -249,12 +253,15 @@ class _TextFieldsState extends State<TextFields> {
] ]
: widget.inputFormatters, : widget.inputFormatters,
decoration: InputDecoration( decoration: InputDecoration(
counterText: "", counterText: "",
hintText: widget.hintText, hintText: widget.hintText,
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: widget.fontSize, fontSize: widget.fontSize,
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,
color: widget.hintColor ?? Theme.of(context).hintColor, color: widget.hintColor ?? Theme.of(context).hintColor,
), ),
contentPadding: widget.padding != null contentPadding: widget.padding != null
? widget.padding ? widget.padding

Loading…
Cancel
Save