search pages and dashboard updated

merge-requests/351/head
Sultan Khan 5 years ago
parent a8ef4a98a5
commit cf7d494944

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -57,7 +57,7 @@ const Map<String, Map<String, String>> localizedValues = {
'firstName': {'en': 'First Name', 'ar': 'الاسم الاول'}, 'firstName': {'en': 'First Name', 'ar': 'الاسم الاول'},
'middleName': {'en': 'Middle Name', 'ar': 'اسم الاب'}, 'middleName': {'en': 'Middle Name', 'ar': 'اسم الاب'},
'lastName': {'en': 'Last Name', 'ar': 'اسم العائلة'}, 'lastName': {'en': 'Last Name', 'ar': 'اسم العائلة'},
'phoneNumber': {'en': 'Phone Number ', 'ar': 'رقم الجوال'}, 'phoneNumber': {'en': "Patient's Phone Number ", 'ar': 'رقم الجوال'},
'patientID': {'en': 'Patient ID', 'ar': 'رقم المريض'}, 'patientID': {'en': 'Patient ID', 'ar': 'رقم المريض'},
'patientFile': {'en': 'Patient File', 'ar': 'ملف المريض'}, 'patientFile': {'en': 'Patient File', 'ar': 'ملف المريض'},
'familyMedicine': {'en': 'Family Medicine Clinic', 'ar': 'عيادة طب الأسرة'}, 'familyMedicine': {'en': 'Family Medicine Clinic', 'ar': 'عيادة طب الأسرة'},
@ -746,4 +746,6 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "Search patient or Medicines", 'en': "Search patient or Medicines",
'ar': "مریض یا دوائیں تلاش کریں" 'ar': "مریض یا دوائیں تلاش کریں"
}, },
'appointmentDate': {'en': "Appointment Date", 'ar': "تاريخ الموعد"},
'arrived_p': {'en': "Arrived", 'ar': "وصل"},
}; };

@ -468,6 +468,18 @@
"arrival-patients" "arrival-patients"
] ]
}, },
{
"uid": "23c2239369a69f752e790de95123b9e9",
"css": "male-2",
"code": 59417,
"src": "mfglabs"
},
{
"uid": "10b2be8b48bebc1974d6f94bac9de71d",
"css": "female-1",
"code": 59419,
"src": "mfglabs"
},
{ {
"uid": "740f78c2b53c8cc100a8b0d283bbd34f", "uid": "740f78c2b53c8cc100a8b0d283bbd34f",
"css": "home_icon-1", "css": "home_icon-1",

@ -12,6 +12,10 @@
/// - asset: fonts/DoctorApp.ttf /// - asset: fonts/DoctorApp.ttf
/// ///
/// ///
/// * MFG Labs, Copyright (C) 2012 by Daniel Bruce
/// Author: MFG Labs
/// License: SIL (http://scripts.sil.org/OFL)
/// Homepage: http://www.mfglabs.com/
/// ///
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
@ -67,8 +71,12 @@ class DoctorApp {
IconData(0xe817, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe817, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData referral = static const IconData referral =
IconData(0xe818, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe818, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData male_2 =
IconData(0xe819, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_patient = static const IconData search_patient =
IconData(0xe81a, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe81a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData female_1 =
IconData(0xe81b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData mail = static const IconData mail =
IconData(0xe81e, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe81e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData medicine_search = static const IconData medicine_search =

@ -128,48 +128,21 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 0.97, widthFactor: 0.97,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container(
// height: SizeConfig.screenHeight,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 50, height: SizeConfig.screenHeight * .16,
),
Column(
children: <Widget>[
Container(
child: Icon(
DoctorApp.medicine_search,
size: 100,
color: Colors.black,
),
margin: EdgeInsets.only(top: 50),
),
Padding(
padding: const EdgeInsets.only(top: 12.0),
child: AppText(
TranslationBase.of(context).type.toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: SizeConfig.heightMultiplier * 2.5,
),
),
Padding(
padding: const EdgeInsets.only(top: 5.0),
child: AppText(
TranslationBase.of(context)
.searchMedicineImageCaption,
fontSize: SizeConfig.heightMultiplier * 2,
),
)
],
),
SizedBox(
height: 15,
), ),
Column(children: [
FractionallySizedBox( FractionallySizedBox(
widthFactor: 0.9, widthFactor: 0.9,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Container( Container(
height: MediaQuery.of(context).size.height * 0.070, // height: MediaQuery.of(context).size.height * 0.070,
child: InkWell( child: InkWell(
onTap: model.allMedicationList != null onTap: model.allMedicationList != null
? () { ? () {
@ -199,15 +172,17 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
suggestion.description + suggestion.description +
'/' + '/' +
suggestion.genericName), suggestion.genericName),
padding: EdgeInsets.all(8.0)), padding: EdgeInsets.all(10.0)),
itemSorter: (a, b) => 1, itemSorter: (a, b) => 1,
itemFilter: (suggestion, input) => itemFilter: (suggestion, input) =>
suggestion.genericName suggestion.genericName
.toLowerCase() .toLowerCase()
.startsWith(input.toLowerCase()) || .startsWith(
input.toLowerCase()) ||
suggestion.description suggestion.description
.toLowerCase() .toLowerCase()
.startsWith(input.toLowerCase()) || .startsWith(
input.toLowerCase()) ||
suggestion.keywords suggestion.keywords
.toLowerCase() .toLowerCase()
.startsWith(input.toLowerCase()), .startsWith(input.toLowerCase()),
@ -219,7 +194,8 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
TranslationBase.of(context) TranslationBase.of(context)
.searchMedicineNameHere, .searchMedicineNameHere,
_selectedMedication != null _selectedMedication != null
? _selectedMedication.description + ? _selectedMedication
.description +
(' (${_selectedMedication.genericName} )') (' (${_selectedMedication.genericName} )')
: null, : null,
true, true,
@ -228,10 +204,17 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
), ),
), ),
), ),
],
),
)
]),
SizedBox( SizedBox(
height: 15, height: SizeConfig.screenHeight * .5,
), ),
Container( Column(
children: [
FractionallySizedBox(
widthFactor: 0.97,
child: Wrap( child: Wrap(
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
children: <Widget>[ children: <Widget>[
@ -244,13 +227,12 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
), ),
], ],
), ),
), )
], ],
), )
),
], ],
), ),
), )),
), ),
), ),
), ),

