Tab Bar Tab width customize | Flutter? - flutter

Default the Tabar Tab width are equal.
How i can change each tabbar tab width differently ?
I tried this but not work
TabBar(
controller: _navController,
tabs: [
Expanded(
flex: 30,
child: IconButton(
icon: SvgPicture.asset("assets/svg/home.svg",height: height * .02,),
onPressed: () { },
)),
Expanded(
flex: 40,
child: Center(
child: IconButton(
icon: SvgPicture.asset("assets/svg/user.svg",height: height * .02,),
onPressed: () { },
),
)),
Expanded(
flex: 20,
child: Center(
child: IconButton(
icon: SvgPicture.asset("assets/svg/settings.svg",height: height * .02,),
onPressed: () { },
),
)),
Expanded(
flex: 10,
child: Container()),
],
),
Expecting Result

To have different sizes in tab bar you have to add isScrollable: true. Please try this example
class MyTabbedPage extends StatefulWidget {
const MyTabbedPage({Key? key}) : super(key: key);
#override
State<MyTabbedPage> createState() => _MyTabbedPageState();
}
class _MyTabbedPageState extends State<MyTabbedPage>
with SingleTickerProviderStateMixin {
List<Widget> myTabs = [
SizedBox(
width: 20.0,
child: Tab(text: 'hello'),
),
SizedBox(
width: 70,
child: Tab(text: 'world'),
),
];
late TabController _tabController;
#override
void initState() {
super.initState();
_tabController = TabController(vsync: this, length: myTabs.length);
}
#override
void dispose() {
_tabController.dispose();
super.dispose();
}
#override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
bottom: TabBar(
controller: _tabController,
tabs: myTabs,
isScrollable: true,
),
),
body: TabBarView(
controller: _tabController,
children: myTabs.map((Widget tab) {
final String label = "Test";
return Center(
child: Text(
'This is the $label tab',
style: const TextStyle(fontSize: 36),
),
);
}).toList(),
),
);
}
}

Related

how to manage 'TabBarView' in flutter?

I tried to make TabBarView in TabBar, but When I put the code below, It became white screen totally and there's nothing and not specific error.. How Çan I solve it? please advice me and appreciate it.
class Buttons extends StatefulWidget {
const Buttons({Key? key}) : super(key: key);
#override
State<Buttons> createState() => _ButtonsState();
}
class _ButtonsState extends State<Buttons> with TickerProviderStateMixin { // 다중 AnimationController를 사용할 때..???
#override
Widget build(BuildContext context) {
TabController _tabController = TabController(length: 3, vsync: this);
return Container(
child: Column(
children: [
Container(
child: TabBar(
controller: _tabController,
tabs: [
Tab(icon: ClipRRect(child: Text("Shop"),),),
Tab(icon: ClipRRect(child: Text("Donate"),),),
Tab(icon: ClipRRect(child: Text("BId"),),)
],
),
),
Container(
// width: double.maxFinite,
height: 300,
child: TabBarView(
controller: _tabController,
children: [
ShopPage(),
DonatePage(),
BidPage()
],
)
)
])
);
}
}
In children, Each pages are in other file and I imported those.
I have checked your code there are some corrections in it I have made it so please try the below code. I have checked with the below code and it works well.
class Buttons extends StatefulWidget {
const Buttons({Key? key}) : super(key: key);
#override
State<Buttons> createState() => _ButtonsState();
}
class _ButtonsState extends State<Buttons> with TickerProviderStateMixin { // 다중 AnimationController를 사용할 때..???
late TabController _tabController;
#override
Widget build(BuildContext context) {
#override
void initState() {
// TODO: implement initState
super.initState();
_tabController = TabController(length: 3, vsync: this);
}
return Scaffold(
appBar: AppBar(
centerTitle: false,
title: Text(
'Tabbar Demo',
style: TextStyle(
fontSize: 20
),
),
bottom: PreferredSize(
preferredSize: Size.fromHeight(50),
child: Container(
child: TabBar(
controller: _tabController,
tabs: [
Tab(icon: ClipRRect(child: Text("Shop", style: TextStyle(color: Colors.white),),),),
Tab(icon: ClipRRect(child: Text("Donate", style: TextStyle(color: Colors.white)),),),
Tab(icon: ClipRRect(child: Text("BId", style: TextStyle(color: Colors.white)),),)
],
),
),
),
),
body: SafeArea(
child: Container(
child: Column(
children: [
Expanded(
child: Container(
child: TabBarView(
controller: _tabController,
children: [
Container(color: Colors.red,),
Container(color: Colors.black87,),
Container(color: Colors.yellow,)
],
)
),
)
])
),
)
);
}
}
Here is the out put from the above code
Let me know if any query

How to use multiple tab for single page in Flutter

I create Tab Bar for my project. It includes two tabs and these each tabs are represent two pages.
Here is the code
import 'package:flutter/material.dart';
class TabView extends StatefulWidget {
#override
_TabViewState createState() => _TabViewState();
}
class _TabViewState extends State<TabView> with SingleTickerProviderStateMixin {
TabController _tabController;
#override
void initState() {
_tabController = TabController(length: 2, vsync: this);
super.initState();
}
#override
void dispose() {
super.dispose();
_tabController.dispose();
}
#override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.grey.shade300,
body: SafeArea(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Container(
height: 45,
decoration: BoxDecoration(
color: Colors.grey.shade300,
borderRadius: BorderRadius.circular(
16.0,
),
),
child: TabBar(
controller: _tabController,
indicator: BoxDecoration(
borderRadius: BorderRadius.circular(
16.0,
),
color: Colors.grey.shade900,
),
labelColor: Colors.white,
unselectedLabelColor: Colors.grey.shade900,
tabs: [
Tab(
text: 'One',
),
Tab(
text: 'Two',
),
],
),
),
Expanded(
child: TabBarView(
controller: _tabController,
children: [
Center(
child: Text(
'Page One',
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.w600,
),
),
),
Center(
child: Text(
'Page Two',
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.w600,
),
),
),
],
),
),
],
),
),
),
);
}
}
Here is output
I want to use the tab bar for a single page to change a widget state.
Example
I want use the tab bar to change the color of the container in page one from red to blue and I don't want to switch to page two
How can I do it?
TabBar is not quite suitable for this purpose, although it can be adapted. I suggest you to use CupertinoSegmentedControl from cupertino package. Here is docs, and here is code example:
enum _Tab { one, two }
class MyWidget extends StatefulWidget {
#override
State<StatefulWidget> createState() => _MyWidgetState();
}
class _MyWidgetState extends State<MyWidget> {
_Tab _selectedTab = _Tab.one;
#override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
SizedBox(height: 16),
CupertinoSegmentedControl<_Tab>(
selectedColor: Colors.black,
borderColor: Colors.black,
pressedColor: Colors.grey,
children: {
_Tab.one: Text('One'),
_Tab.two: Text('Two'),
},
onValueChanged: (value) {
setState(() {
_selectedTab = value;
});
},
groupValue: _selectedTab,
),
SizedBox(height: 64),
Builder(
builder: (context) {
switch (_selectedTab) {
case _Tab.one:
return Center(
child: Container(
width: 100,
height: 100,
color: Colors.red,
),
);
case _Tab.two:
return Center(
child: Container(
width: 100,
height: 100,
color: Colors.blue,
),
);
}
},
),
],
);
}
}
Also take a look at CupertinoSlidingSegmentedControl.
for your requirement don't use TabBarView at all, directly use container, change it's color value as per selectedtab index
class Tabscreenstate extends State<Tabscreen> with TickerProviderStateMixin {
int selectedTabIndex = 0;
TabController tabController;
#override
void initState() {
tabController = TabController(length: 2, vsync: this);
tabController.addListener(() {
setState(() {
selectedTabIndex = tabController.index;
});
});
super.initState();
}
#override
Widget build(BuildContext context) {
return Column(
children: [
tabbar(),
Container(color:selectedTabIndex == 0 ? Colors.red : Colors.green),
],
);
}
Widget tabbar() => TabBar(
controller: tabController,
onTap: (value) {
setState(() {
selectedTabIndex = value;
});
},
tabs: [
Text("tab one"),
Text("tab two"),
],
);
}

No TabController for TabBarView flutter

I am trying add TabBar by using the below code:
TabBarView(
children: [
Icon(Icons.directions_car),
Icon(Icons.directions_transit),
Icon(Icons.directions_bike),
],
),
but I found the below error:
No TabController for TabBarView.
and this is whole code:
import '../providers/properties.dart';
import '../providers/cities.dart';
import '../providers/property.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../widgets/properties_grid.dart';
import '../app_theme.dart';
class MyHomePage extends StatefulWidget {
const MyHomePage({Key key}) : super(key: key);
#override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin {
int currentTab = 0;
final PageStorageBucket bucket = PageStorageBucket();
var _showOnlyFavorites = false;
// List<HomeList> homeList = HomeList.homeList;
AnimationController animationController;
bool multiple = true;
#override
void initState() {
animationController = AnimationController(
duration: const Duration(milliseconds: 2000), vsync: this);
super.initState();
}
Future<bool> getData() async {
await Future<dynamic>.delayed(const Duration(milliseconds: 0));
return true;
}
#override
void dispose() {
animationController.dispose();
super.dispose();
}
#override
Widget build(BuildContext context) {
// final properties = Provider.of<Properties>(context, listen: false);
return Scaffold(
extendBody: true,
floatingActionButton: FloatingActionButton(
child: Icon(Icons.add),
onPressed: () {},
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
bottomNavigationBar: BottomAppBar(
elevation: 0,
shape: CircularNotchedRectangle(),
notchMargin: 10,
child: Container(
height: 60,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
MaterialButton(
padding: EdgeInsets.all(0),
minWidth: 155,
onPressed: () {
setState(() {
// currentScreen =
// Chat(); // if user taps on this dashboard tab will be active
currentTab = 1;
});
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
Icons.home,
color: currentTab == 1 ? Colors.blue : Colors.grey,
),
Text(
'Home',
style: TextStyle(
color: currentTab == 1 ? Colors.blue : Colors.grey,
),
),
],
),
)
],
),
// Right Tab bar icons
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
MaterialButton(
padding: EdgeInsets.all(0),
minWidth: 60,
onPressed: () {
setState(() {
// currentScreen =
// Settings(); // if user taps on this dashboard tab will be active
currentTab = 3;
});
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
Icons.view_list,
color: currentTab == 3 ? Colors.blue : Colors.grey,
),
Text(
'Property List',
style: TextStyle(
color: currentTab == 3 ? Colors.blue : Colors.grey,
),
),
],
),
),
MaterialButton(
padding: EdgeInsets.all(0),
minWidth: 77,
onPressed: () {
setState(() {
// currentScreen =
// Settings(); // if user taps on this dashboard tab will be active
currentTab = 4;
});
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
Icons.location_searching,
color: currentTab == 4 ? Colors.blue : Colors.grey,
),
Text(
'Map',
style: TextStyle(
color: currentTab == 4 ? Colors.blue : Colors.grey,
),
),
],
),
),
],
)
],
),
),
),
backgroundColor: AppTheme.white,
body: Stack(
children: <Widget>[
FutureBuilder<bool>(
future: getData(),
builder: (BuildContext context, AsyncSnapshot<bool> snapshot) {
if (!snapshot.hasData) {
return const SizedBox();
} else {
return Padding(
padding:
EdgeInsets.only(top: MediaQuery.of(context).padding.top),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
appBar(),
TabBarView(
children: [
Icon(Icons.directions_car),
Icon(Icons.directions_transit),
Icon(Icons.directions_bike),
],
),
Expanded(
child: FutureBuilder<bool>(
future: getData(),
builder: (BuildContext context,
AsyncSnapshot<bool> snapshot) {
if (!snapshot.hasData) {
return const SizedBox();
} else {
return ChangeNotifierProvider(
create: (context) => Properties(),
child: PropertiesGrid(_showOnlyFavorites),
);
}
},
),
),
],
),
);
}
},
),
],
),
);
}
Widget appBar() {
return SizedBox(
height: AppBar().preferredSize.height,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.only(top: 8, left: 8),
child: Container(
width: AppBar().preferredSize.height - 8,
height: AppBar().preferredSize.height - 8,
),
),
Expanded(
child: Center(
child: Padding(
padding: const EdgeInsets.only(top: 4),
child:
Image.asset('assets/images/logo.png', fit: BoxFit.contain),
),
),
),
Padding(
padding: const EdgeInsets.only(top: 8, right: 8),
child: Container(
width: AppBar().preferredSize.height - 8,
height: AppBar().preferredSize.height - 8,
color: Colors.white,
child: Material(
color: Colors.transparent,
child: InkWell(
borderRadius:
BorderRadius.circular(AppBar().preferredSize.height),
child: Icon(
Icons.location_on,
color: AppTheme.dark_grey,
),
onTap: () {
setState(() {
multiple = !multiple;
});
},
),
),
),
),
],
),
);
}
So How Can I solve this problem...
How can TabBar get to know about the TabBarView? There should be a connection between them to change when tab press or if swap from view right?
So, to connect both two, you have to either wrap your parent widget using DefaultTabController or providing a TabController for TabBar and TabBarView to controll and configure Tabs.
Flutter cookbook example for DefaultTabController:
import 'package:flutter/material.dart';
void main() {
runApp(TabBarDemo());
}
class TabBarDemo extends StatelessWidget {
#override
Widget build(BuildContext context) {
return MaterialApp(
home: DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
bottom: TabBar(
tabs: [
Tab(icon: Icon(Icons.directions_car)),
Tab(icon: Icon(Icons.directions_transit)),
Tab(icon: Icon(Icons.directions_bike)),
],
),
title: Text('Tabs Demo'),
),
body: TabBarView(
children: [
Icon(Icons.directions_car),
Icon(Icons.directions_transit),
Icon(Icons.directions_bike),
],
),
),
),
);
}
}
Using TabController(Example from doc):
class MyTabbedPage extends StatefulWidget {
const MyTabbedPage({ Key key }) : super(key: key);
#override
_MyTabbedPageState createState() => _MyTabbedPageState();
}
class _MyTabbedPageState extends State<MyTabbedPage> with SingleTickerProviderStateMixin {
final List<Tab> myTabs = <Tab>[
Tab(text: 'LEFT'),
Tab(text: 'RIGHT'),
];
TabController _tabController;
#override
void initState() {
super.initState();
_tabController = TabController(vsync: this, length: myTabs.length);
}
#override
void dispose() {
_tabController.dispose();
super.dispose();
}
#override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
bottom: TabBar(
controller: _tabController,
tabs: myTabs,
),
),
body: TabBarView(
controller: _tabController,
children: myTabs.map((Tab tab) {
final String label = tab.text.toLowerCase();
return Center(
child: Text(
'This is the $label tab',
style: const TextStyle(fontSize: 36),
),
);
}).toList(),
),
);
}
}

