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

Disable IconButton ripple effect #1680

Closed
Tracked by #2736
moonlitgrace opened this issue Aug 6, 2023 · 2 comments · Fixed by #2736
Closed
Tracked by #2736

Disable IconButton ripple effect #1680

moonlitgrace opened this issue Aug 6, 2023 · 2 comments · Fixed by #2736
Assignees
Labels
controls enhancement Improvement/Optimization good first issue Good starting point for first-time contributors

Comments

@moonlitgrace
Copy link

How can I disable IconButton ripple effect?
Screenshot from 2023-08-06 05-54-34

code:

ft.IconButton(icon=ft.icons.ADD, icon_size=20)
@moonlitgrace
Copy link
Author

Well here is a hacky way I used to fix this.

ft.Container(
   content=ft.Image(
      src="icons/messenger-outline.svg",
      width=22,
      height=22,
      fit=ft.ImageFit.COVER,
      repeat=ft.ImageRepeat.NO_REPEAT
   ),
   on_click= # on click function
)

However it would be great if I can do something like this:

ft.IconButton(
    icon=ft.icons.ADD,
    icon_size=2,
    show_ripple=False, # show ripple effect or no
    padding=0 # remove padding
)

@ndonkoHenri
Copy link
Contributor

SO thread: https://stackoverflow.com/a/61348072
Link to prop: https://api.flutter.dev/flutter/material/IconButton/highlightColor.html

@ndonkoHenri ndonkoHenri added enhancement Improvement/Optimization good first issue Good starting point for first-time contributors controls labels Feb 21, 2024
@ndonkoHenri ndonkoHenri self-assigned this Feb 23, 2024
@ndonkoHenri ndonkoHenri mentioned this issue Feb 23, 2024
4 tasks
@ndonkoHenri ndonkoHenri moved this to 👀 In review in Flet Development Feb 23, 2024
@ndonkoHenri ndonkoHenri linked a pull request Feb 24, 2024 that will close this issue
4 tasks
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Flet Development Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
controls enhancement Improvement/Optimization good first issue Good starting point for first-time contributors
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants