I'm trying to achieve standard TabBarView, however I need tabs to be images. It's working the same way as any other TabBar. However, I find it difficult to customize heigth of the image. Could you plese help me with that?
So here is my code. It works as expected. I just can't manipulate the image size. Placing it inside sizedbox didn't help. It expands TabBar itself, however it seems that the row with images is implemented with some fixed height. How can I change it?
tabController = TabController(vsync: this, length: 15);
Scaffold(
bottomNavigationBar: TabBar(
controller: tabController,
isScrollable: true,
indicatorColor: Colors.red,
tabs: List<Tab>.generate(15, (index) {
return Tab(
icon: Image.network(
'https://i.stack.imgur.com/ILTQq.png',
height: 500,
fit: BoxFit.cover,
),
iconMargin: EdgeInsets.zero,
);
})),
body: TabBarView(
controller: tabController,
children: List.generate(15, (index) => Text('$index')),
),