-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add disabled property in PressableBox #183
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@@ -157,35 +160,48 @@ class PressableWidgetState extends State<Pressable> { | |||
button: true, | |||
focusable: onEnabled && _node.canRequestFocus, | |||
focused: _node.hasFocus, | |||
child: GestureDetector( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the disabled should behave only for the onTap behavior, we also should not modify the element in the tree through the function returning a widget.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change the function. However, about the disabled state only affects onTap
. Are you sure? In my opinion when disabled is true
, all actions involving the Pressable
should be deactivated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tilucasoli makes sense!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Issue ticket number
#175
Describe your changes
disabled
;disabled
feature inPressable
WidgetType of change
Checklist before requesting a review