How to customize tabBar? - flutter

I want to make tapBar looking like this:
But only got this:
This is my code(DefaultTabContainer is wrapped with container with height: 600 and width: 300):
DefaultTabController(
length: 3,
child: Scaffold(
appBar: PreferredSize(
preferredSize: Size.fromHeight(35.h),
child: Container(
margin: EdgeInsets.symmetric(horizontal: 10.w),
decoration: BoxDecoration(
//color: const Color(0xFF1C1B20),
borderRadius: BorderRadius.circular(12),
),
child: TabBar(
controller: _tabController,
indicatorPadding:
const EdgeInsets.symmetric(vertical: 5),
indicator: const ShapeDecoration(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.all(Radius.circular(5)),
),
color: Color(0xFF4F4E51),
),
labelColor: Colors.white,
physics: const NeverScrollableScrollPhysics(),
labelStyle: const TextStyle(
color: Colors.white,
fontSize: 12
),
tabs: const [
Tab(
text: "Day",
),
Tab(
text: "Week",
),
Tab(
text: "Month (Soon)",
),
]),
),
)
)
)
TabController in initState:
_tabController = TabController(vsync: this, length: numberTabs); // numberTabs = 3
I tried to make it like I want but I cannot and I don't understand why...

You can set each tabs as below
tabs:[
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Colors.red,
),
child: Align(
alignment: Alignment.center,
child: Text(
"Day",
),
),
),
),]

Related

Remove Side Portion from DefaultTabController in Flutter

I am using DefaultTabController widget in Flutter and the output is as below :
I want to remove left and right white background portion as you can see it in above image.
How can I remove that portion or can change the color to dark ?
So far I am trying it as below :
return ThemeData(
tabBarTheme: const TabBarTheme(
),
);
Now, here I am not able to find property that changes the white color to dark color. Please guide. Thanks.
Code :
return DefaultTabController(
length: 3,
child: Scaffold(
backgroundColor: Theme.of(context).backgroundColor,
appBar: AppBar(
titleSpacing: 24.w,
centerTitle: false,
title: Text(
Localization.of(context).labelFacilities,
style: TextStyle(
fontWeight: FontWeight.w600,
color: getBool(isDarkMode) ? whiteColor : textColorBlack,
fontSize: 20.sp),
),
actions: <Widget>[
Container(
margin: EdgeInsets.only(right: 28.w),
child: Image.asset(icSearch,
width: 18.w,
height: 18.h,
color: getBool(isDarkMode) ? whiteColor : textColorBlack),
)
],
backgroundColor: Theme.of(context).backgroundColor,
elevation: 0,
bottom: PreferredSize(
preferredSize: _tabBar.preferredSize,
child: Material(
borderRadius: BorderRadius.circular(10.w), //<-- SEE HERE
child: Container(
child: _tabBar,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: lightYellowColor,
borderRadius: BorderRadius.circular(10.w)),
margin: EdgeInsets.symmetric(horizontal: 24.w),
),
),
),
),
body: Container(
margin: EdgeInsets.only(top: 24.h, right: 24.w, left: 24.w),
child: TabBarView(
children: [
AttractionsScreen(),
EventsScreen(),
UtilitiesScreen(),
],
),
),
));
Tabbar widget is created as below :
TabBar get _tabBar => TabBar(
labelPadding: EdgeInsets.zero,
indicatorWeight: 1,
padding: EdgeInsets.zero,
indicatorPadding: EdgeInsets.zero,
labelStyle: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 14.h,
fontFamily: 'Poppins',
),
//For Selected tab
unselectedLabelStyle: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 14.h,
fontFamily: 'Poppins',
),
labelColor: Colors.white,
unselectedLabelColor: textColorBlack,
indicator: BoxDecoration(
borderRadius: BorderRadius.circular(10.w), color: yellowColor),
tabs: [
Tab(
child: Align(
alignment: Alignment.center,
child: Text(Localization.of(context).labelAttractions),
),
),
Tab(
child: Align(
alignment: Alignment.center,
child: Text(Localization.of(context).labelEvents),
),
),
Tab(
child: Align(
alignment: Alignment.center,
child: Text(Localization.of(context).labelUtilities),
),
),
]);
You can find some padding properties on TabBar and set it zero.
TabBar(
padding: EdgeInsets.zero,
labelPadding: EdgeInsets.zero,
indicatorPadding: EdgeInsets.zero,
tabs: [....],
),
#1 You can add color in
Material(
color: "YOUR_COLOR",
)
#2 Remove that portion
Code:
PreferredSize(
preferredSize: _tabBar.preferredSize,
child: Material(
color: lightYellowColor, // <-- Change color HERE
borderRadius: BorderRadius.circular(10.w), //<-- SEE HERE
child: Container(
child: _tabBar,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: lightYellowColor,
borderRadius: BorderRadius.circular(10.w)),
margin: EdgeInsets.symmetric(horizontal: 24.w), //<--Remove that portion
),
),
),

