Commit 3359900
authored
Fix transparent
fixes [`TabBar.tabAlignment` property does't work when `dividerColor` is transparent](flutter/flutter#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`)
dividerColor breaks TabBar.tabAlignment (#150350)1 parent a9f554a commit 3359900
2 files changed
Lines changed: 54 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1025 | 1025 | | |
1026 | 1026 | | |
1027 | 1027 | | |
| 1028 | + | |
| 1029 | + | |
1028 | 1030 | | |
1029 | 1031 | | |
1030 | 1032 | | |
1031 | 1033 | | |
1032 | 1034 | | |
1033 | 1035 | | |
1034 | 1036 | | |
| 1037 | + | |
| 1038 | + | |
1035 | 1039 | | |
1036 | 1040 | | |
1037 | 1041 | | |
| |||
1813 | 1817 | | |
1814 | 1818 | | |
1815 | 1819 | | |
1816 | | - | |
1817 | 1820 | | |
1818 | 1821 | | |
1819 | 1822 | | |
1820 | | - | |
| 1823 | + | |
1821 | 1824 | | |
1822 | 1825 | | |
1823 | 1826 | | |
1824 | 1827 | | |
1825 | | - | |
| 1828 | + | |
1826 | 1829 | | |
1827 | 1830 | | |
1828 | | - | |
| 1831 | + | |
1829 | 1832 | | |
1830 | 1833 | | |
1831 | 1834 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6722 | 6722 | | |
6723 | 6723 | | |
6724 | 6724 | | |
6725 | | - | |
6726 | | - | |
6727 | | - | |
6728 | | - | |
6729 | | - | |
6730 | | - | |
6731 | | - | |
6732 | | - | |
6733 | | - | |
6734 | | - | |
6735 | | - | |
6736 | | - | |
6737 | | - | |
6738 | | - | |
6739 | | - | |
6740 | | - | |
6741 | | - | |
6742 | | - | |
6743 | | - | |
6744 | | - | |
6745 | | - | |
6746 | | - | |
6747 | | - | |
6748 | | - | |
6749 | 6725 | | |
6750 | 6726 | | |
6751 | 6727 | | |
| |||
7250 | 7226 | | |
7251 | 7227 | | |
7252 | 7228 | | |
| 7229 | + | |
| 7230 | + | |
| 7231 | + | |
| 7232 | + | |
| 7233 | + | |
| 7234 | + | |
| 7235 | + | |
| 7236 | + | |
| 7237 | + | |
| 7238 | + | |
| 7239 | + | |
| 7240 | + | |
| 7241 | + | |
| 7242 | + | |
| 7243 | + | |
| 7244 | + | |
| 7245 | + | |
| 7246 | + | |
| 7247 | + | |
| 7248 | + | |
| 7249 | + | |
| 7250 | + | |
| 7251 | + | |
| 7252 | + | |
| 7253 | + | |
| 7254 | + | |
| 7255 | + | |
| 7256 | + | |
| 7257 | + | |
| 7258 | + | |
| 7259 | + | |
| 7260 | + | |
| 7261 | + | |
| 7262 | + | |
| 7263 | + | |
| 7264 | + | |
| 7265 | + | |
| 7266 | + | |
| 7267 | + | |
| 7268 | + | |
| 7269 | + | |
| 7270 | + | |
| 7271 | + | |
| 7272 | + | |
| 7273 | + | |
| 7274 | + | |
| 7275 | + | |
7253 | 7276 | | |
0 commit comments