Skip to content

IconButton's splash radius is too large on an AppBar #64702

Closed

Description

@sidrao2006

The IconButton does follow the default material specs and has a splash radius of about 24px. This is definitely not suitable for auto generated icons like the back button and the scaffold drawer button.

Though the material design does specify a set splash radius, an overflow is definitely not intended. The icon button's splash always overflows in AppBars.

Possible solutions -

  1. Allow setting the default splash radius for all auto generated icon buttons in AppBars.

  2. Set the default splash radius so that it doesnt overflow atleast - in the defaul AppBar

Activity

  1. sidrao2006 commented on Aug 27, 2020

    @sidrao2006
    ContributorAuthor

    Possibly related to inactive issue - #31194

  2. darshankawar commented on Aug 27, 2020

    @darshankawar
    Member

    Hi @sidrao2006,
    Can you provide a screenshot of the splash effect that overflows the app bar ?
    Also, provide flutter doctor -v.
    Thanks.

  3. added
    in triagePresently being triaged by the triage team
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 27, 2020
  4. sidrao2006 commented on Aug 27, 2020

    @sidrao2006
    ContributorAuthor

    It was easier to use a dartpad for this as there were very few changes needed.
    Link to dartpad

    Changes made

    actions: [
    IconButton(
    icon: Icon(Icons.ac_unit),
    onPressed: () => print('Click'),
    ),
    ],

  5. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 27, 2020
  6. sidrao2006 commented on Aug 27, 2020

    @sidrao2006
    ContributorAuthor
  7. dnfield commented on Aug 27, 2020

    @dnfield
    Contributor

    Why not just set the splashSize property to your desired value?

  8. added
    p: material_uimaterial_ui package in flutter/packages
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 27, 2020
  9. sidrao2006 commented on Aug 27, 2020

    @sidrao2006
    ContributorAuthor

    Why not just set the splashSize property to your desired value?

    @dnfield it is not possible to the splashRadius in auto generated IconButtons like the back button and the open drawer button.

  10. dnfield commented on Aug 27, 2020

    @dnfield
    Contributor

    Ahh, ok. It sounds like appBar may need to have some extra property to pass through to iconButtons it creates.

    I did check on some other Android apps and it looks ike the splash does not typically overflow the bar.

    That said, app bars can be different sizes, and some people may want the overflow, so whatever is done here shouldn't be a change to defaults on IconButton.

    /cc @willlarche @rami-a who might know the right person on the Material team to look at this.

  11. changed the title [-]IconButton's splash radius is too large[/-] [+]IconButton's splash radius is too large on an AppBar[/+] on Aug 27, 2020
  12. dnfield commented on Aug 27, 2020

    @dnfield
    Contributor

    Also, based on a quick look at this code: https://github.com/flutter/flutter/tree/master/packages/flutter/lib/src/material/ink_highlight.dart#L122

    Seems a little fishy to me - I wonder if there's some way we should be making sure that the highlight is drawn as a percentage of the constraints rather than as a fixed amount.

  13. 30 remaining items

  14. Enzodtz commented on Feb 15, 2022

    @Enzodtz

    What is the status of this? Thanks

  15. removed their assignment
    on May 30, 2022
  16. GayatriDunakhe commented on Jul 27, 2022

    @GayatriDunakhe

    The icon splashRadius look this so
    image

    I try to do this -
    splashRadius: Material.defaultSplashRadius / 2
    then it dosen't show any click moment on that app bar

    image

    How I deal with this?

  17. QuncCccccc commented on Jul 27, 2022

    @QuncCccccc
    Contributor

    Hi! The IconButton component is recently updated to the Material Design 3 spec, so the splash radius issue will no longer exist. Here's the issue link which contains the related PRs: #103528

    Please let me know if there are any questions:) Thanks!

  18. FeodorFitsner commented on Aug 2, 2022

    @FeodorFitsner

    Is it by design that IconButton in AppBar is not having a round splash now?

    image

  19. added
    r: fixedIssue is closed as already fixed in a newer version
    on Aug 12, 2022
  20. QuncCccccc commented on Aug 25, 2022

    @QuncCccccc
    Contributor

    The PR is reverted, so I re-opened this issue. Will add a reland soon.

  21. removed
    r: fixedIssue is closed as already fixed in a newer version
    on Aug 26, 2022
  22. added
    r: fixedIssue is closed as already fixed in a newer version
    on Sep 2, 2022
  23. github-actions commented on Sep 16, 2022

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

  24. locked as resolved and limited conversation to collaborators on Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a: qualityA truly polished experiencefound in release: 1.20Found to occur in 1.20frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions