|
|
|
|
@ -39,10 +39,10 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
|
|
|
|
|
void initState() {
|
|
|
|
|
_tabController = new TabController(length: 2, vsync: this);
|
|
|
|
|
AppointmentDetails.showFooterButton = false;
|
|
|
|
|
print(widget.appo.clinicID);
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void dispose() {
|
|
|
|
|
super.dispose();
|
|
|
|
|
@ -116,7 +116,8 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
child: Text(getDoctorSpeciality(widget.appo.doctorSpeciality),
|
|
|
|
|
child: Text(
|
|
|
|
|
getDoctorSpeciality(widget.appo.doctorSpeciality),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.grey[900],
|
|
|
|
|
@ -177,20 +178,37 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
|
|
|
|
|
TabBar(
|
|
|
|
|
onTap: (index) {
|
|
|
|
|
setState(() {
|
|
|
|
|
index == 1
|
|
|
|
|
? AppointmentDetails.showFooterButton = true
|
|
|
|
|
: AppointmentDetails.showFooterButton = false;
|
|
|
|
|
print(AppointmentDetails.showFooterButton);
|
|
|
|
|
// index == 1
|
|
|
|
|
// ? AppointmentDetails.showFooterButton = true
|
|
|
|
|
// : AppointmentDetails.showFooterButton = false;
|
|
|
|
|
|
|
|
|
|
if (index == 1) {
|
|
|
|
|
if (widget.appo.clinicID == 17 ||
|
|
|
|
|
widget.appo.clinicID == 23) {
|
|
|
|
|
_tabController.index =
|
|
|
|
|
_tabController.previousIndex;
|
|
|
|
|
AppointmentDetails.showFooterButton = false;
|
|
|
|
|
} else {
|
|
|
|
|
AppointmentDetails.showFooterButton = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
tabs: [
|
|
|
|
|
Tab(
|
|
|
|
|
child: Text(TranslationBase.of(context).appoActions,
|
|
|
|
|
style: TextStyle(color: Colors.black))),
|
|
|
|
|
Tab(
|
|
|
|
|
child: Text(TranslationBase.of(context).availableAppo,
|
|
|
|
|
style: TextStyle(color: Colors.black)),
|
|
|
|
|
)
|
|
|
|
|
widget.appo.clinicID == 17 || widget.appo.clinicID == 23
|
|
|
|
|
? Tab(
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).availableAppo,
|
|
|
|
|
style: TextStyle(color: Colors.grey)),
|
|
|
|
|
)
|
|
|
|
|
: Tab(
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).availableAppo,
|
|
|
|
|
style: TextStyle(color: Colors.black)),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
),
|
|
|
|
|
|