Skip to content
pubscout

device_preview_screenshot

1.0.0, released 5 years ago by an unverified publisher

A plugin for device_preview that allows taking screenshots.

$ flutter pub add device_preview_screenshot
Source repository

What it does

A plugin for device_preview that adds a menu to take a screenshot of the current preview. By default, it displays screenshots as base64 image data in the console and saves them to your clipboard, with options to customize how they are saved.

AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are using device_preview and want to capture screenshots of your app preview.
  • You want to copy captured preview screenshots directly to your clipboard or output them as base64.

Skip it when

  • You are not using device_preview in your application.
  • You need standard device-level screenshots outside of the device_preview environment.

Strengths

  • Integrates seamlessly with device_preview tools.
  • Customizable screenshot storage and processing via onScreenshot.
  • Defaults to copying screenshots to the clipboard and logging base64.

Weaknesses

  • Strictly dependent on the device_preview package.
  • Limited functionality outside of the device_preview ecosystem.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2

Add the dependency to pubspec.yaml and include DevicePreviewScreenshot in your DevicePreview tools property.

import 'package:device_preview_screenshot/device_preview_screenshot.dart';

DevicePreview(
    tools: [
        ...DevicePreview.defaultTools,
        const DevicePreviewScreenshot(),
    ],
)

Alternatives

Packages that do the same job and could replace device_preview_screenshot.

Works with

Packages commonly used together with device_preview_screenshot: ones it builds on, ones built on it, and its own family.