Skip to content

[material_ui] ButtonThemeData == and hashCode ignore layoutBehavior #195754

Open
flutter/packages
#13517

Description

@ChandraChaan

Steps to reproduce

const a = ButtonThemeData();
const b = ButtonThemeData(layoutBehavior: ButtonBarLayoutBehavior.constrained);
print(a == b);

Expected results

false, since the two themes have different layoutBehavior values.

Actual results

true. ButtonThemeData.==, hashCode and debugFillProperties don't include layoutBehavior. Because ButtonTheme.updateShouldNotify compares data, changing only layoutBehavior also doesn't notify widgets that depend on the theme.

Seen in packages/material_ui/lib/src/button_theme.dart on main of flutter/packages (material_ui 1.9.0).

Activity

  1. suryaKommana2662 commented on Nov 2, 2026

    @suryaKommana2662
    Contributor

    @ChandraChaan Thanks for the report. I was able to reproduce this issue locally. Routing to team-design for further investigation.

    Flutter Doctor Output

    [✓] Flutter (Channel master, 3.50.0-1.0.pre-340, on macOS 27.0 26A428 darwin-arm64, locale en-IN) [2.6s]
        • Flutter version 3.50.0-1.0.pre-340 on channel master at /Users/suryakommana/develop/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision ef74a07661 (3 hours ago), 2026-11-02 03:14:25 +0000
        • Engine revision ef74a07661
        • Dart version 3.15.0 (build 3.15.0-101.0.dev)
        • DevTools version 2.62.0-dev.0
        • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets,
          enable-record-use, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration, enable-riscv64, enable-hcpp
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [2.4s]
        • Android SDK at /Users/suryakommana/Library/Android/sdk
        • Emulator version 37.1.11.0 (build_id 15917651) (CL:N/A)
        • Platform android-37.0, build-tools 36.0.0
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
          This is the JDK bundled with the latest Android Studio installation on this machine.
          To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
        • Java version OpenJDK Runtime Environment (build 25.0.2+-15348964-b329.117)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 27.2) [2.4s]
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 27B52
        • CocoaPods version 1.17.0
    
    [✓] Chrome - develop for the web [4ms]
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Connected device (2 available) [5.9s]
        • macOS (desktop) • macos  • darwin-arm64   • macOS 27.0 26A428 darwin-arm64
        • Chrome (web)    • chrome • web-javascript • Google Chrome 156.0.8078.76
    
    [✓] Network resources [715ms]
        • All expected network resources are available.
    
    • No issues found!
  2. added
    p: material_uimaterial_ui package in flutter/packages
    packageflutter/packages repository. See also p: labels.
    team-designOwned by Design Languages team
    and removed
    in triagePresently being triaged by the triage team
    on Nov 2, 2026
  3. added
    P3Issues that are less important to the Flutter project
    triaged-designTriaged by Design Languages team
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectp: material_uimaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions