Merge branch 'new_design_sikander' into development_new_design_2.0

# Conflicts:
#	lib/pages/BookAppointment/components/SearchByClinic.dart
merge-update-with-lab-changes
Sikander Saleem 5 years ago
commit aa047afef7

@ -32,36 +32,40 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
Widget build(BuildContext context) { Widget build(BuildContext context) {
AppGlobal.context = context; AppGlobal.context = context;
return AppScaffold( return AppScaffold(
isShowAppBar: false, isShowAppBar: false,
isShowDecPage: false, isShowDecPage: false,
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
backgroundColor: Color(0xFFF7F7F7), backgroundColor: Color(0xFFF7F7F7),
body: Container( body: Column(
child: Column( children: [
children: [ TabBar(
TabBar( controller: _tabController,
tabs: [ indicatorWeight: 3.0,
Tab(child: Text(TranslationBase.of(context).clinicName, style: TextStyle(color: Colors.black))), indicatorSize: TabBarIndicatorSize.tab,
Tab( labelColor: Color(0xff2B353E),
child: Text(TranslationBase.of(context).doctorName, style: TextStyle(color: Colors.black)), unselectedLabelColor: Color(0xff575757),
) labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
], labelStyle: TextStyle(
controller: _tabController, fontSize: 16,
), fontWeight: FontWeight.w600,
Expanded( letterSpacing: -0.48,
child: new TabBarView( ),
physics: NeverScrollableScrollPhysics(), unselectedLabelStyle: TextStyle(
children: [ fontSize: 16,
SearchByClinic( fontWeight: FontWeight.w600,
clnicIds: widget.clnicIds, letterSpacing: -0.48,
), ),
SearchByDoctor() tabs: [Text(TranslationBase.of(context).clinicName), Text(TranslationBase.of(context).doctorName)],
],
controller: _tabController,
),
)
],
), ),
)); Expanded(
child: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [SearchByClinic(clnicIds: widget.clnicIds), SearchByDoctor()],
controller: _tabController,
),
)
],
),
);
} }
} }

@ -31,45 +31,36 @@ class _SearchResultsState extends State<SearchResults> {
isShowAppBar: true, isShowAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
showNewAppBar: true, showNewAppBar: true,
backgroundColor: CustomColors.appBackgroudGreyColor, backgroundColor: CustomColors.appBackgroudGrey2Color,
body: SingleChildScrollView( body: ListView.separated(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: Column( separatorBuilder: (context, index) {
children: <Widget>[ return Container(
ListView.separated( height: 1,
physics: NeverScrollableScrollPhysics(), margin: EdgeInsets.only(left: 21, right: 21),
shrinkWrap: true, color: Color(0xffD9D9D9),
// padding: EdgeInsets.only(left: 21, right: 21), );
separatorBuilder: (context, index) { },
return Container( itemBuilder: (context, index) {
height: 1, return AppExpandableNotifier(
margin: EdgeInsets.only(left: 21, right: 21), title: widget.patientDoctorAppointmentListHospital[index].filterName + " - " + widget.patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km,
color: Color(0xffD9D9D9), isTitleSingleLine: false,
); bodyWidget: ListView.separated(
}, shrinkWrap: true,
itemBuilder: (context, index) { physics: NeverScrollableScrollPhysics(),
return AppExpandableNotifier( padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
title: itemBuilder: (context, _index) {
widget.patientDoctorAppointmentListHospital[index].filterName + " - " + widget.patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km, //widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index].speciality = null;
bodyWidget: ListView.separated( return DoctorView(
shrinkWrap: true, doctor: widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index],
physics: NeverScrollableScrollPhysics(), isLiveCareAppointment: widget.isLiveCareAppointment,
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), );
itemBuilder: (context, _index) { },
//widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index].speciality = null; separatorBuilder: (context, index) => SizedBox(height: 14),
return DoctorView( itemCount: widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList.length),
doctor: widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index], );
isLiveCareAppointment: widget.isLiveCareAppointment, },
); itemCount: widget.patientDoctorAppointmentListHospital.length,
},
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList.length),
);
},
itemCount: widget.patientDoctorAppointmentListHospital.length,
),
],
),
), ),
); );
} }

@ -18,7 +18,8 @@ class AppExpandableNotifier extends StatefulWidget {
final bool isExpand; final bool isExpand;
bool expandFlag = false; bool expandFlag = false;
var controller = new ExpandableController(); 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(); _AppExpandableNotifier createState() => _AppExpandableNotifier();
} }
@ -48,6 +49,8 @@ class _AppExpandableNotifier extends State<AppExpandableNotifier> {
_subTitle = _subTitle.toLowerCase().capitalizeFirstofEach; _subTitle = _subTitle.toLowerCase().capitalizeFirstofEach;
_title = _title.toLowerCase().capitalizeFirstofEach; _title = _title.toLowerCase().capitalizeFirstofEach;
} }
print("_title:$_title");
print("_subTitle:$_subTitle");
return ExpandableNotifier( return ExpandableNotifier(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -66,7 +69,7 @@ class _AppExpandableNotifier extends State<AppExpandableNotifier> {
header: Padding( header: Padding(
padding: const EdgeInsets.only(top: 12, bottom: 12, left: 21, right: 21), padding: const EdgeInsets.only(top: 12, bottom: 12, left: 21, right: 21),
child: InkWell( child: InkWell(
onTap: (){ onTap: () {
setState(() { setState(() {
widget.expandFlag = !widget.expandFlag; widget.expandFlag = !widget.expandFlag;
widget.controller.expanded = widget.expandFlag; widget.controller.expanded = widget.expandFlag;
@ -80,16 +83,23 @@ class _AppExpandableNotifier extends State<AppExpandableNotifier> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (_mainTitle.isNotEmpty) if (_mainTitle.isNotEmpty && widget.isTitleSingleLine)
Text( Text(
_mainTitle, _mainTitle,
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 1), style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 1),
), ),
// Text( if (_title.isNotEmpty && !widget.isTitleSingleLine)
// _subTitle, Text(
// maxLines: 1, _title,
// style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2E303A), letterSpacing: -1.44, height: 25 / 24), 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),
),
], ],
), ),
), ),

Loading…
Cancel
Save