how to add tabbar without appbar in flutter

i have tried to recreate this design but failed to add TabBar and TabBarView below image inside the body .
Try this
class Demo extends StatefulWidget {
#override
_DemoState createState() => _DemoState();
}
class _DemoState extends State<Demo>
with TickerProviderStateMixin {
TabController _tabController;
#override
void initState() {
// TODO: implement initState
super.initState();
_tabController = new TabController(length: 2, vsync: this);
}
#override
void dispose() {
_tabController.dispose();
super.dispose();
}
#override
Widget build(BuildContext context) {
return Scaffold(
body:Column(
children: <Widget>[
Image.asset("path"),
Container(child:
Column(
children: <Widget>[
Container(
height: 60,
margin: EdgeInsets.only(left: 60),
child: TabBar(
tabs: [
Container(
width: 70.0,
child: new Text(
'Tab1',
style: TextStyle(fontSize: 20),
),
),
Container(
width: 75.0,
child: new Text(
'Tab2',
style: TextStyle(fontSize: 20),
),
)
],
unselectedLabelColor: const Color(0xffacb3bf),
indicatorColor: Color(0xFFffac81),
labelColor: Colors.black,
indicatorSize: TabBarIndicatorSize.tab,
indicatorWeight: 3.0,
indicatorPadding: EdgeInsets.all(10),
isScrollable: false,
controller: _tabController,
),
),
Container(
height: 100,
child: TabBarView(
controller: _tabController,
children: <Widget>[
Container(
child: Text("login"),
),
Container(
child: Text("sign up"),
)
]),
))
],
),
],
)
);
}
You can easily create TabBar without AppBar. Just use Container as parent.
please check this.
Expanded(
child: DefaultTabController(
length: 3,
child: new Scaffold(
appBar: new PreferredSize(
preferredSize:
Size.fromHeight(MediaQuery.of(context).size.height),
child: new Container(
height: 50.0,
child: new TabBar(
labelColor: Colors.black,
isScrollable: true,
tabs: [
Tab(
text: "Tab 1",
),
Tab(
text: "Tab 2",
),
Tab(
text: "Tab 3",
),
],
),
),
),
body: TabBarView(
children: [
Icon(Icons.directions_car),
Icon(Icons.directions_transit),
Icon(Icons.directions_bike),
],
),
),
),
)
I've put on a simple example, have a look and see if it can help you:
First define a Statefull widget and add some definition regarding your tab
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
#override
_MyHomePageState createState() => _MyHomePageState();
}
Define the state for your widget
class _MyHomePageState extends State<MyHomePage>
with SingleTickerProviderStateMixin {
TabController _tabController;
final List<Tab> tabs = [
Tab(
///Give keys so you can make it easier to retrieve content to display, if you have to read the data from a remote resource ...
key: ObjectKey(1),
text: 'Products',
),
Tab(
key: ObjectKey(2),
text: 'Feature',
),
Tab(
key: ObjectKey(3),
text: 'Shipping Info',
),
Tab(
key: ObjectKey(4),
text: 'Reviews',
),
];
///Build the widget for each tab ...
Widget _setDisplayContainer(key) {
if (key == ObjectKey(1)) {
return Text("Content for tab 1");
} else if (key == ObjectKey(2)) {
return Text("Content for tab 2");
} else if (key == ObjectKey(3)) {
return Text("Content for tab 3");
}
return Text("Content for tab 4");
}
#override
void initState() {
super.initState();
_tabController = TabController(vsync: this, length: tabs.length);
}
...
}
After this your build method should look something like this
#override
Widget build(BuildContext context) {
return Scaffold(
appBar: PreferredSize(
preferredSize: Size(MediaQuery.of(context).size.width,
MediaQuery.of(context).size.height * .4),
child: SafeArea(
child: Column(
children: <Widget>[
Container(
child: Expanded(
flex: 4,
child: Stack(fit: StackFit.loose, children: <Widget>[
Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('images/car.jpeg'),
fit: BoxFit.cover,
)),
),
Container(
height: 40,
color: Colors.orangeAccent,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Icon(Icons.arrow_back,
color: Colors.white, size: 20),
Row(
children: <Widget>[
Icon(
Icons.search,
color: Colors.white,
size: 20,
),
Icon(Icons.menu, color: Colors.white, size: 20),
],
)
],
),
),
]),
),
),
Container(
child: TabBar(
unselectedLabelColor: const Color(0xffacb3bf),
indicatorColor: Color(0xFFffac81),
labelColor: Colors.black,
indicatorSize: TabBarIndicatorSize.tab,
indicatorWeight: 3.0,
indicatorPadding: EdgeInsets.all(10),
tabs: tabs,
controller: _tabController,
labelStyle: TextStyle(color: Colors.orangeAccent, fontSize: 12),
onTap: (index) {},
),
),
],
),
),
),
body: TabBarView(
controller: _tabController,
children:
tabs.map((tab) => _setDisplayContainer(tab.key)).toList()));
}
Hope this helps.

