Skip to content

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

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).

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Jan 10, 2023
  2. github-actions commented on Mar 4, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  3. locked as resolved and limited conversation to collaborators on Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

frameworkflutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packages

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions