|
|
|
|
@ -112,6 +112,7 @@ class _InPatientScreenState extends State<InPatientScreen>
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Scaffold(
|
|
|
|
|
extendBodyBehindAppBar: false,
|
|
|
|
|
|
|
|
|
|
appBar: PreferredSize(
|
|
|
|
|
preferredSize: Size.fromHeight(
|
|
|
|
|
MediaQuery.of(context).size.height * 0.070),
|
|
|
|
|
@ -124,26 +125,28 @@ class _InPatientScreenState extends State<InPatientScreen>
|
|
|
|
|
width: 0.5), //width: 0.7
|
|
|
|
|
),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 9),
|
|
|
|
|
child: TabBar(
|
|
|
|
|
isScrollable: false,
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
indicatorColor: Colors.transparent,
|
|
|
|
|
indicatorWeight: 1.0,
|
|
|
|
|
indicatorSize: TabBarIndicatorSize.tab,
|
|
|
|
|
labelColor: Theme.of(context).primaryColor,
|
|
|
|
|
indicatorColor: Colors.red,
|
|
|
|
|
indicatorWeight: 0.001,
|
|
|
|
|
indicator:BoxDecoration(),
|
|
|
|
|
// indicatorSize: TabBarIndicatorSize.tab,
|
|
|
|
|
// labelColor: Theme.of(context).primaryColor,
|
|
|
|
|
labelPadding: EdgeInsets.only(
|
|
|
|
|
top: 0, left: 0, right: 0, bottom: 0),
|
|
|
|
|
unselectedLabelColor: Colors.grey[800],
|
|
|
|
|
// unselectedLabelColor: Colors.grey[800],
|
|
|
|
|
tabs: [
|
|
|
|
|
tabWidget(screenSize, _activeTab == 0,
|
|
|
|
|
TranslationBase.of(context).inPatientAll,
|
|
|
|
|
counter: model.inPatientList.length),
|
|
|
|
|
counter: model.inPatientList.length, isFirst: true),
|
|
|
|
|
tabWidget(screenSize, _activeTab == 1,
|
|
|
|
|
TranslationBase.of(context).myInPatientTitle,
|
|
|
|
|
counter: model.myIinPatientList.length),
|
|
|
|
|
counter: model.myIinPatientList.length, isMiddle: true),
|
|
|
|
|
tabWidget(screenSize, _activeTab == 2,
|
|
|
|
|
TranslationBase.of(context).discharged),
|
|
|
|
|
TranslationBase.of(context).discharged, isLast:true),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -193,23 +196,23 @@ class _InPatientScreenState extends State<InPatientScreen>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget tabWidget(Size screenSize, bool isActive, String title,
|
|
|
|
|
{int counter = -1}) {
|
|
|
|
|
{int counter = -1,
|
|
|
|
|
bool isFirst = false,
|
|
|
|
|
bool isMiddle = false,
|
|
|
|
|
bool isLast = false,}) {
|
|
|
|
|
return Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: screenSize.height * 0.070,
|
|
|
|
|
decoration: TextFieldsUtils.containerBorderDecoration(
|
|
|
|
|
isActive ? AppGlobal.appRedColor : Color(0xFFEAEAEA),
|
|
|
|
|
isActive ? AppGlobal.appRedColor : Color(0xFFEAEAEA),
|
|
|
|
|
borderRadius: isActive?4:0,
|
|
|
|
|
borderWidth: 0),
|
|
|
|
|
height: screenSize.height * 0.060,
|
|
|
|
|
decoration:Helpers.getBoxTabsBoxDecoration(isActive: isActive,isFirst: isFirst, isMiddle: isMiddle, isLast: isLast),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
title,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.5,
|
|
|
|
|
color: isActive ? Colors.white : Color(0xFF2B353E),
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
color: isActive ? Colors.white : AppGlobal.appTextColor,
|
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
if (counter != -1)
|
|
|
|
|
Container(
|
|
|
|
|
@ -217,7 +220,7 @@ class _InPatientScreenState extends State<InPatientScreen>
|
|
|
|
|
width: 15,
|
|
|
|
|
height: 15,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: isActive ? Colors.white : Color(0xFFD02127),
|
|
|
|
|
color: isActive ? Colors.white : AppGlobal.appRedColor,
|
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
|
),
|
|
|
|
|
child: Center(
|
|
|
|
|
@ -225,7 +228,7 @@ class _InPatientScreenState extends State<InPatientScreen>
|
|
|
|
|
child: AppText(
|
|
|
|
|
"$counter",
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.5,
|
|
|
|
|
color: !isActive ? Colors.white : Color(0xFFD02127),
|
|
|
|
|
color: !isActive ? Colors.white : AppGlobal.appRedColor,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|