Skip to content

How to add tabBar to Scaffold without appBar. #17459

@vipulasri

Description

@vipulasri

I want to have tabBar as the topmost widget in the Scaffold but with no appBar and have elevation to the tabBar.

screenshot_20180510-124052

I dont want to have that empty space above tabBar because of appBar title. And also move the tab in tabBar to left/start alignment.

new Scaffold(
  appBar: new AppBar(
    bottom: new TabBar(
      isScrollable: true,
      unselectedLabelColor: Colors.grey,
      indicatorColor: Colors.black54,
      tabs: <Tab>[
        new Tab(
          text: "Featured",
        ),
        new Tab(
          text: "Popular",
        ),
      ],
      controller: _tabController,
    ),
    title: null,
  ),
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions