diff --git a/lib/pages/BookAppointment/Search.dart b/lib/pages/BookAppointment/Search.dart index b4e8d43e..497d5388 100644 --- a/lib/pages/BookAppointment/Search.dart +++ b/lib/pages/BookAppointment/Search.dart @@ -32,36 +32,40 @@ class _SearchState extends State with TickerProviderStateMixin { Widget build(BuildContext context) { AppGlobal.context = context; return AppScaffold( - isShowAppBar: false, - isShowDecPage: false, - appBarTitle: TranslationBase.of(context).bookAppo, - backgroundColor: Color(0xFFF7F7F7), - body: Container( - child: Column( - children: [ - TabBar( - tabs: [ - Tab(child: Text(TranslationBase.of(context).clinicName, style: TextStyle(color: Colors.black))), - Tab( - child: Text(TranslationBase.of(context).doctorName, style: TextStyle(color: Colors.black)), - ) - ], - controller: _tabController, - ), - Expanded( - child: new TabBarView( - physics: NeverScrollableScrollPhysics(), - children: [ - SearchByClinic( - clnicIds: widget.clnicIds, - ), - SearchByDoctor() - ], - controller: _tabController, - ), - ) - ], + isShowAppBar: false, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).bookAppo, + backgroundColor: Color(0xFFF7F7F7), + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).clinicName), Text(TranslationBase.of(context).doctorName)], ), - )); + Expanded( + child: TabBarView( + physics: NeverScrollableScrollPhysics(), + children: [SearchByClinic(clnicIds: widget.clnicIds), SearchByDoctor()], + controller: _tabController, + ), + ) + ], + ), + ); } } diff --git a/lib/pages/BookAppointment/SearchResults.dart b/lib/pages/BookAppointment/SearchResults.dart index f80398f5..76fe2f46 100644 --- a/lib/pages/BookAppointment/SearchResults.dart +++ b/lib/pages/BookAppointment/SearchResults.dart @@ -31,45 +31,36 @@ class _SearchResultsState extends State { isShowAppBar: true, showNewAppBarTitle: true, showNewAppBar: true, - backgroundColor: CustomColors.appBackgroudGreyColor, - body: SingleChildScrollView( + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: ListView.separated( physics: BouncingScrollPhysics(), - child: Column( - children: [ - ListView.separated( - physics: NeverScrollableScrollPhysics(), - shrinkWrap: true, - // padding: EdgeInsets.only(left: 21, right: 21), - separatorBuilder: (context, index) { - return Container( - height: 1, - margin: EdgeInsets.only(left: 21, right: 21), - color: Color(0xffD9D9D9), - ); - }, - itemBuilder: (context, index) { - return AppExpandableNotifier( - title: - widget.patientDoctorAppointmentListHospital[index].filterName + " - " + widget.patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km, - bodyWidget: ListView.separated( - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), - itemBuilder: (context, _index) { - //widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index].speciality = null; - return DoctorView( - doctor: widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index], - isLiveCareAppointment: widget.isLiveCareAppointment, - ); - }, - separatorBuilder: (context, index) => SizedBox(height: 14), - itemCount: widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList.length), - ); - }, - itemCount: widget.patientDoctorAppointmentListHospital.length, - ), - ], - ), + separatorBuilder: (context, index) { + return Container( + height: 1, + margin: EdgeInsets.only(left: 21, right: 21), + color: Color(0xffD9D9D9), + ); + }, + itemBuilder: (context, index) { + return AppExpandableNotifier( + title: widget.patientDoctorAppointmentListHospital[index].filterName + " - " + widget.patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km, + isTitleSingleLine: false, + bodyWidget: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), + itemBuilder: (context, _index) { + //widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index].speciality = null; + return DoctorView( + doctor: widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index], + isLiveCareAppointment: widget.isLiveCareAppointment, + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList.length), + ); + }, + itemCount: widget.patientDoctorAppointmentListHospital.length, ), ); } diff --git a/lib/widgets/others/app_expandable_notifier.dart b/lib/widgets/others/app_expandable_notifier.dart index c890dca6..0df1d9dc 100644 --- a/lib/widgets/others/app_expandable_notifier.dart +++ b/lib/widgets/others/app_expandable_notifier.dart @@ -18,7 +18,8 @@ class AppExpandableNotifier extends StatefulWidget { final bool isExpand; bool expandFlag = false; var controller = new ExpandableController(); - AppExpandableNotifier({this.headerWidget, this.bodyWidget, this.title, this.collapsed, this.isExpand = false}); + bool isTitleSingleLine; + AppExpandableNotifier({this.headerWidget, this.bodyWidget, this.title, this.collapsed, this.isExpand = false, this.isTitleSingleLine = true}); _AppExpandableNotifier createState() => _AppExpandableNotifier(); } @@ -48,6 +49,8 @@ class _AppExpandableNotifier extends State { _subTitle = _subTitle.toLowerCase().capitalizeFirstofEach; _title = _title.toLowerCase().capitalizeFirstofEach; } + print("_title:$_title"); + print("_subTitle:$_subTitle"); return ExpandableNotifier( child: Column( children: [ @@ -66,7 +69,7 @@ class _AppExpandableNotifier extends State { header: Padding( padding: const EdgeInsets.only(top: 12, bottom: 12, left: 21, right: 21), child: InkWell( - onTap: (){ + onTap: () { setState(() { widget.expandFlag = !widget.expandFlag; widget.controller.expanded = widget.expandFlag; @@ -80,16 +83,23 @@ class _AppExpandableNotifier extends State { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - if (_mainTitle.isNotEmpty) + if (_mainTitle.isNotEmpty && widget.isTitleSingleLine) Text( _mainTitle, style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 1), ), - // Text( - // _subTitle, - // maxLines: 1, - // style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2E303A), letterSpacing: -1.44, height: 25 / 24), - // ), + if (_title.isNotEmpty && !widget.isTitleSingleLine) + Text( + _title, + maxLines: 1, + style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2E303A), letterSpacing: -1.44, height: 25 / 24), + ), + if (_subTitle.isNotEmpty && !widget.isTitleSingleLine) + Text( + _subTitle, + maxLines: 1, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 23 / 12), + ), ], ), ),