Skip to content

Material 3 App bar icons don't use app bar icon theme data color #117918

@esouthren

Description

@esouthren

In Material 3, when setting appBarTheme.actionsIconTheme or appBarTheme.iconTheme overrides, the color values will be overridden by any iconButtonTheme also present in the theme.

This means that users cannot set different app-wide theme overrides for app bar leading and trailing IconButton widgets, which would be expected from the names of actionsIconTheme/iconTheme. While users can provide their own leading/trailing widgets, the app bar itself constructs menu, back and close IconButtons.

This is due to the app bar using IconButton widgets, which defer to Theme.iconButtonTheme for color properties in M3. I think the app bar IconButtons need to have a local override which prioritises appBarTheme icon theme values.

Example at https://dartpad.dev/?id=d9b90b67d6bc18b09b9309c09080355a&channel=beta

This only occurs in Material 3 (try commenting out useMaterial3 in example above).

Metadata

Metadata

Assignees

Labels

f: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions