stargazing-dino / just_the_tooltip

A directional tooltip for flutter projects
https://pub.dev/packages/just_the_tooltip
MIT License
56 stars 54 forks source link

feat: add backdrop #57

Closed nogueirahy closed 1 year ago

stargazing-dino commented 2 years ago

Hey ! Thanks for the PR :) Unfortunately, this is a little more complicated. See #48 and the discussion there.

I just recently got back to this library after a long silence so I'll see what I can do about something like this. (Seems like a common request.)

The solution will likely (really can't be sure though) involve making a custom RenderObject similar to RenderBackdropFilter but that creates a Layer for everything in tree except the current child. Either that or the other way I'm not really a fan of which is create a stack (this works internally off layers anyways) and place the child above the backdrop and everything else.

caseycrogers commented 2 years ago

FWIW, I think an ultra simple version of this (akin to my original proposal in #48) would be very easy to add and high value: Add a skrim behind the tooltip but in front of the child that spawned the tooltip. This is slightly substandard UX relative to a skrim that didn't cover the child, but it's WAY better IMO than the current situation where the background isn't obscured at all unless you add your own stack and own custom skrim, which is a pain.

SungHyun22 commented 1 year ago

When will this PR be merged?

PiotrMitkowski commented 1 year ago

Hey @SungHyun22! As I've recently received write access from the package author, I'll try to take a look at this topic ASAP in the upcoming days and let you know about further steps.

PiotrMitkowski commented 1 year ago

Hey @SungHyun22! As I've recently received write access from the package author, I'll try to take a look at this topic ASAP in the upcoming days and let you know about further steps.

@SungHyun22 slightly better approach has been proposed in https://github.com/Nolence/just_the_tooltip/pull/48. That PR has been already merged, so this one will be closed.

@nogueirahy thanks again for your work, I feel really sorry for abandoning it now. I'll do my best to avoid similar confusion in the future.