@ -24,7 +24,7 @@ class SearchMedicinePatientScreen extends StatefulWidget {
class _SearchMedicinePatientScreen extends State<SearchMedicinePatientScreen> class _SearchMedicinePatientScreen extends State<SearchMedicinePatientScreen>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
var activeIndex = 0;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -50,42 +50,63 @@ class _SearchMedicinePatientScreen extends State<SearchMedicinePatientScreen>
child: Center( child: Center(
child: Container( child: Container(
height: 60.0, height: 60.0,
color: Colors.white,
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.92, // 0.9, width: MediaQuery.of(context).size.width, // 0.9,
decoration: BoxDecoration( // decoration: BoxDecoration(
border: Border( // border: Border(
bottom: BorderSide( // bottom: BorderSide(
color: Theme.of(context).dividerColor, // color: Theme.of(context).dividerColor,
width: 0.9), //width: 0.7 // width: 0.9), //width: 0.7
), // ),
color: Colors.white), // color: Colors.white),
child: Center(
child: TabBar( child: TabBar(
isScrollable: true, isScrollable: true,
onTap: (index) {
setState(() {
activeIndex = index;
});
},
controller: _tabController, controller: _tabController,
indicatorWeight: 5.0, indicatorWeight: 0.01,
indicatorSize: TabBarIndicatorSize.tab, indicatorSize: TabBarIndicatorSize.label,
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: indicatorColor: Colors.grey[800],
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), // labelPadding:
// EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Container( Container(
width: MediaQuery.of(context).size.width * 0.30, width: MediaQuery.of(context).size.width * 0.40,
decoration: BoxDecoration(
color: activeIndex == 0
? Colors.red[700]
: Colors.grey[200],
borderRadius: BorderRadius.circular(5)),
child: Center( child: Center(
child: AppText( child: AppText(
TranslationBase.of(context).searchPatient), TranslationBase.of(context).searchPatient,
color: activeIndex == 0 ? Colors.white : Colors.black,
fontWeight: FontWeight.bold,
),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.30, width: MediaQuery.of(context).size.width * 0.40,
decoration: BoxDecoration(
color: activeIndex == 1
? Colors.red[700]
: Colors.grey[200],
borderRadius: BorderRadius.circular(5)),
child: Center( child: Center(
child: AppText( child: AppText(
TranslationBase.of(context).searchMedicine), TranslationBase.of(context).searchMedicine,
fontWeight: FontWeight.bold,
color: activeIndex == 1 ? Colors.white : Colors.black,
), ),
), ),
],
), ),
],
), ),
), ),
), ),

@ -43,7 +43,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
final GlobalKey<FormState> _formKey = GlobalKey<FormState>(); final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
bool _autoValidate = false; bool _autoValidate = false;
bool onlyArrived = true; bool onlyArrived = true;
bool isView = false;
bool isFormSubmitted = false; bool isFormSubmitted = false;
FocusNode _nodeText1 = FocusNode(); FocusNode _nodeText1 = FocusNode();
@ -129,32 +129,32 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
children: <Widget>[ children: <Widget>[
Column( Column(
children: <Widget>[ children: <Widget>[
Container( // Container(
child: Icon( // child: Icon(
DoctorApp.search_patient_1, // DoctorApp.search_patient_1,
size: 100, // size: 100,
color: Colors.black, // color: Colors.black,
), // ),
margin: EdgeInsets.only(top: 10), // margin: EdgeInsets.only(top: 10),
), // ),
Padding( // Padding(
padding: const EdgeInsets.only(top: 12.0), // padding: const EdgeInsets.only(top: 12.0),
child: AppText( // child: AppText(
TranslationBase.of(context) // TranslationBase.of(context)
.searchPatientImageCaptionTitle // .searchPatientImageCaptionTitle
.toUpperCase(), // .toUpperCase(),
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
fontSize: SizeConfig.heightMultiplier * 2.5, // fontSize: SizeConfig.heightMultiplier * 2.5,
), // ),
), // ),
Padding( // Padding(
padding: const EdgeInsets.only(top: 5.0), // padding: const EdgeInsets.only(top: 5.0),
child: AppText( // child: AppText(
TranslationBase.of(context) // TranslationBase.of(context)
.searchPatientImageCaptionBody, // .searchPatientImageCaptionBody,
fontSize: SizeConfig.heightMultiplier * 2, // fontSize: SizeConfig.heightMultiplier * 2,
), // ),
) // )
], ],
), ),
Container( Container(
@ -167,25 +167,86 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 5, height: 15,
),
if (_selectedType != '7')
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText:
TranslationBase.of(context).phoneNumber,
borderColor: Colors.white,
textInputType: TextInputType.number,
textInputAction: TextInputAction.done,
inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText1,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setPatientMobileNumber = "0"
: _patientSearchFormValues
.setPatientMobileNumber = value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues
.setPatientMobileNumber = "0";
}
},
),
),
SizedBox(
height: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
InkWell(
child: this.isView == false
? AppText(
'Search With Other Critearia',
color: Colors.red,
fontWeight: FontWeight.bold,
)
: AppText('Hide Other Criteria',
color: Colors.red,
fontWeight: FontWeight.bold),
onTap: () {
setState(() {
this.isView = !this.isView;
});
},
)
],
),
isView == true
? Column(children: [
SizedBox(
height: 10,
), ),
Container( Container(
height: 40.0, height: 65.0,
decoration: ShapeDecoration( decoration: ShapeDecoration(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
side: BorderSide( side: BorderSide(
width: 1.0, width: 1.0,
style: BorderStyle.solid, style: BorderStyle.solid,
color: HexColor("#CCCCCC")), color: HexColor("#CCCCCC")),
borderRadius: borderRadius: BorderRadius.all(
BorderRadius.all(Radius.circular(6.0)), Radius.circular(6.0)),
), ),
), ),
width: double.infinity, width: double.infinity,
child: Padding( child: Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: SizeConfig.widthMultiplier * 0.9, top: SizeConfig.widthMultiplier * 0.9,
bottom: SizeConfig.widthMultiplier * 0.9, bottom:
SizeConfig.widthMultiplier * 0.9,
right: SizeConfig.widthMultiplier * 3, right: SizeConfig.widthMultiplier * 3,
left: SizeConfig.widthMultiplier * 3), left: SizeConfig.widthMultiplier * 3),
child: Row( child: Row(
@ -203,7 +264,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
(BuildContext context) { (BuildContext context) {
return PATIENT_TYPE.map((item) { return PATIENT_TYPE.map((item) {
return Row( return Row(
mainAxisSize: MainAxisSize.max, mainAxisSize:
MainAxisSize.max,
children: <Widget>[ children: <Widget>[
!projectsProvider.isArabic !projectsProvider.isArabic
? AppText( ? AppText(
@ -232,7 +294,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
items: PATIENT_TYPE.map((item) { items: PATIENT_TYPE.map((item) {
!projectsProvider.isArabic !projectsProvider.isArabic
? itemText = item['text'] ? itemText = item['text']
: itemText = item['text_ar']; : itemText =
item['text_ar'];
return DropdownMenuItem( return DropdownMenuItem(
child: Text( child: Text(
itemText, itemText,
@ -252,14 +315,15 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.all(
BorderRadius.all(Radius.circular(6.0)), Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))), width: 1.0,
padding: EdgeInsets.only(top: 5), color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField( child: AppTextFormField(
labelText: labelText: TranslationBase.of(context)
TranslationBase.of(context).firstName, .firstName,
borderColor: Colors.white, borderColor: Colors.white,
onSaved: (value) { onSaved: (value) {
value == null || value == '' value == null || value == ''
@ -270,8 +334,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
if (value != null && if (value != null &&
value.toString().trim().isEmpty) { value.toString().trim().isEmpty) {
_patientSearchFormValues.setFirstName = _patientSearchFormValues
"0"; .setFirstName = "0";
} }
}, },
// validator: (value) { // validator: (value) {
@ -284,14 +348,15 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.all(
BorderRadius.all(Radius.circular(6.0)), Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))), width: 1.0,
padding: EdgeInsets.only(top: 5), color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField( child: AppTextFormField(
labelText: labelText: TranslationBase.of(context)
TranslationBase.of(context).middleName, .middleName,
borderColor: Colors.white, borderColor: Colors.white,
onSaved: (value) { onSaved: (value) {
value == null || value == '' value == null || value == ''
@ -301,8 +366,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
.setMiddleName = value; .setMiddleName = value;
if (value != null && if (value != null &&
value.toString().trim().isEmpty) { value.toString().trim().isEmpty) {
_patientSearchFormValues.setMiddleName = _patientSearchFormValues
"0"; .setMiddleName = "0";
} }
}, },
// validator: (value) { // validator: (value) {
@ -315,77 +380,44 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.all(
BorderRadius.all(Radius.circular(6.0)), Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.only(top: 5),
child: AppTextFormField(
labelText:
TranslationBase.of(context).lastName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues.setLastName =
"0"
: _patientSearchFormValues.setLastName =
value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues.setLastName =
"0";
}
},
inputFormatter: ONLY_LETTERS),
),
SizedBox(
height: 10,
),
if (_selectedType != '7')
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, width: 1.0,
color: HexColor("#CCCCCC"))), color: HexColor("#CCCCCC"))),
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.all(10),
child: AppTextFormField( child: AppTextFormField(
labelText: labelText: TranslationBase.of(context)
TranslationBase.of(context).phoneNumber, .lastName,
borderColor: Colors.white, borderColor: Colors.white,
textInputType: TextInputType.number,
textInputAction: TextInputAction.done,
inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText1,
onSaved: (value) { onSaved: (value) {
value == null || value == '' value == null || value == ''
? _patientSearchFormValues ? _patientSearchFormValues
.setPatientMobileNumber = "0" .setLastName = "0"
: _patientSearchFormValues : _patientSearchFormValues
.setPatientMobileNumber = value; .setLastName = value;
if (value != null && if (value != null &&
value.toString().trim().isEmpty) { value.toString().trim().isEmpty) {
_patientSearchFormValues _patientSearchFormValues
.setPatientMobileNumber = "0"; .setLastName = "0";
} }
}, },
), inputFormatter: ONLY_LETTERS),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.all(
BorderRadius.all(Radius.circular(6.0)), Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))), width: 1.0,
padding: EdgeInsets.only(top: 5), color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField( child: AppTextFormField(
labelText: labelText: TranslationBase.of(context)
TranslationBase.of(context).patientID, .patientID,
borderColor: Colors.white, borderColor: Colors.white,
textInputType: TextInputType.number, textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS, inputFormatter: ONLY_NUMBERS,
@ -395,10 +427,12 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
? _patientSearchFormValues ? _patientSearchFormValues
.setPatientID = 0 .setPatientID = 0
: _patientSearchFormValues : _patientSearchFormValues
.setPatientID = int.parse(value); .setPatientID =
int.parse(value);
if (value != null && if (value != null &&
value.trim().toString().isEmpty) { value.trim().toString().isEmpty) {
_patientSearchFormValues.setPatientID = 0; _patientSearchFormValues
.setPatientID = 0;
} }
}), }),
), ),
@ -407,14 +441,15 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.all(
BorderRadius.all(Radius.circular(6.0)), Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))), width: 1.0,
padding: EdgeInsets.only(top: 5), color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField( child: AppTextFormField(
labelText: labelText: TranslationBase.of(context)
TranslationBase.of(context).patientFile, .patientFile,
borderColor: Colors.white, borderColor: Colors.white,
textInputType: TextInputType.number, textInputType: TextInputType.number,
focusNode: _nodeText3, focusNode: _nodeText3,
@ -422,9 +457,11 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
onSaved: (value) {}, onSaved: (value) {},
), ),
), ),
(!(_selectedType == '2' || _selectedType == '4')) (!(_selectedType == '2' ||
_selectedType == '4'))
? DynamicElements( ? DynamicElements(
_patientSearchFormValues, isFormSubmitted) _patientSearchFormValues,
isFormSubmitted)
: SizedBox( : SizedBox(
height: 0, height: 0,
), ),
@ -436,7 +473,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
), ),
Container( Container(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -463,18 +501,26 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.onlyArrivedPatient, .onlyArrivedPatient,
fontSize: SizeConfig.textMultiplier * 2), fontSize:
SizeConfig.textMultiplier * 2),
])), ])),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
])
: SizedBox(
height: SizeConfig.screenHeight * .4,
),
], ],
), ),
), ),
) ),
], ],
), ),
), ),
Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container( Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap( child: Wrap(
@ -490,7 +536,10 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
), ),
), ),
], ],
)), ),
],
),
),
); );
} }
} }

@ -11,6 +11,8 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart'; import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart';
import 'package:doctor_app_flutter/widgets/shared/app_button.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
@ -55,7 +57,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
String patientType; String patientType;
String patientTypeTitle; String patientTypeTitle;
var _isLoading = true; var _isLoading = true;
var selectedFilter = 1;
bool _isError = false; bool _isError = false;
String error = ""; String error = "";
ProjectViewModel projectsProvider; ProjectViewModel projectsProvider;
@ -292,6 +294,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
error: error:
TranslationBase.of(context).youDontHaveAnyPatient) TranslationBase.of(context).youDontHaveAnyPatient)
: Container( : Container(
color: Colors.grey[200],
child: ListView( child: ListView(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
children: <Widget>[ children: <Widget>[
@ -314,23 +317,11 @@ class _PatientsScreenState extends State<PatientsScreen> {
) )
: Column( : Column(
children: <Widget>[ children: <Widget>[
Padding(
padding: EdgeInsets.only(
top: MediaQuery.of(context)
.size
.height *
0.03),
child: SERVICES_PATIANT2[
int.parse(patientType)] ==
"List_MyOutPatient"
? _locationBar(context)
: Container(),
),
SizedBox(height: 18.5), SizedBox(height: 18.5),
Container( Container(
width: SizeConfig.screenWidth * 0.9, width: SizeConfig.screenWidth * 0.9,
height: height:
SizeConfig.screenHeight * 0.05, SizeConfig.screenHeight * 0.07,
child: TextField( child: TextField(
controller: _controller, controller: _controller,
onChanged: (String str) { onChanged: (String str) {
@ -345,17 +336,100 @@ class _PatientsScreenState extends State<PatientsScreen> {
SizedBox( SizedBox(
height: 10.0, height: 10.0,
), ),
Divider( Padding(
thickness: 0.8, padding: EdgeInsets.only(
color: Color(0xffCCCCCC), top: MediaQuery.of(context)
.size
.height *
0.03),
child: SERVICES_PATIANT2[
int.parse(patientType)] ==
"List_MyOutPatient"
? _locationBar(context)
: Container(),
),
// Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceEvenly,
// children: [
// AppButton(
// title: TranslationBase.of(context)
// .all,
// onPressed: () {
// setState(() {
// selectedFilter = 1;
// filterPatients();
// });
// },
// color: selectedFilter == 1
// ? Colors.red[800]
// : Colors.grey[300],
// fontColor: selectedFilter == 1
// ? Colors.white
// : Colors.black,
// ),
// AppButton(
// title: TranslationBase.of(context)
// .today,
// onPressed: () {
// setState(() {
// selectedFilter = 2;
// filterPatients();
// });
// },
// color: selectedFilter == 2
// ? Colors.red[800]
// : Colors.grey[300],
// fontColor: selectedFilter == 2
// ? Colors.white
// : Colors.black,
// ),
// AppButton(
// title: TranslationBase.of(context)
// .tomorrow,
// onPressed: () {
// setState(() {
// selectedFilter = 3;
// filterPatients();
// });
// },
// color: selectedFilter == 3
// ? Colors.red[800]
// : Colors.grey[300],
// fontColor: selectedFilter == 3
// ? Colors.white
// : Colors.black,
// ),
// AppButton(
// title: TranslationBase.of(context)
// .nextWeek,
// onPressed: () {
// setState(() {
// selectedFilter = 4;
// // filterPatients();
// });
// },
// color: selectedFilter == 4
// ? Colors.red[800]
// : Colors.grey[300],
// fontColor: selectedFilter == 4
// ? Colors.white
// : Colors.black,
// ),
// ],
// ),
SizedBox(
height: 10.0,
), ),
// Divider(
// thickness: 0.8,
// color: Color(0xffCCCCCC),
// ),
Container( Container(
decoration: BoxDecoration( // decoration: BoxDecoration(
color: Color(0Xffffffff), // color: Color(0Xffffffff),
borderRadius: // borderRadius:
BorderRadius.circular(20)), // BorderRadius.circular(20)),
margin:
EdgeInsets.fromLTRB(0, 0, 0, 0),
child: (responseModelList.length > 0) child: (responseModelList.length > 0)
? Column( ? Column(
// mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
@ -399,9 +473,35 @@ class _PatientsScreenState extends State<PatientsScreen> {
); );
} }
// filterPatients() {
// responseModelList = [];
// //if (selectedFilter > 1) {
// responseModelList2.forEach((element) {
// DateTime arrivedOn = DateTime.parse(element.arrivedOn);
// Duration dur = DateTime.now().difference(arrivedOn);
// if (selectedFilter == 2 && dur.inDays == 0) {
// responseModelList.add(element);
// } else if (selectedFilter == 3 && dur.inDays == 1) {
// responseModelList.add(element);
// } else if (selectedFilter == 4 && dur.inDays > 7) {
// responseModelList.add(element);
// } else if (selectedFilter == 1) {
// responseModelList.add(element);
// }
// });
// } else {
// responseModelList = responseModelList2;
// }
//}
InputDecoration buildInputDecoration(BuildContext context, hint) { InputDecoration buildInputDecoration(BuildContext context, hint) {
return InputDecoration( return InputDecoration(
prefixIcon: Icon(Icons.search, color: Colors.grey), suffixIcon: IconButton(
icon: new Image.asset("assets/images/filter-512.png"),
color: Colors.grey,
onPressed: () {},
iconSize: 20,
),
filled: true, filled: true,
fillColor: Colors.white, fillColor: Colors.white,
hintText: hint, hintText: hint,
@ -423,9 +523,9 @@ class _PatientsScreenState extends State<PatientsScreen> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0Xffffffff), color: Color(0Xffffffff),
borderRadius: BorderRadius.circular(12.5), borderRadius: BorderRadius.circular(12.5),
border: Border.all( // border: Border.all(
width: 0.5, // width: 0.5,
), // ),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,

@ -1133,6 +1133,9 @@ class TranslationBase {
localizedValues['arrivalpatient'][locale.languageCode]; localizedValues['arrivalpatient'][locale.languageCode];
String get searchmedicinepatient => String get searchmedicinepatient =>
localizedValues['searchmedicinepatient'][locale.languageCode]; localizedValues['searchmedicinepatient'][locale.languageCode];
String get appointmentDate =>
localizedValues['appointmentDate'][locale.languageCode];
String get arrivedP => localizedValues['arrived_p'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -13,161 +14,155 @@ class PatientCard extends StatelessWidget {
final PatiantInformtion patientInfo; final PatiantInformtion patientInfo;
final Function onTap; final Function onTap;
final String patientType; final String patientType;
const PatientCard({Key key, this.patientInfo, this.onTap, this.patientType}) : super(key: key); const PatientCard({Key key, this.patientInfo, this.onTap, this.patientType})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: EdgeInsets.all(10), width: SizeConfig.screenWidth * 0.95,
decoration: myBoxDecoration(), padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(bottom: 12), decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), color: Colors.white),
margin: EdgeInsets.all(5),
child: InkWell( child: InkWell(
child: Column(
children: [
SERVICES_PATIANT2[int.parse(patientType)] == "patientArrivalList"
? Container(height: 5, color: Colors.green[800])
: Container(),
SizedBox(
height: 10,
),
SERVICES_PATIANT2[int.parse(patientType)] == "patientArrivalList"
? Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(
TranslationBase.of(context).arrivedP,
color: Colors.green[800],
fontWeight: FontWeight.bold,
),
AppText(patientInfo.arrivedOn)
],
)
: SizedBox(),
Padding(
padding: EdgeInsets.only(left: 12.0),
child: Row( child: Row(
children: <Widget>[ mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(children: [
AppText(
patientInfo.firstName + " " + patientInfo.lastName,
fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
),
patientInfo.gender == 1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
)
: Icon(
DoctorApp.female_1,
color: Colors.pink,
),
]),
AppText(
patientInfo.nationalityName ?? patientInfo.nationality,
fontWeight: FontWeight.bold,
)
],
)),
Row(children: <Widget>[
Column( Column(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment children: <Widget>[
.start,
children: <
Widget>[
Padding( Padding(
padding: EdgeInsets padding: EdgeInsets.only(left: 12.0),
.only( child: Container(
left: decoration: BoxDecoration(
12.0),
child:
Container(
decoration:
BoxDecoration(
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color.fromRGBO( color: Color.fromRGBO(0, 0, 0, 0.08),
0, offset: Offset(0.0, 5.0),
0, blurRadius: 16.0)
0,
0.08),
offset: Offset(0.0,
5.0),
blurRadius:
16.0)
], ],
borderRadius: borderRadius: BorderRadius.all(Radius.circular(35.0)),
BorderRadius.all( color: Color(0xffCCCCCC),
Radius.circular(35.0)),
color: Color(
0xffCCCCCC),
), ),
width: 70, width: 70,
height: 70, height: 70,
child: Icon( child: Icon(
patientInfo.genderDescription == patientInfo.gender == 1
"Male" ? DoctorApp.male
? DoctorApp : DoctorApp.female_icon,
.male
: DoctorApp
.female_icon,
size: 70, size: 70,
color: Colors color: Colors.white,
.white,
), ),
), ),
), ),
], ],
), ),
SizedBox( SizedBox(
width: 10, width: 10,
), ),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment:CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
patientInfo.firstName +
" " +
patientInfo.lastName,
fontSize:
2.0 * SizeConfig.textMultiplier,
fontWeight:
FontWeight.bold,
backGroundcolor:
Colors.white,
),
SizedBox(height: 12,),
Table(
border: TableBorder.symmetric(
// inside: BorderSide(width: 2.0, color: Colors.white),
),
// defaultVerticalAlignment:TableCellVerticalAlignment.middle ,
children: [ children: [
TableRow(children: [
Container( Container(
child: RichText( child: RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black), fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context).fileNo, text: TranslationBase.of(context).fileNo,
style: TextStyle(fontWeight: FontWeight.w700, fontSize: 2.2 * SizeConfig.textMultiplier)), style: TextStyle(
new TextSpan(text: patientInfo.patientId.toString()), fontSize:
],),), 2.2 * SizeConfig.textMultiplier)),
),
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black),
children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context).age+ " : ", text: patientInfo.patientId.toString(),
style: TextStyle(fontWeight: FontWeight.w700, )), style: TextStyle(
new TextSpan(text: "${DateUtils.getAgeByBirthday(patientInfo.dateofBirth, context)}"), fontWeight: FontWeight.w700,
],),), )),
],
),
), ),
]
), ),
TableRow(children: [
SizedBox(height: 5,),
SizedBox(height: 5,)
]),
TableRow(children: [
Container( Container(
child: RichText( child: RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black), fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context).nationality + " : ", text: TranslationBase.of(context).age + " : ",
style: TextStyle(fontWeight: FontWeight.w700, fontSize: 2.2 * SizeConfig.textMultiplier)),
new TextSpan(text: (patientInfo.nationalityName ?? patientInfo.nationality)),
],),),
), ),
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black),
children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context).gender + " : ", text:
style: TextStyle(fontWeight: FontWeight.w700, )), "${DateUtils.getAgeByBirthday(patientInfo.dateofBirth, context)}",
new TextSpan(text: patientInfo.gender.toString() == '1' ? 'Male' : 'Female'), style: TextStyle(
],),), fontWeight: FontWeight.w700,
)),
],
), ),
]
), ),
],
), ),
if(SERVICES_PATIANT2[int.parse(patientType)] == "List_MyOutPatient") if (SERVICES_PATIANT2[int.parse(patientType)] ==
"List_MyOutPatient")
Container( Container(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText(
TranslationBase.of(context).appointmentDate +
" : ",
fontSize: 14,
),
Container( Container(
height: 15, height: 15,
width: 60, width: 60,
@ -188,7 +183,8 @@ class PatientCard extends StatelessWidget {
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2(patientInfo.appointmentDate.toString()), convertDateFormat2(
patientInfo.appointmentDate.toString()),
fontSize: 1.5 * SizeConfig.textMultiplier, fontSize: 1.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@ -198,18 +194,84 @@ class PatientCard extends StatelessWidget {
) )
], ],
), ),
margin: EdgeInsets.only(top: 8,), margin: EdgeInsets.only(
top: 8,
),
) )
]))
]),
], ],
), ),
), onTap: onTap,
));
// ]),
// TableRow(children: [
// SizedBox(
// height: 5,
// ),
// SizedBox(
// height: 5,
// )
// ]),
// TableRow(children: [
// Container(
// child: RichText(
// text: new TextSpan(
// style: new TextStyle(
// fontSize: 2.0 * SizeConfig.textMultiplier,
// color: Colors.black),
// children: <TextSpan>[
// new TextSpan(
// text: TranslationBase.of(context)
// .nationality +
// " : ",
// style: TextStyle(
// fontWeight: FontWeight.w700,
// fontSize: 2.2 *
// SizeConfig.textMultiplier)),
// // ,
// ],
// ),
// ),
// ),
// Container(
// child: RichText(
// text: new TextSpan(
// style: new TextStyle(
// fontSize: 2.0 * SizeConfig.textMultiplier,
// color: Colors.black),
// children: <TextSpan>[
// new TextSpan(
// text:
// TranslationBase.of(context).gender +
// " : ",
// style: TextStyle(
// fontWeight: FontWeight.w700,
// )),
// new TextSpan(
// text:
// patientInfo.gender.toString() == '1'
// ? 'Male'
// : 'Female'),
// ],
// ),
// ),
// ),
// ]),
// ],
//),
// ),
// Divider(color: Colors.grey) // Divider(color: Colors.grey)
], //],
), //),
onTap: onTap, //],
), //),
); // onTap: onTap,
// ),
//);
} }
convertDateFormat2(String str) { convertDateFormat2(String str) {
@ -234,11 +296,11 @@ class PatientCard extends StatelessWidget {
myBoxDecoration() { myBoxDecoration() {
return BoxDecoration( return BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( top: BorderSide(
color: Color(0xffCCCCCC), color: Colors.green,
width: 0.5, width: 5,
), ),
), ),
); borderRadius: BorderRadius.circular(10));
} }
} }

