我正在使用RepaintBoundary
来获取当前小部件NestedScrollView
的屏幕截图。但是它只能捕获当时在屏幕上可见的内容。
RepaintBoundary(
key: _screenContainer,
child: NestedScrollView(
headerSliverBuilder:
(BuildContext context, bool innerBoxIsScrolled) {
return <Widget>[
SliverOverlapAbsorber(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(
context),
child: SliverAppBar(
backgroundColor: Color(0xfff1f1f1),
forceElevated: innerBoxIsScrolled,
bottom: PreferredSize(
child: Container(),
preferredSize: Size.fromHeight(_appBarHeight)),
flexibleSpace: Column(
children: <Widget>[
_swiper(),
_spike(),
],
),
),
),
SliverPersistentHeader(
delegate: _SliverAppBarDelegate(_timeSelection()),
pinned: true,
),
];
},
body:
TabBarView(controller: _timeTabController, children: <Widget>[
_listItem(1),
_listItem(2),
_listItem(3),
_listItem(4),
_listItem(5),
_listItem(6),
])),
),
有什么方法可以捕获整个NestedScrollView
?