Flutter - TextField focus changes TabBar selected index

I have a Scaffold, within it I have a TabBar, TabBarView and a TextField.
The TabBar has 3 tabs (e.g. tabs A, B and C), the TabBarView has 3 views and this TextField is at the last tab (tab C).
Everything is working, but whenever I put the focus on the TextField to type something, the TabBar is changed from tab C to tab A. Very annoying. This should not happen. The TabBarView remains unchanged.
I created the controller in the initState. like this:
#override
void initState() {
super.initState();
widget._tabBarController =
new TabController(length: 3, vsync: this);
}
Any idea why it happens?
Code:
class AtendimentoOrtoWidget extends StatefulWidget {
TabController _tabBarController;
#override
_AtendimentoOrtoWidgetState createState() => _AtendimentoOrtoWidgetState();
}
class _AtendimentoOrtoWidgetState extends State<AtendimentoOrtoWidget>
with SingleTickerProviderStateMixin {
#override
void initState() {
super.initState();
widget._tabBarController =
new TabController(length: 3, vsync: this);
}
#override
Widget build(BuildContext context) {
return SafeArea(
top: false,
child: new DefaultTabController(
length: 3,
child: new Scaffold(
resizeToAvoidBottomPadding: false,
appBar: new AppBar(
toolbarOpacity: 0.5,
automaticallyImplyLeading: true,
backgroundColor: Colors.white,
elevation: 2.0,
title: new TabBar(
controller: widget._tabBarController,
unselectedLabelColor: Colors.black,
indicatorColor: Colors.black,
labelColor: Colors.black,
// indicatorWeight: 0.0,
isScrollable: true,
labelStyle: new TextStyle(
fontSize: 16.0,
fontFamily: 'Caecilia',
fontWeight: FontWeight.w700),
tabs: <Widget>[
new Tab(
text: "TAB A",
),
new Tab(
text: "TAB B",
),
new Tab(
text: "TAB C",
)
],
),
),
backgroundColor: Colors.white,
body: new TabBarView(
controller: widget._tabBarController,
children: <Widget>[
new Container(),
new Container(),
new TextField()
],
))));
}
}
I tried it. Check the below code. If you still facing the same issue then share your implementation.
import 'package:flutter/material.dart';
class TabScreen extends StatefulWidget {
#override
_TabScreenState createState() => _TabScreenState();
}
class _TabScreenState extends State<TabScreen> with SingleTickerProviderStateMixin {
GlobalKey<ScaffoldState> _scaffoldKey = new GlobalObjectKey<ScaffoldState>('TabScreen');
TabController tabController;
#override
void initState() {
super.initState();
tabController = new TabController(length: 3, vsync: this);
}
#override
void dispose() {
super.dispose();
tabController.dispose();
}
#override
Widget build(BuildContext context) {
return Scaffold(
key: _scaffoldKey,
appBar: AppBar(
title: Text("Tab Demo"),
),
backgroundColor: Colors.white,
body: Column(
children: <Widget>[
TabBar(
controller: tabController,
tabs: <Widget>[
Tab(
child: Container(
child: new Text(
'A',
style: TextStyle(color: Colors.black),
),
),
),
Tab(
child: Container(
child: Text(
'B',
style: TextStyle(color: Colors.black),
),
),
),
Tab(
child: Container(
child: Text(
'C',
style: TextStyle(color: Colors.black),
),
),
)
],
),
Flexible(
child: TabBarView(
controller: tabController,
children: <Widget>[
Placeholder(),
Placeholder(),
ListView(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: TextField(
decoration: InputDecoration(labelText: "Name"),
),
),
],
),
],
))
],
),
);
}
}