Search packages, repositories and app categories

Package detailsv0.0.9

widget_screenshot

Screenshot for widget,support long screenshot like ListView, support backgroundColor, format (png, jpeg), quality (0~100), merge extraImages (like header, footer or watermark)

AndroidiOS
30-day downloads
78
Likes
21
Pub points
130

Install package

flutter pub add widget_screenshot

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package that captures screenshots of widgets, supporting long scrollable content like ListView. It allows customization of background color, image format (PNG, JPEG), quality (0–100), and merging additional images such as headers, footers, or watermarks. Ideal for generating full-page snapshots in apps requiring visual documentation or sharing. The package is compatible with both Android and iOS platforms.

Use cases

  • Generating full-page screenshots of scrollable lists
  • Creating visual previews for shared content
  • Adding watermarks or headers to screenshots
  • Capturing UI states for debugging
  • Exporting widget layouts as images

Key features

  • Supports long screenshots of scrollable widgets
  • Customizable background color
  • Configurable image format and quality
  • Merge extra images (headers, footers, watermarks)
  • Cross-platform compatibility (Android, iOS)

Suitable for

  • Developers needing full-widget screenshots
  • Apps requiring UI state capture
  • Tools for visual documentation
  • Debugging and testing UI layouts
  • Sharing app content as images

Considerations

  • May impact performance on large or complex widgets
  • Requires careful handling of async screenshot generation
  • Limited to static widget rendering (no dynamic updates during capture)
  • Not suitable for real-time screen recording
  • Memory usage increases with larger screenshots

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

widget_screenshot

Widget截屏,支持长截图,如:ListView

Screenshot for widget,support long screenshot like ListView,

Support

  • backgroundColor
  • format (png, jpeg)
  • quality (0~100)
  • extraImage (like header, footer or watermark)

Usage

dependencies:
  widget_screenshot:x.y.z
// Like RepaintBoundary
WidgetShot(
        key: _shotKey,
        child: ListView.separated(
            controller: _scrollController,
            itemBuilder: (context, index) {
              return Container(
                color: Color.fromARGB(
                    Random().nextInt(255), Random().nextInt(255), Random().nextInt(255), Random().nextInt(255)),
                height: 160,
                child: Center(
                  child: Text(
                    "测试文案测试文案测试文案测试文案 ${index}",
                    style: const TextStyle(fontSize: 32),
                  ),
                ),
              );
            },
            separatorBuilder: (context, index) {
              return const Divider(
                height: 1,
                color: Colors.grey,
              );
            },
            itemCount: 30),
      )
WidgetShotRenderRepaintBoundary repaintBoundary =
    _shotKey.currentContext!.findRenderObject() as WidgetShotRenderRepaintBoundary;
//
var resultImage = await repaintBoundary.screenshot(scrollController: _scrollController,pixelRatio: 1);

Display

shoting-> result->

Categories

Dependencies

Dependency list 1 items

  • plugin_platform_interface^2.0.2

Source repository

Projects using this package

No data available yet.