In my app, I need to disable many widgets many times. But I cannot find convenient way to do so? I would appreciate your help. Thank you!
In my app, I need to disable many widgets many times. But I cannot find convenient way to do so? I would appreciate your help. Thank you!
You can wrap any widget in flutter with the AbsorbPointer widget so that you can enable or disable the widget.
body: AbsordPointer(
absorbing: false,
...
...
...
)
if you are talking about TextField widget you can set readOnly atribute to true. If its a checkBox or DropdownButton pass null for onChanged attribute.