mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
fixes [`TabBar.tabAlignment` property does't work when `dividerColor` is transparent](https://github.com/flutter/flutter/issues/150316) ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: DefaultTabController( length: 2, child: Scaffold( appBar: AppBar( title: const Text('TabBar'), bottom: const TabBar( dividerColor: Colors.transparent, tabAlignment: TabAlignment.start, isScrollable: true, tabs: <Widget>[ Tab(text: 'TAB 1'), Tab(text: 'TAB 2'), ], ), ), body: const TabBarView( children: <Widget>[ SizedBox.expand(), SizedBox.expand(), ], ), floatingActionButton: FloatingActionButton( onPressed: () {}, child: const Icon(Icons.add), ), ), ), ); } } ``` </details> ### Before (`dividerColor: Colors.transparent`, `tabAlignment: TabAlignment.start`)  ### After (`dividerColor: Colors.transparent`, `tabAlignment: TabAlignment.start`) 