posted 2 months ago
i think it is an inconsistency between the controller's length and the number of children in TabBarView, my app also got crashed thanks to chatgpt that helped me,
// Ensure the length of your controller matches the number of children
TabController _tabController = TabController(length: 2, vsync: this);
// Example of TabBarView with two children
TabBarView(
controller: _tabController,
children: [
YourFirstWidget(),
YourSecondWidget(),
],
)