@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/custom_validation_error.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/custom_validation_error.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
class DynamicElements extends StatefulWidget { class DynamicElements extends StatefulWidget {
@ -40,12 +41,7 @@ class _DynamicElementsState extends State<DynamicElements> {
pickedDate.day.toString().padLeft(2, '0'); pickedDate.day.toString().padLeft(2, '0');
_fromDateController.text = selectedDate; _fromDateController.text = selectedDate;
} else { } else {
selectedDate = pickedDate.year.toString() + selectedDate = pickedDate.year.toString() +
"-" + "-" +
pickedDate.month.toString().padLeft(2, '0') + pickedDate.month.toString().padLeft(2, '0') +
@ -61,11 +57,12 @@ class _DynamicElementsState extends State<DynamicElements> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery final screenSize = MediaQuery.of(context).size;
.of(context) InputDecoration textFieldSelectorDecoration(
.size; {String hintText,
InputDecoration textFieldSelectorDecoration({String hintText, String selectedText,
String selectedText, bool isDropDown,IconData icon}) { bool isDropDown,
IconData icon}) {
return InputDecoration( return InputDecoration(
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
@ -85,9 +82,9 @@ class _DynamicElementsState extends State<DynamicElements> {
fontSize: 14, fontSize: 14,
color: Colors.grey.shade600, color: Colors.grey.shade600,
), ),
) );
;
} }
return LayoutBuilder( return LayoutBuilder(
builder: (ctx, constraints) { builder: (ctx, constraints) {
return Column( return Column(
@ -99,8 +96,14 @@ class _DynamicElementsState extends State<DynamicElements> {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
AppTextFormField( Container(
onTap: ()=> _presentDatePicker('_selectedFromDate'), decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6.0)),
border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
borderColor: Colors.white,
onTap: () => _presentDatePicker('_selectedFromDate'),
hintText: TranslationBase.of(context).fromDate, hintText: TranslationBase.of(context).fromDate,
controller: _fromDateController, controller: _fromDateController,
inputFormatter: ONLY_DATE, inputFormatter: ONLY_DATE,
@ -108,43 +111,48 @@ class _DynamicElementsState extends State<DynamicElements> {
if (_fromDateController.text.toString().trim().isEmpty) { if (_fromDateController.text.toString().trim().isEmpty) {
widget._patientSearchFormValues.From = "0"; widget._patientSearchFormValues.From = "0";
} else { } else {
widget._patientSearchFormValues.From = _fromDateController.text.replaceAll("/", "-"); widget._patientSearchFormValues.From =
_fromDateController.text.replaceAll("/", "-");
} }
}, },
readOnly: true, readOnly: true,
)),
),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
if(widget._patientSearchFormValues.From == "0" && widget.isFormSubmitted) if (widget._patientSearchFormValues.From == "0" &&
CustomValidationError(),SizedBox( widget.isFormSubmitted)
CustomValidationError(),
SizedBox(
height: 10, height: 10,
), ),
AppTextFormField( Container(
decoration: BoxDecoration(
border: Border.all(width: 1.0, color: HexColor("#CCCCCC")),
borderRadius: BorderRadius.all(Radius.circular(6.0))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
readOnly: true, readOnly: true,
hintText: TranslationBase borderColor: Colors.white,
.of(context) hintText: TranslationBase.of(context).toDate,
.toDate,
controller: _toDateController, controller: _toDateController,
onTap: () { onTap: () {
_presentDatePicker('_selectedToDate'); _presentDatePicker('_selectedToDate');
}, },
inputFormatter: ONLY_DATE, inputFormatter: ONLY_DATE,
onSaved: (value) { onSaved: (value) {
if (_toDateController.text if (_toDateController.text.toString().trim().isEmpty) {
.toString()
.trim()
.isEmpty) {
widget._patientSearchFormValues.To = "0"; widget._patientSearchFormValues.To = "0";
} else { } else {
widget._patientSearchFormValues.To = widget._patientSearchFormValues.To =
_toDateController.text.replaceAll("/", "-"); _toDateController.text.replaceAll("/", "-");
} }
}, },
), )),
if(widget._patientSearchFormValues.To == "0" && widget.isFormSubmitted) if (widget._patientSearchFormValues.To == "0" &&
CustomValidationError(),SizedBox( widget.isFormSubmitted)
CustomValidationError(),
SizedBox(
height: 10, height: 10,
), ),
], ],

Loading…
Cancel
Save