fix tabs inside doctor replay

merge-requests/922/head
Elham Rababh 4 years ago
parent 25e09fa105
commit fb51325188

@ -81,15 +81,6 @@ class _DoctorReplyScreenState extends State<DoctorReplyScreen>
preferredSize: Size.fromHeight( preferredSize: Size.fromHeight(
MediaQuery.of(context).size.height * 0.070), MediaQuery.of(context).size.height * 0.070),
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 0.070,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 0.5), //width: 0.7
),
color: Colors.white),
child: Center(
child: TabBar( child: TabBar(
isScrollable: false, isScrollable: false,
controller: _tabController, controller: _tabController,
@ -104,18 +95,22 @@ class _DoctorReplyScreenState extends State<DoctorReplyScreen>
tabWidget( tabWidget(
screenSize, screenSize,
_activeTab == 0, _activeTab == 0,
/// TODO Elham* Add Tran
"Not Replied", "Not Replied",
isFirst: true, context: context
), ),
tabWidget( tabWidget(
screenSize, screenSize,
_activeTab == 1, _activeTab == 1,
TranslationBase.of(context).all, TranslationBase.of(context).all,
isLast: true,
context: context
), ),
], ],
), ),
), ),
), ),
),
body: Column( body: Column(
children: [ children: [
Expanded( Expanded(
@ -140,44 +135,22 @@ class _DoctorReplyScreenState extends State<DoctorReplyScreen>
} }
Widget tabWidget(Size screenSize, bool isActive, String title, Widget tabWidget(Size screenSize, bool isActive, String title,
{int counter = -1}) { {int counter = -1, bool isFirst = false,
bool isMiddle = false,
bool isLast = false,context}) {
return Center( return Center(
child: Container( child: Container(
height: screenSize.height * 0.070, height: Helpers.getTabHeight(context),
decoration: TextFieldsUtils.containerBorderDecoration( decoration: Helpers.getBoxTabsBoxDecoration(isActive: isActive,isFirst: isFirst, isMiddle: isMiddle, isLast: isLast),
isActive ? Color(0xFFD02127 /*B8382B*/) : Color(0xFFEAEAEA),
isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
AppText( Helpers.getTabText(title: title, isActive: isActive),
title,
fontSize: SizeConfig.textMultiplier * 1.5,
color: isActive ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
if (counter != -1) if (counter != -1)
Container( Helpers.getTabCounter(
margin: EdgeInsets.all(4), isActive: isActive,
width: 15, counter:counter
height: 15, )
decoration: BoxDecoration(
color: isActive ? Colors.white : Color(0xFFD02127),
shape: BoxShape.circle,
),
child: Center(
child: FittedBox(
child: AppText(
"$counter",
fontSize: SizeConfig.textMultiplier * 1.5,
color: !isActive ? Colors.white : Color(0xFFD02127),
fontWeight: FontWeight.w700,
),
),
),
),
], ],
), ),
), ),

Loading…
Cancel
Save