tabAlignment property

TabAlignment? tabAlignment
final

Specifies the horizontal alignment of the tabs within a TabBar.

If TabBar.isScrollable is false, only TabAlignment.fill and TabAlignment.center are supported. Otherwise an exception is thrown.

If TabBar.isScrollable is true, only TabAlignment.start, TabAlignment.startOffset, and TabAlignment.center are supported. Otherwise an exception is thrown.

If this is null, then the value of TabBarThemeData.tabAlignment is used.

If TabBarThemeData.tabAlignment is null and ThemeData.useMaterial3 is true, then TabAlignment.startOffset is used if isScrollable is true, otherwise TabAlignment.fill is used.

If TabBarThemeData.tabAlignment is null and ThemeData.useMaterial3 is false, then TabAlignment.center is used if isScrollable is true, otherwise TabAlignment.fill is used.

Implementation

final TabAlignment? tabAlignment;