How to move tabs to beneath the app title

Im creating a page which has a few tabs to sort food into categories. For some reason theres a large white section between the top app bar where the title is and the actual tabs. I want to move the tabs up so they're below the app bar and there is not a large white space there! Does anyone know how or why this is the case? Thank you!
I am using flutter.
class FoodPage extends StatefulWidget {
#override
_FoodPageState createState() => _FoodPageState();
}
class _FoodPageState extends State<FoodPage> {
#override
Widget build(BuildContext context){
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
//primarySwatch: Colors.teal,
),
home:DefaultTabController(
length:4,
child: Scaffold(
backgroundColor:Color.fromRGBO(51, 171, 160, 100),
appBar: AppBar(
backgroundColor: Colors.white,
elevation: 5,
bottom: TabBar(
isScrollable: true,
unselectedLabelColor: Color.fromRGBO(51, 171, 160, 100),
indicatorPadding: EdgeInsets.only(left: -30,right: -30),
indicatorSize: TabBarIndicatorSize.label,
indicator: BoxDecoration(
borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10)),
color: Color.fromRGBO(51, 171, 160, 100),
),
tabs: [
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10)),
),
child: Align(
alignment: Alignment.center,
child: Text('ALL'),
),
),
),
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10)),
),
child: Align(
alignment: Alignment.center,
child: Text('FRIDGE'),
),
),
),
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10)),
),
child: Align(
alignment: Alignment.center,
child: Text('FREEZER'),
),
),
),
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(topLeft: Radius.circular(10),topRight: Radius.circular(10)),
),
child: Align(
alignment: Alignment.center,
child: Text('CUPBOARD'),
),
),
),
],),
),
body: TabBarView(children: [
Text('ALL FOOD HERE'),
Text('FRIDGE FOOD HERE'),
Text('FREEZER FOOD HERE'),
Text('CUPBOARD FOOD HERE')
]),
)
)
) ;
}
}
Simply you can adjust tabbar height by changing below parameter.
toolbarHeight
...
appBar: AppBar(
toolbarHeight: 50,
backgroundColor: Colors.white,
elevation: 5,
bottom: TabBar(
isScrollable: true,
...

How to create a DraggableScrollableSheet with showModelBottomSheet?

I created with showModelBottomSheet with DraggableScrollableSheet(), But the problem is the there is no appBar for show some text while dragging, ie, the SingleChildsSrollView() will move up and down while dragging.
*bottomsheet(context) {
Size size = MediaQuery.of(context).size;
return showModalBottomSheet(
backgroundColor: Colors.white,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(13)),
),
context: context,
builder: (BuildContext context) {
return Padding(
padding: const EdgeInsets.all(5),
child: Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
foregroundColor: Colors.green,
backgroundColor: Colors.white,
elevation: 1,
shadowColor: Colors.grey.shade100,
automaticallyImplyLeading: false,
title: const Text('Connect with Reconnect'),
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(
25,
),
child: Container(
padding: const EdgeInsets.only(
left: 15,
right: 15,
top: 15,
),
height: size.height,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(13),
boxShadow: const [
BoxShadow(blurRadius: 2, color: Colors.grey),
],
),
child: Column(children: [
TextField(
cursorColor: Colors.green,
decoration: InputDecoration(
label: const Text('Name'),
labelStyle: TextStyle(color: Colors.grey.shade500),
icon: const Icon(
FontAwesomeIcons.user,
color: Color(0xff453e3d),
size: 22,
),
border: InputBorder.none,
),
),
Container(
width: 315,
height: 1,
margin: const EdgeInsets.only(top: 3, bottom: 3),
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(100),
),
),
TextField(
cursorColor: Colors.green,
decoration: InputDecoration(
label: const Text('Email'),
labelStyle: TextStyle(color: Colors.grey.shade500),
icon: const Icon(
FontAwesomeIcons.envelope,
color: Color(0xff453e3d),
size: 22,
),
border: InputBorder.none,
),
),
Container(
width: 315,
height: 1,
margin: const EdgeInsets.only(top: 3, bottom: 3),
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(100),
),
),
TextField(
cursorColor: Colors.green,
decoration: InputDecoration(
label: const Text('Phone Number'),
labelStyle: TextStyle(color: Colors.grey.shade500),
icon: const Icon(
FontAwesomeIcons.mobileAlt,
color: Color(0xff453e3d),
size: 22,
),
border: InputBorder.none,
),
),
Container(
width: 315,
height: 1,
margin: const EdgeInsets.only(top: 3, bottom: 3),
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(100),
),
),
Container(
margin: const EdgeInsets.only(top: 10),
height: 25,
alignment: Alignment.bottomLeft,
child: Row(
children: [
const Icon(
FontAwesomeIcons.car,
color: Color(0xff453e3d),
),
const SizedBox(
width: 15,
),
Text(
'Services',
style: TextStyle(
color: Colors.grey.shade500, fontSize: 16),
),
],
),
),
]),
),
),
),
),
);
});
}*
I need a bar on top of the singlechildscrollview, I tried with column instead, but no result.
The Problem will solve by the following code!
body: Center(
child: Column(
children: [
const SizedBox(
height: 400,
),
ElevatedButton(
onPressed: () =>
//The showModelBottomSheet Will push a sheet to our page for show widgets and actions
showModalBottomSheet(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,
builder: (context) =>
//The DraggableScrollableSeet will drag top to bottom or vise versa with respect to user interaction.
DraggableScrollableSheet(
initialChildSize: .6,
maxChildSize: .9,
minChildSize: .2,
builder: (context, controller) =>
//The customsheet method will return a widget with a child CustoomScrollView to Drag our DraggableScrollableSheet.
customSheet(context, controller),
),
),
child: const Text('clickme'),
),
],
),
),
//customSheet body
Widget customSheet(BuildContext context, ScrollController controller) {
return Container(
alignment: Alignment.bottomLeft,
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30),
topRight: Radius.circular(30),
),
),
// While use the CustomScrollView have an SliverAppBar for set our bar to constant, ie, the appBar will not move while dragging
child: CustomScrollView(
controller: controller,
slivers: [
SliverAppBar(
shadowColor: Colors.grey.shade100,
elevation: 1,
pinned: true,
backgroundColor: Colors.white,
automaticallyImplyLeading: false,
title: Container(
margin: const EdgeInsets.only(bottom: 45),
width: 60,
height: 4,
color: Colors.grey.shade300),
shape: RoundedRectangleBorder(
side: BorderSide(color: Colors.grey.shade200),
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(30),
topRight: Radius.circular(30),
),
),
),
SliverFillRemaining(
hasScrollBody: false,
child: Column(
children: [
for (int i = 0; i < 10; i++)
Container(
width: 100,
height: 100,
color: Colors.green[i * 100],
),
],
),
)
],
),
);
}
Problem: The above code has a problem with an exit from the DraggableScrollableSheet(),
this is because if we use a GestureDetecter instead of DraggableScrollableSheet(), the child will pop by the following code
GestureDetector(onTap: ()=>Navigator.of(context).pop(),behavior: HitTestBehavior.opaque,
child: DraggableScrollableSheet(
initialChildSize: .6,
maxChildSize: .9,
minChildSize: .2,
builder: (context, controller) =>
customSheet(context, controller),
),
),
But we cannot pop the sheet with tapped by outside of the DraggableScrollabelSheet().
Note: the HitTestBehaviour.opaque will pop the sheet but if we tap anywhere in the Scaffold.
Thank You for following me up and If you have the solution, Please ping me #sureshm2suresh#gmail.com

Customize flutter Tab bar

I am using a TabBar widget and I'd like to customize the TabBar view like this image. I tried lot of times bus there are some spaces between two tabs.
this is the code I used to customize the tab view.
TabBar(
controller: _tabController,
labelColor: Colors.black12,
unselectedLabelColor: Colors.black12,
indicatorSize: TabBarIndicatorSize.label,
tabs: [
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.horizontal(
left: Radius.circular(50), right: Radius.zero),
border: _tabController.index == 1
? Border.all(color: Colors.black12, width: 2)
: Border.all(color: Colors.transparent, width: 2),
color: _tabController.index == 0
? Colors.indigo
: Colors.white,
),
child: Align(
alignment: Alignment.center,
child: Text("Income"),
),
),
),
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.horizontal(
left: Radius.zero, right: Radius.circular(50)),
border: _tabController.index == 1
? Border.all(color: Colors.transparent, width: 2)
: Border.all(color: Colors.black12, width: 2),
color: _tabController.index == 1
? Colors.indigo
: Colors.white,
),
child: Align(
alignment: Alignment.center,
child: Text("Expense"),
),
),
),
],
),
output
if you need to customize your tabs,my beautiful tabs source code may be help you,this is not relevent to this post
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class StudentScreen extends StatefulWidget {
#override
_StudentScreenState createState() => _StudentScreenState();
}
class _StudentScreenState extends State<StudentScreen> with SingleTickerProviderStateMixin {
TabController controller;
int activeTabIndex = 1;
#override
void initState() {
super.initState();
controller = TabController(
length: 2,
initialIndex: 1,
vsync: this,
);
controller.addListener(() {
setState(() {
activeTabIndex = controller.index;
});
});
}
#override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: Column(
children: <Widget>[
TabBar(
indicatorColor: Colors.transparent,
tabs: [
Tab(
child: Container(
width: 100,
height: 36,
decoration: activeTabIndex == 0
? BoxDecoration(
border: Border.all(color: Colors.blue, width: 2),
borderRadius: BorderRadius.all(Radius.circular(16)),
)
: null,
child: Padding(
padding: EdgeInsets.fromLTRB(8, 4, 8, 0),
child: Center(child: Text("Tab one", style: TextStyle(color: Colors.black))),
)),
),
Tab(
child: Container(
width: 100,
height: 36,
decoration: activeTabIndex == 1
? BoxDecoration(
border: Border.all(color: Colors.blue, width: 2),
borderRadius: BorderRadius.all(Radius.circular(16)),
)
: null,
child: Padding(
padding: EdgeInsets.fromLTRB(8, 4, 8, 0),
child: Center(child: Text("Tab two", style: TextStyle(color: Colors.black))),
)),
),
],
controller: controller,
),
Container(
child: Row(
children: <Widget>[],
),
),
Expanded(
child: Container(
child: TabBarView(
controller: controller,
children: <Widget>[
Center(child: Text("Tab one")),
Center(child: Text("Tab two")),
],
),
),
)
],
),
),
);
}
}
you can give radius to whole bottom not only the two tabs
you can do something like this
just give radius to all sides I need to give only top right and top left in my case
PreferredSize(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30),
topRight: Radius.circular(30),
),
),
child: TabBar(
// indicatorPadding: EdgeInsets.all(30),
tabs: [
Tab(
child: Text(
"Expnanse",
style: TextStyle(color: Colors.black),
),
),
Tab(
child: Text(
"Income",
style: TextStyle(color: Colors.black),
),
),
],
),
),
preferredSize: const Size.fromHeight(70.0),
),
),
You neee to add:
labelPadding: EdgeInsets.all(0),
to your TabBar!

Add vertical line as a divider in tabbar as a divider

I have a tab bar and i need to put a vertical line as a divider between tabs, how to do that?
this how i used my tabbar:
new TabBar(
unselectedLabelColor: Color.fromRGBO(119, 119, 119, 1),
labelColor: Colors.black,
controller: controller,
tabs: <Tab>[
new Tab(text: "Girls"),
new Tab(text: "Hero"),
new Tab(text: "Open"),
]),
and I need it to be like this:
Finally It worked for me
TabBar(
tabs: [
_individualTab('assets/icons/bottom_nav/Home.png'),
_individualTab('assets/icons/bottom_nav/Guys.png'),
_individualTab('assets/icons/bottom_nav/Notes.png'),
Tab(
icon: ImageIcon(
AssetImage('assets/icons/bottom_nav/Email.png')
),
),
],
labelColor: STColors.PRIMARY_COLOR,
unselectedLabelColor: Colors.grey,
indicatorColor: Colors.white,
indicatorSize: TabBarIndicatorSize.tab,
labelPadding: EdgeInsets.all(0),
indicatorPadding: EdgeInsets.all(0),
),
Individual Tab Function
Widget _individualTab(String imagePath) {
return Container(
height: 50 + MediaQuery
.of(context)
.padding
.bottom,
padding: EdgeInsets.all(0),
width: double.infinity,
decoration: BoxDecoration(border: Border(right: BorderSide(color: STColors.LIGHT_BORDER, width: 1, style: BorderStyle.solid))),
child: Tab(
icon: ImageIcon(AssetImage(imagePath)),
),
);
}
To achieve small size separator you can use this.
Widget _individualTab(String imagePath) {
return Container(
height: 50,
width: double.infinity,
decoration: BoxDecoration(
border: Border(right: BorderSide(color: STColors.LIGHT_BORDER,
width: 0,
style: BorderStyle.solid),
),
),
child: Stack(children: <Widget>[
Center(
child: Tab(
icon: ImageIcon(AssetImage(imagePath)),
),
),
Align(
alignment: Alignment.centerRight,
child: Container(
color: STColors.appBlackMedium,
width: 1,
height: 25,
),
)
],)
);
}
All you need is
indicator: BoxDecoration(
border: Border(
left: BorderSide(color: Colors.grey), // provides to left side
right: BorderSide(color: Colors.grey), // for right side
),
),
Your solution:
new TabBar(
indicator: BoxDecoration(border: Border(right: BorderSide(color: Colors.orange))),
unselectedLabelColor: Color.fromRGBO(119, 119, 119, 1),
labelColor: Colors.black,
controller: controller,
tabs: <Tab>[
new Tab(text: "Girls"),
new Tab(text: "Hero"),
new Tab(text: "Open"),
]),
Here is the Header I want to achieve
Yea, so I added a var called rightDivider which lets you render divider but the last tab on my custom tab widget.
import 'package:flutter/material.dart';
class TabWidget extends StatelessWidget {
final String label;
final bool rightDivider;
TabWidget({
required this.label,
required this.rightDivider,
});
#override
Widget build(BuildContext context) {
return Container(
height: 32 + MediaQuery.of(context).padding.bottom,
width: double.infinity,
padding: EdgeInsets.all(0),
decoration: (rightDivider)
? BoxDecoration(
border: Border(
right: BorderSide(
color: Colors.grey,
width: 1,
style: BorderStyle.solid,
),
),
)
: null,
child: Center(child: Text(label)),
);
}
}
And called this widget like this
TabBar(
controller: _tabController,
tabs: [
TabWidget(
label: 'Today',
rightDivider: true,
),
TabWidget(
label: 'Calendar',
rightDivider: true,
),
TabWidget(
label: 'Report',
rightDivider: false,
),
],
)
That's how I achieve this behavior...
HomeTab({required String title, bool isSeprator = true}) {
return Tab(
child: Container(
width: 100,
height: 20,
child: Center(
child: Text(title),
),
decoration: isSeprator
? BoxDecoration(
border: Border(
left: BorderSide(
color: Colors.grey,
width: 1,
style: BorderStyle.solid,
),
),
)
: null,
),
);
}
isSeparator is to show separator or not ... because on the last index I am not showing...
Following is the list of tabs ...
List<Widget> _tabScroll() => [
HomeTab(title: "Tab1"),
HomeTab(title: "Tab2"),
HomeTab(title: "Tab3", isSeparator: false),
];
and following is the most important TabBar Code...
TabBar(
labelPadding: EdgeInsets.symmetric(horizontal: 0), //removing extra space
controller: _controller,
isScrollable: true,
indicatorColor: Colors.black,
indicatorSize: TabBarIndicatorSize.label,
indicator: UnderlineTabIndicator(
borderSide: BorderSide(width: 3.0), //hight of indicator
insets: EdgeInsets.symmetric(horizontal: 30.0), //give some padding to reduce the size of indicator
),
unselectedLabelColor: Colors.grey,
tabs: _tabScroll(), //list of tabs
),
The end result looks like this...
Working solution is to create border for individual tabs. Tabs parameter actually accept other elements as a child. So you can use custom containers. That way you can control which side border you want to show (left, rigth or any side):
TabBar(
controller: _tabController,
indicator: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.red,
offset: Offset(0, 2.0),
)
],
color: Colors.white,
),
labelColor: Colors.red,
unselectedLabelColor: Colors.grey.shade900,
labelPadding: EdgeInsets.symmetric(horizontal: 1.0),
isScrollable: false,
tabs: [
Container(
child: Center(
child: Text('T1'),
),
decoration: BoxDecoration(
border: Border(
right: BorderSide(
color: Colors.grey,
width: 2,
style: BorderStyle.solid,
),
),
)),
Container(
child: Center(
child: Text('T2'),
),
decoration: BoxDecoration(
border: Border(
right: BorderSide(
color: Colors.grey,
width: 2,
style: BorderStyle.solid,
),
),
)),
Container(
child: Center(
child: Text('T3'),
),
decoration: BoxDecoration(
border: Border(
right: BorderSide(
color: Colors.grey,
width: 2,
style: BorderStyle.solid,
),
),
)),
Tab(
text: 'T4',
),
],
),
Thats how i have done this
I am using screenutils package from pub you can also use it
SizedBox(
width: 342.w,
height: 41.h,
child: Material(
color: const Color(0xffE2E2E2),
borderRadius: BorderRadius.circular(5),
child: Padding(
padding: EdgeInsets.all(2),
child: TabBar(
padding: EdgeInsets.zero,
indicatorPadding: EdgeInsets.zero,
labelPadding: EdgeInsets.zero,
indicator: BoxDecoration(
color: Color(0xffFFFFFF),
// borderRadius: BorderRadius.circular(5.0)
),
labelColor: Colors.black,
unselectedLabelColor: Color(0xff999BA2),
tabs: [
Container(
width: 1.sw,
decoration: BoxDecoration(
// color: Colors.black,
border: Border(right: BorderSide(color: Colors.white))
),
child: Tab(
text: 'Call',
),
),
Container(
width: 1.sw,
decoration: BoxDecoration(
border: Border(right: BorderSide(color: Colors.white))
),
child: Tab(
text: 'Missed Call',
),
// child: Tab(text: 'Phone',),
),
Container(
child: Tab(
text: 'No Call',
),
// child: Tab(text: 'No Call'),
),
],
),
),
),
)
enter image description here