widget_screenshot 0.0.9 copy "widget_screenshot: ^0.0.9" to clipboard
widget_screenshot: ^0.0.9 copied to clipboard

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

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->
11
likes
120
pub points
78%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on widget_screenshot