Skip to content

FloatingActionButtonThemeData disabled color #53502

Open

Description

@gintasz

FloatingActionButtonThemeData does not have disabled color. It would be a easy if it had, so dimming the floating action button when data fields are not filled could be done with one line of code.

gintas-mac:lifetrens gintas$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.16.3-pre.64, on Mac OS X 10.15.3 19D76, locale
    en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.6)
[!] VS Code (version 1.43.2)
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (3 available)

! Doctor found issues in 1 category.

Activity

  1. added
    p: material_uimaterial_ui package in flutter/packages
    frameworkflutter/packages/flutter repository. See also f: labels.
    c: proposalA detailed proposal for a change to Flutter
    on Mar 30, 2020
  2. royarg02 commented on Apr 26, 2020

    @royarg02
    Contributor

    I don't know whether it will be okay to have one, as Material design does not allow FABs to be disabled. It recommends it to be hidden instead.
    https://material.io/design/interaction/states.html#disabled

  3. Levi-Lesches commented on Feb 4, 2021

    @Levi-Lesches
    Contributor

    Should that be the default behavior then? When onPressed == null, hide the FAB?

  4. royarg02 commented on Feb 4, 2021

    @royarg02
    Contributor

    Should that be the default behavior then? When onPressed == null, hide the FAB?

    It might be a good change, as onPressed: null makes the FAB non-interactive, but still displays it. I checked for the following version:

    Flutter 1.26.0-18.0.pre.187 • channel master • https://github.com/flutter/flutter
    Framework • revision e96ce0ecb4 (39 minutes ago) • 2021-02-04 02:46:03 -0500
    Engine • revision 5e50f4bad3
    Tools • Dart 2.12.0 (build 2.12.0-285.0.dev)
    
  5. flutter-triage-bot commented on Jul 16, 2023

    @flutter-triage-bot

    This issue is missing a priority label. Please set a priority label when adding the triaged-design label.

  6. HansMuller commented on Jul 27, 2023

    @HansMuller
    Contributor

    If the FAB's foreground and background color properties could be MaterialStateColors, then we could add support for a disabled color without really changing the API. However a much nicer solution would be (still using the same API) to refactor FAB to be a ButtonStyleButton. There's an existing PR that's pretty far along: #53502

  7. added
    P2Important issues not at the top of the work list
    triaged-designTriaged by Design Languages team
    on Jul 27, 2023
  8. added
    packageflutter/packages repository. See also p: labels.
    and removed
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 17, 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

    P2Important issues not at the top of the work listc: proposalA detailed proposal for a change to Flutterp: 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