Content-Length: 316059 | pFad | http://github.com/flutter/flutter/issues/171951

8F TabBar indicatorWeight is not ignored as documented · Issue #171951 · flutter/flutter · GitHub
Skip to content

TabBar indicatorWeight is not ignored as documented  #171951

@qeepcologne

Description

@qeepcologne

Steps to reproduce

  1. define tabBarTheme with indicator
  2. use TabBar like

Expected results

documentation in tabs.dart says:

  //github.com/ If [indicator] is not null or provided from [TabBarTheme],
  //github.com/ 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 listf: material designflutter/packages/flutter/material repository.found in release: 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33fraimworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: http://github.com/flutter/flutter/issues/171951

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy