A simple package to capture widgets as Images. Now you can capture widgets that are not rendered on the screen!
A simple package to capture widgets as Images. Now you can also capture the widgets that are not rendered on the screen!
This package wraps your widgets inside [RenderRepaintBoundary](https://docs.flutter.io/flutter/rendering/RenderRepaintBoundary-class.html)
This package wraps your widgets inside [RenderRepaintBoundary](https://docs.flutter.io/flutter/rendering/RenderRepaintBoundary-class.html)
[Source](https://stackoverflow.com/a/51118088)
[Source](https://stackoverflow.com/a/51118088)
---
| | |
<br>
| :---: | :---: |
<divstyle="display: flex;">
|<imgsrc="https://github.com/SachinGanesh/screenshot/raw/master/assets/screenshot.gif"alt="screenshot"/>|<p> Capture a `widget`:</p><imgsrc="https://github.com/SachinGanesh/screenshot/raw/master/assets/code1.png"alt="screenshot"/><hr><p> Capture an `invisible widget` (a widget which is not part of the widget tree):</p><imgsrc="https://github.com/SachinGanesh/screenshot/raw/master/assets/code2.png"alt="screenshot"/>|
For this you can use captureAndSave method by passing directory location. By default, the captured image will be saved to Application Directory. Custom paths can be set using **path parameter**. Refer [path_provider](https://pub.dartlang.org/packages/path_provider)
For this you can use `captureAndSave` method by passing directory location. By default, the captured image will be saved to Application Directory. Custom paths can be set using **path parameter**. Refer [path_provider](https://pub.dartlang.org/packages/path_provider)
### Note
### Note
>Method captureAndSave is not supported for web.
>Method `captureAndSave` is not supported for `web`.
```dart
```dart
...
@@ -178,7 +110,7 @@ Captured image may look pixelated. You can overcome this issue by setting value
...
@@ -178,7 +110,7 @@ Captured image may look pixelated. You can overcome this issue by setting value