|<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"/>|
---
## Getting Started
This handy package can be used to capture any Widget including full screen screenshots & individual widgets like Text().
This handy package can be used to capture any Widget including full screen screenshots & individual widgets like `Text()`.
1) Create Instance of Screenshot Controller
1) Create Instance of `Screenshot Controller`
```dart
class_MyHomePageStateextendsState<MyHomePage>{
...
...
@@ -44,7 +33,7 @@ class _MyHomePageState extends State<MyHomePage> {
...
}
```
2) Wrap the widget that you want to capture inside **Screenshot** Widget. Assign the controller to screenshotController that you have created earlier
2) Wrap the widget that you want to capture inside `Screenshot` Widget. Assign the controller to `screenshotController` that you have created earlier
```dart
Screenshot(
...
...
@@ -53,7 +42,7 @@ Screenshot(
),
```
3) Take the screenshot by calling capture method. This will return a Uint8List
3) Take the screenshot by calling `capture` method. This will return a `Uint8List`
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
>Method captureAndSave is not supported for web.
>Method `captureAndSave` is not supported for `web`.
```dart
...
...
@@ -178,7 +110,7 @@ Captured image may look pixelated. You can overcome this issue by setting value