Как упоминалось в комментарии, вы можете добиться поведения TabBar
, установив свойство isScrollable
для TabBar
на true
.
Разместив его как ответ здесь, чтобы другие могут видеть:
Я добавил пример, используя ваше дерево виджетов:
Widget build(BuildContext context) {
return DefaultTabController(
length: 7,
child: Scaffold(
appBar: AppBar(
bottom: TabBar(
isScrollable: true, // new line
tabs: [
Tab(child: FittedBox(child: Text('HOME', style: TextStyle(color: Colors.black),)) ),
Tab(child: Text('RESULTS', style: TextStyle(color: Colors.black),) ),
Tab(child: Text('INTERNALS', style: TextStyle(color: Colors.black),) ),
Tab(child: Text('NOTES', style: TextStyle(color: Colors.black),) ),
Tab(child: Text('EVENTS', style: TextStyle(color: Colors.black),) ),
Tab(child: Text('QUESTION PAPERS', style: TextStyle(color: Colors.black),) ),
Tab(child: Text('JOBS', style: TextStyle(color: Colors.black),) )]),