Skip to content

Allow changing the hardcoded padding set by material3 for BottomAppBar #114794

@chaudharydeepanshu

Description

@chaudharydeepanshu

Use case

Due to the change made by #114439 for BottomAppBar my app designs are broken you can see below:

Material 2 Material 3
Material 2 Material 3
Material 2 Dark Material 3 Dark

GitHub gist to reproduce the effect and DartPad link.

Flutter 3.5.0-12.0.pre.142 • channel master • https://github.com/flutter/flutter.git
Framework • revision c551fe3de1 (29 minutes ago) • 2022-11-07 01:32:24 -0500
Engine • revision 4e45cfb4a2
Tools • Dart 2.19.0 (build 2.19.0-374.0.dev) • DevTools 2.19.0

Proposal

Currently, in bottom_app_bar.dart flutter is setting padding to the child like this when material 3 is active:

final Widget? child = isMaterial3 ? Padding(
padding: const EdgeInsets.symmetric(vertical: 12.0, horizontal: 16.0),
child: widget.child,
) : widget.child;

So, I think one solution for this is to provide an option to modify this padding set by material3 through BottomAppBar properties.

Metadata

Metadata

Assignees

Labels

f: material designflutter/packages/flutter/material repository.found in release: 3.4Found to occur in 3.4frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions