mix icon indicating copy to clipboard operation
mix copied to clipboard

Add onHover to PressableBox

Open jezell opened this issue 1 year ago • 3 comments

Use case

Should be a bit easier to add a hover even callback to the button like you can with onPress

Proposal


final void Function(bool)? onHover

jezell avatar May 10 '24 22:05 jezell

Hey @jezell, thank you for your contribution. Could you send us a use case explaining a real scenario? What would you like to do with this new property?

tilucasoli avatar May 14 '24 13:05 tilucasoli

@tilucasoli change the cursor when someone hovers a button. You can't really use mix on web without injecting web specific wrappers and mouse regions because cursor support is missing.

jezell avatar May 15 '24 08:05 jezell

@tilucasoli the specific case we ran into outside of changing the cursor was when we hover a button we need to impact the state of a widget outside the button. When the pointer goes over a button, we need to display a guide in our editor to show what region of the document is going to be changed if you click the button.

jezell avatar May 15 '24 08:05 jezell

@jezell Version 1.4.0 has onFocusChange. We have refactored the Pressable behavior and implemented the WidgetStateController, which you can learn more about here: https://www.fluttermix.com/docs/tutorials/controlling-widget-state

leoafarias avatar Aug 02 '24 17:08 leoafarias

@leoafarias thanks, we upgraded to 1.4.0 last week!

jezell avatar Aug 05 '24 16:08 jezell