Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FloatingActionButtonThemeData disabled color #53502

Open
Gintasz opened this issue Mar 28, 2020 · 5 comments
Open

FloatingActionButtonThemeData disabled color #53502

Gintasz opened this issue Mar 28, 2020 · 5 comments
Labels
c: proposal A detailed proposal for a change to Flutter f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. P2 Important issues not at the top of the work list team-design Owned by Design Languages team triaged-design Triaged by Design Languages team

Comments

@Gintasz
Copy link

Gintasz commented Mar 28, 2020

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.
@VladyslavBondarenko VladyslavBondarenko added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. c: proposal A detailed proposal for a change to Flutter labels Mar 30, 2020
@royarg02
Copy link
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

@Levi-Lesches
Copy link
Contributor

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

@royarg02
Copy link
Contributor

royarg02 commented Feb 4, 2021

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)

@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-design Owned by Design Languages team triaged-design Triaged by Design Languages team labels Jul 8, 2023
@flutter-triage-bot flutter-triage-bot bot removed the triaged-design Triaged by Design Languages team label Jul 16, 2023
@flutter-triage-bot
Copy link

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

@HansMuller
Copy link
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

@HansMuller HansMuller added P2 Important issues not at the top of the work list triaged-design Triaged by Design Languages team labels Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: proposal A detailed proposal for a change to Flutter f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. P2 Important issues not at the top of the work list team-design Owned by Design Languages team triaged-design Triaged by Design Languages team
Projects
None yet
Development

No branches or pull requests

6 participants