Repository navigation
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.32Found to occur in 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33Found to occur in 3.33frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Steps to reproduce
- define tabBarTheme with indicator
- use TabBar like
Expected results
documentation in tabs.dart says:
/// If [indicator] is not null or provided from [TabBarTheme],
/// then [indicatorWeight] and [indicatorColor] are ignored.
Actual results
IndicatorWeight is not ignored, 2 pixels are inserted.
Because it is not possible to set value to zero, i used indicatorWeight: 0.0000001 in TabBar as workaround
Code sample
tabBarTheme: Theme.of(context).tabBarTheme.copyWith(
unselectedLabelColor: neutral800,
unselectedLabelStyle: const TextStyle(fontWeight: FontWeight.w600, fontSize: 13),
labelColor: neutral800,
labelStyle: TextStyle(fontWeight: FontWeight.w600, fontSize: 13),
indicatorColor: red500,
dividerColor: Colors.transparent,
indicator: BoxDecoration(
color: neutral100,
borderRadius: BorderRadius.circular(smallBorderRadius),
border: BoxBorder.fromBorderSide(BorderSide(color: neutral800)),
),
indicatorSize: TabBarIndicatorSize.tab,
),
TabBar(
padding: EdgeInsets.symmetric(horizontal: mediumPadding / 2),
indicatorPadding: EdgeInsetsGeometry.symmetric(vertical: mediumPadding / 2),
controller: controller,
tabs: tabs,
onTap: onTap,
),
Flutter Doctor output
[✓] Flutter (Channel stable, 3.32.6, on Ubuntu Questing Quokka (development branch) 6.15.5-061505-generic, locale
en_DE.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2025.1.2)
[✓] Connected device (2 available)
[✓] Network resources
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.32Found to occur in 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33Found to occur in 3.33frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Activity
tirth-patel-nc commentedon Jul 10, 2025
hi @qeepcologne, thanks for the report. I've simplified your snippet to a minimal reproducible example. Seeing the same behaviour with latest SDK versions. I've set
indicatorWeight: 100, but it doesn't seem to be ignored even though anindicatoris provided viaTabBarThemeData.Code Sample
[-]TabBar indicatorWeight (defaults 2 even if indicator provided in TabBarTheme)[/-][+]TabBar indicatorWeight is not ignored as documented [/+]3 remaining items
flutter-triage-bot commentedon Dec 1, 2025
This issue is assigned to @huycozy but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
saurabh-mirajkar commentedon Mar 24, 2026
Based on the investigation and code references above by @huycozy, it seems that
indicatorWeightis still used internally for computing thepreferredSizeof theTabBar, even when a customindicatoris provided.Given that
preferredSizedoes not have access toBuildContext, this behavior appears intentional or constrained by design.Instead of changing behavior (which could have backward compatibility implications), I think the documentation could be clarified to state that:
indicatorWeightdoes not affect indicator painting when a customindicatoris providedI can work on a documentation update PR if this direction makes sense.
QuncCccccc commentedon Mar 25, 2026
Thanks for your both analysis @huycozy @saurabh-mirajkar! And I think a doc update PR makes sense to me.
saurabh-mirajkar commentedon Mar 25, 2026
@QuncCccccc Submitted a PR to clarify the documentation around
indicatorWeightbehavior when a customindicatoris provided. Would appreciate feedback!Update TabBar documentation to clarify indicatorWeight behavior (#184104
github-actions commentedon Apr 13, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Update TabBar documentation to clarify indicatorWeight behavior (flut…
Update TabBar documentation to clarify indicatorWeight behavior (#184…
Update TabBar documentation to clarify indicatorWeight behavior (#184…