From feef001323654969d27ac08728cc3590aed300d4 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Thu, 22 Apr 2021 14:25:01 +0300 Subject: [PATCH] bug fixes --- lib/screens/patients/patients_screen.dart | 152 +++++++++++++++------- lib/widgets/patients/PatientCard.dart | 4 +- 2 files changed, 105 insertions(+), 51 deletions(-) diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 014f656d..5c72e574 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -21,6 +21,7 @@ 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/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; @@ -394,20 +395,51 @@ class _PatientsScreenState extends State { children: [ Column(children: [ SizedBox(height: 18.5), + Container( - width: SizeConfig.screenWidth * 0.9, - height: SizeConfig.screenHeight * 0.08, - child: TextField( - controller: _controller, - onChanged: (String str) { - this.searchData(str); - }, - decoration: buildInputDecoration( - context, - TranslationBase.of(context) - .searchPatientName), - ), - ), + decoration: BoxDecoration( + borderRadius: + BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + left: 10, top: 10), + child: AppText( + TranslationBase.of(context) + .selectYourProject, + fontWeight: FontWeight.w600, + )), + AppTextFormField( + // focusNode: focusProject, + controller: _controller, + borderColor: Colors.white, + suffixIcon: Icons.arrow_drop_down, + onTap: () {}, + ) + ])), + + // Container( + // width: SizeConfig.screenWidth * 0.9, + // height: SizeConfig.screenHeight * 0.08, + // child: TextField( + // controller: _controller, + // onChanged: (String str) { + // this.searchData(str); + // }, + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context) + // .searchPatientName), + // ), + // ), SizedBox( height: 10.0, ), @@ -484,21 +516,65 @@ class _PatientsScreenState extends State { : Column( children: [ SizedBox(height: 18.5), + Container( - width: SizeConfig.screenWidth * 0.9, - height: - SizeConfig.screenHeight * 0.08, - child: TextField( - controller: _controller, - onChanged: (String str) { - this.searchData(str); - }, - decoration: buildInputDecoration( - context, - TranslationBase.of(context) - .searchPatientName), - ), - ), + width: SizeConfig.screenWidth * 0.9, + height: 75, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + left: 10, top: 10), + child: AppText( + TranslationBase.of( + context) + .searchPatientName, + fontWeight: + FontWeight.bold, + )), + AppTextFormField( + // focusNode: focusProject, + controller: _controller, + borderColor: Colors.white, + prefix: IconButton( + icon: Icon( + DoctorApp.filter_1, + color: Colors.black, + ), + iconSize: 20, + padding: + EdgeInsets.only( + bottom: 30), + ), + onChanged: (String str) { + this.searchData(str); + }), + ])), + // Container( + // width: SizeConfig.screenWidth * 0.9, + // height: + // SizeConfig.screenHeight * 0.08, + // child: TextField( + // controller: _controller, + // onChanged: (String str) { + // this.searchData(str); + // }, + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context) + // .searchPatientName), + // ), + // ), SizedBox( height: 10.0, ), @@ -696,28 +772,6 @@ class _PatientsScreenState extends State { }); } - InputDecoration buildInputDecoration(BuildContext context, hint) { - return InputDecoration( - suffixIcon: IconButton( - icon: Icon(DoctorApp.search_patient), - color: Colors.grey, - onPressed: () {}, - iconSize: 30, - ), - filled: true, - fillColor: Colors.white, - hintText: hint, - hintStyle: TextStyle(fontSize: 1.66 * SizeConfig.textMultiplier), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: HexColor('#CCCCCC')), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Colors.grey), //), - )); - } - Widget _locationBar(BuildContext _context, model) { return Container( height: MediaQuery.of(context).size.height * 0.0619, diff --git a/lib/widgets/patients/PatientCard.dart b/lib/widgets/patients/PatientCard.dart index d3992b41..a1c913e2 100644 --- a/lib/widgets/patients/PatientCard.dart +++ b/lib/widgets/patients/PatientCard.dart @@ -213,8 +213,8 @@ class PatientCard extends StatelessWidget { ), ), ), - if (SERVICES_PATIANT2[int.parse(patientType)] == - "List_MyOutPatient") + if (SERVICES_PATIANT2[int.parse(patientType)] != + "List_InPatient") Container( child: RichText( text: new TextSpan(