As we pointed previously, the DefaultTabController changes the currently visible tab widget when the user taps on the tab bar or swipes to the left or right on the view. By using this widget, we do not need to specify a controller in the TabBar and TabView descendants.
For more details about the TabController widget, check out the documentation page at https://docs.flutter.io/flutter/material/TabController-class.html.