IssueRaiser

Allow flutter to save widget to image even if widget is offscreen

<!-- Thank you for using Flutter! If you are looking for support, please check out our documentation or consider asking a question on Stack Overflow: * https://flutter.dev/ * https://api.flutter.dev/ * https://stackoverflow.com/questions/tagged/flutter?sort=frequent If you have found a bug or if our documentation doesn't have an answer to what you're looking for, then fill our the template below. Please read our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports --> When you have an application, sometimes it's important to save widgets as images even if they're not on screen. An example of how this would be necessary: having a customized widget displayed in a thumbnail in the app but you wish to save as an image a full size/full screen version of that same widget. ## Steps to Reproduce <!-- Please tell us exactly how to reproduce the problem you are running into. --> 1. ... Following documentation, use RepaintBoundary with a global key in the widget to save as image. 2. ... Wrap the previous widget in an OffStage widget. 3. ... Try to call RenderRepaintBoundary boundary = _exportLayoutKey.currentContext.findRenderObject(); ui.Image image = await boundary.toImage(); ## Logs <!-- Include the full logs of the commands you are running between the lines with the backticks below. If you are running any "flutter" commands, please include the output of running them with "

Posted by tapizquent on Sep 8, 2019, 8:53 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

ux (SaaS)

Allow flutter to save widget to image even if widget is offscreen

tapizquentSep 8, 2019, 8:53 PM

<!-- Thank you for using Flutter! If you are looking for support, please check out our documentation or consider asking a question on Stack Overflow: * https://flutter.dev/ * https://api.flutter.dev/ * https://stackoverflow.com/questions/tagged/flutter?sort=frequent If you have found a bug or if our documentation doesn't have an answer to what you're looking for, then fill our the template below. Please read our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports --> When you have an application, sometimes it's important to save widgets as images even if they're not on screen. An example of how this would be necessary: having a customized widget displayed in a thumbnail in the app but you wish to save as an image a full size/full screen version of that same widget. ## Steps to Reproduce <!-- Please tell us exactly how to reproduce the problem you are running into. --> 1. ... Following documentation, use RepaintBoundary with a global key in the widget to save as image. 2. ... Wrap the previous widget in an OffStage widget. 3. ... Try to call RenderRepaintBoundary boundary = _exportLayoutKey.currentContext.findRenderObject(); ui.Image image = await boundary.toImage(); ## Logs <!-- Include the full logs of the commands you are running between the lines with the backticks below. If you are running any "flutter" commands, please include the output of running them with "

Comments (0)

No comments yet. Start the discussion.

Comment on this issue