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

outdated

Screenshot for widget,support long screenshot like ListView

widget_screenshot #

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

Screenshot for widget,support long screenshot like ListView

Usage like RepaintBoundary #

dependencies:
  widget_screenshot:x.y.z
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 #

[./display/demo.png] [./display/long_shot.png]
20
likes
0
points
265
downloads

Publisher

unverified uploader

Weekly Downloads

Screenshot for widget,support long screenshot like ListView

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on widget_screenshot

Packages that implement widget_screenshot