fit_system_screenshot 1.0.7 copy "fit_system_screenshot: ^1.0.7" to clipboard
fit_system_screenshot: ^1.0.7 copied to clipboard

outdated

让Flutter应用适配安卓系统的长截图

fit_system_screenshot #

让Flutter应用适配安卓系统的长截图

安装与卸载 #

1、初始化截屏库

fitSystemScreenshot.init()

2、卸载截屏库

fitSystemScreenshot.release()

页面初始化 #

1、同步Flutter层和原生层的滚动位置

screenShotDispose = fitSystemScreenshot.attachToPage(scrollAreaKey, scrollController, (offset) {
  scrollController.jumpTo(offset);
});

2、更新滚动内容长度

fitSystemScreenshot.updateScrollLength(contentLength);

3、页面退出,释放对象

screenShotDispose?.call();

4、更新截屏开始位置(可选)

fitSystemScreenshot.updateScrollPosition(0);