Booking Filters Update

merge-requests/390/head
Mirza.Shafique 4 years ago
parent 3af1676730
commit afb08fcd0a

@ -52,6 +52,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
final GlobalKey clinicDropdownKey = GlobalKey(); final GlobalKey clinicDropdownKey = GlobalKey();
final GlobalKey projectDropdownKey = GlobalKey(); final GlobalKey projectDropdownKey = GlobalKey();
TextEditingController ageController = new TextEditingController();
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
String radioValue = null; String radioValue = null;
@ -65,124 +66,158 @@ class _SearchByClinicState extends State<SearchByClinic> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
if (radioValue == null) radioValue = TranslationBase.of(context).female; if (projectViewModel.isLogin) {
if (radioValue == null) {
if (projectViewModel.user.gender == 1) {
radioValue = TranslationBase.of(context).male;
} else {
radioValue = TranslationBase.of(context).female;
}
}
} else if (radioValue == null) {
radioValue = TranslationBase.of(context).female;
}
if (ageController.text.isEmpty) {
ageController.text = projectViewModel.isLogin ? projectViewModel.user.age.toString() : "";
ageController.selection = TextSelection.fromPosition(TextPosition(offset: ageController.text.length));
}
return Container( return Container(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Padding( if (projectViewModel.isLogin)
padding: const EdgeInsets.only( Column(
left: 20, children: [
right: 20, Padding(
top: 20, padding: const EdgeInsets.only(
), left: 20,
child: Text( right: 20,
TranslationBase.of(context).doctorFilter, top: 20,
style: TextStyle( ),
fontSize: 16, child: Text(
fontWeight: FontWeight.w600, TranslationBase.of(context).doctorFilter,
letterSpacing: -0.64, style: TextStyle(
), fontSize: 16,
), fontWeight: FontWeight.w600,
), letterSpacing: -0.64,
mHeight(30), ),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 20, right: 20),
child: Text(
TranslationBase.of(context).gender,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
color: Colors.black,
fontWeight: FontWeight.w600,
), ),
), ),
), mHeight(30),
Container( Column(
padding: EdgeInsets.only(left: 6, right: 6), crossAxisAlignment: CrossAxisAlignment.start,
child: Row(
children: [ children: [
Flexible( Padding(
child: Row( padding: const EdgeInsets.only(left: 20, right: 20),
children: [ child: Text(
Radio( TranslationBase.of(context).gender,
value: TranslationBase.of(context).female, style: TextStyle(
groupValue: radioValue, fontSize: 12,
onChanged: (v) { letterSpacing: -0.48,
setState(() { color: Colors.black,
radioValue = v; fontWeight: FontWeight.w600,
});
},
), ),
Text( ),
TranslationBase.of(context).female, ),
style: TextStyle( Container(
fontSize: 12, padding: EdgeInsets.only(left: 6, right: 6),
letterSpacing: -0.48, child: Row(
fontWeight: FontWeight.w600, children: [
), Flexible(
child: Row(
children: [
Radio(
value: TranslationBase.of(context).female,
groupValue: radioValue,
onChanged: (v) {
setState(() {
radioValue = v;
});
},
),
Text(
TranslationBase.of(context).female,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
)),
Flexible(
child: Row(
children: [
Radio(
value: TranslationBase.of(context).male,
groupValue: radioValue,
onChanged: (v) {
setState(() {
radioValue = v;
});
},
),
Text(
TranslationBase.of(context).male,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
)),
],
),
),
],
),
Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
margin: EdgeInsets.only(left: 20, right: 20),
padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 2),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Age",
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
color: Colors.black,
fontWeight: FontWeight.w600,
), ),
], ),
)), TextField(
Flexible( controller: ageController,
child: Row( style: TextStyle(
children: [ fontSize: 15,
Radio( letterSpacing: -0.59,
value: TranslationBase.of(context).male, color: Colors.black,
groupValue: radioValue,
onChanged: (v) {
setState(() {
radioValue = v;
});
},
), ),
Text( decoration: InputDecoration(
TranslationBase.of(context).male, contentPadding: EdgeInsets.zero,
style: TextStyle( border: OutlineInputBorder(
fontSize: 12, borderSide: BorderSide.none,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
), ),
), ),
], ),
)), // Text(
], // projectViewModel.isLogin ? projectViewModel.user.age.toString() : "",
), // style: TextStyle(
), // fontSize: 15,
], // letterSpacing: -0.59,
), // color: Colors.black,
Container( // ),
width: double.infinity, // ),
decoration: containerRadius(Colors.white, 12), ],
margin: EdgeInsets.only(left: 20, right: 20),
padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Age",
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
color: Colors.black,
fontWeight: FontWeight.w600,
),
),
Text(
projectViewModel.isLogin ? projectViewModel.user.age.toString() : "",
style: TextStyle(
fontSize: 15,
letterSpacing: -0.59,
color: Colors.black,
), ),
), ),
], ],
), ),
),
Padding( Padding(
padding: const EdgeInsets.only(left: 6, right: 6, top: 16), padding: const EdgeInsets.only(left: 6, right: 6, top: 16),
child: Row( child: Row(

@ -208,7 +208,7 @@ class ConfirmPaymentPage extends StatelessWidget {
transID = Utils.getAdvancePaymentTransID(advanceModel.hospitalsModel.iD, int.parse(advanceModel.fileNumber)); transID = Utils.getAdvancePaymentTransID(advanceModel.hospitalsModel.iD, int.parse(advanceModel.fileNumber));
browser.openPaymentBrowser(amount, "Advance Payment", transID, advanceModel.hospitalsModel.iD.toString(), advanceModel.email, paymentMethod, patientInfoAndMobileNumber.patientType, browser.openPaymentBrowser(amount, "Advance Payment", transID, advanceModel.hospitalsModel.iD.toString(), advanceModel.email, paymentMethod, patientInfoAndMobileNumber.patientType,
advanceModel.patientName, advanceModel.fileNumber, authenticatedUser, browser, false); advanceModel.patientName, advanceModel.fileNumber, authenticatedUser, browser, false,null,null);
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {

Loading…
Cancel
Save