Skip to content

TabBar shadows are clipped and indicator height cannot be reduced #59728

@sanisloandras

Description

@sanisloandras

Hello!

To understand what am I trying to achieve, have a look at the attached image.
Screenshot 2020-06-18 at 3 36 51

But as you can see, the tab's shadow can not fit inside the Tab. So how do I make space for the shadow?
Also, how do I change the indicators size? For example, I want to make my tabs indicator height smaller.
I can't find any way to configure that.

Here is how I build a Tab:

Tab buildTab(CategoryModel category) {
    return Tab(child: ConstrainedBox(
      constraints: BoxConstraints(
        minWidth: 48,
      ),
      child: Text(category.name, textAlign: TextAlign.center,),
    ),);
  }

And this is how I builde the TabBar:

return TabBar(
      indicator: BoxDecoration(
          color: Colors.blue,
          borderRadius: const BorderRadius.all(
            const Radius.circular(999.0),
          ),
          boxShadow: const [BoxShadow(color: Colors.blueAccent, blurRadius: 6.0)]
      ),
      unselectedLabelColor: Colors.blue,
      labelColor: Colors.white,
      isScrollable: true,
      tabs: tabs,
    );

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityf: material designflutter/packages/flutter/material repository.found in release: 3.3Found to occur in 3.3found in release: 3.7Found to occur in 3.7frameworkflutter/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 teamworkaround availableThere is a workaround available to overcome the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions