Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

tab color in flutter

TabBar get _tabBar => TabBar(
  tabs: [
    Tab(icon: Icon(Icons.call)),
    Tab(icon: Icon(Icons.message)),
  ],
);
  
@override
Widget build(BuildContext context) {
  return DefaultTabController(
    length: 2,
    child: Scaffold(
      appBar: AppBar(
        title: Text('AppBar'),
        bottom: PreferredSize(
          preferredSize: _tabBar.preferredSize,
          child: ColoredBox(
            color: Colors.red,
            child: _tabBar,
          ),
        ),
      ),
    ),
  );
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #tab #color #flutter
ADD COMMENT
Topic
Name
9+1 =