JayTWWM / Share-Files-And-Screenshot-Widgets-Flutter

This pub lets you share any kind of files (csv, mp4, png etc), take screenshot of the widgets you want and return as Image and share them directly as well in the form of an image.
Other
24 stars 14 forks source link

Hide certain elements within the widget from appearing the screenshot #2

Closed moosalim closed 4 years ago

moosalim commented 4 years ago

Thanks, for the code, it works fine. Questions, if I use a card instead of container and put an icon in the card to be pressed to screenshot and share the card. Is there a way to hide this icon from appearing in the card screenshot?

Originally posted by @moosalim in https://github.com/JayTWWM/Share-Files-And-Screenshot-Widgets-Flutter/issues/1#issuecomment-674434890

JayTWWM commented 4 years ago

There is no way you can hide certain elements What you can do is create a dummy/invisible widget somewhere and then take its screenshot.

moosalim commented 4 years ago

Thanks for suggestion, good idea. but I could not do it. Can you please help me with sample code. I will highly appreciate your support.

JayTWWM commented 4 years ago

Just use a stack and put two different widgets in it.......... One will be the screenshot widget and another will be just an overlay

moosalim commented 3 years ago

Hello @JayTWWM

it is me after long time. I have tried your suggestion to use dummy widget hidden within a Stack, but no use. Your plugin seems not working if the widget is not visible.