device_preview_screenshot 1.0.0 copy "device_preview_screenshot: ^1.0.0" to clipboard
device_preview_screenshot: ^1.0.0 copied to clipboard

A plugin for device_preview that allows to take screenshots.

Device Preview : Screenshot #

Plugin for Device Preview that adds a menu to take a screenshot of the current preview.

Install #

Declare it as any other dependency in your pubspec.yaml file.

dependencies:
  device_preview_screenshot: <latest version>
copied to clipboard

Then, add a DevicePreviewScreenshot to your DevicePreview's tools property.

import 'package:device_preview_screenshot/device_preview_screenshot.dart';

DevicePreview(
    // ...
    tools: [
        ...DevicePreview.defaultTools,
        const DevicePreviewScreenshot(),
    ],
),
copied to clipboard

Usage #

Click on the dedicated button from the toolbar to create a capture of your preview.

Screenshot storage #

You can customize the way your screenshots are saved by updating the onScreenshot property of the plugin.

By default, the screenshots are displayed as base64 image data in the console (and saved in your Clipboard).

You can also choose to save the screenshot in the local storage of your device by using screenshotAsFiles(Directory directory) , or to implement a custom ScreenshotProcessor.

15
likes
140
points
11.1k
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.26 - 2025.04.10

A plugin for device_preview that allows to take screenshots.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

device_preview, flutter, path

More

Packages that depend on device_preview_screenshot