-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Use case
If we add a smaller height to TabBar, E.G:
AppBar(
bottom: const TabBar(
tabs: [
Tab(
text: 'Profile',
height: 30,
),
Tab(
text: 'Appearance',
height: 30,
),
],
),
It adds a gap between the `AppBar` `toolbar` and the `bottom`:
And without the height specified on the Tab, it has no gap:
I don't want the gap. So i want this:
Proposal
Ideally we should be able to control the padding between them but i found just adding mainAxisSize: MainAxisSize.min, below to app_bar.dart at least removed the gap entirely which is better than mandatory gap:
if (widget.bottom != null) {
appBar = Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Flexible(
child: ConstrainedBox(
constraints: BoxConstraints(maxHeight: toolbarHeight),
child: appBar,
),
),
if (widget.bottomOpacity == 1.0)
widget.bottom!
else
Opacity(
opacity: const Interval(0.25, 1.0, curve: Curves.fastOutSlowIn).transform(widget.bottomOpacity),
child: widget.bottom,
),
],
);
Adding this between them gave the padding desired: SizedBox(height: 5), so ideally you would add bottomSpacer as a parameter to customise: SizedBox(height: bottomSpacer), or make it EdgeInsets and wrap the bottom with it.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Type
Projects
Status
Done (PR merged)