10

I'm trying to use an expansion tile and make the expansion capability disabled in few cases... Is it possible to do so? I mean does any of the existing "expansion" widgets cover this thing or not? If not, then is any package available that can help me do this? How should I approach this thing?

3
  • Do you try to view some tree? Commented Jan 7, 2021 at 17:21
  • Sorry @rstrelba i don't know what you mean by that Commented Jan 8, 2021 at 10:10
  • I mean if you want to build forexample tree in your interface, you can use ExpansionTile for branches and ListTile for leaves Commented Jan 8, 2021 at 11:39

1 Answer 1

23

You can use IgnorePointer, which prevent children widget from pointer events, and set ignoring to true.

IgnorePointer(
  ignoring: true,
  child: ExpansionTile()
)

For more information about IgnorePointer, check the docs

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks a lot... the ignore pointer definitely is the solution
that's not a solution. I need to detect something when I click on the ExpansionTitle. If it's true I active something but not the ExpansionTitle. Having this IgnorePointer it doesn't work
@Dani Although I'm a year and 3 months late with an answer. You can always wrap the IgnorePointer with a GestureDetector.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.