decorate method
Implementation
@override
List<Decorator> decorate(BuildContext context) {
return [
Decorator(
(context, story) {
return ListenableBuilder(
listenable: _screenshotting,
builder: (context, child) {
if (_screenshotting.value) {
return OverflowBox(
alignment: Alignment.topLeft,
maxHeight: double.infinity,
child: RepaintBoundary(
key: _repaintBoundaryKey,
child: ColoredBox(
color: Theme.of(context).scaffoldBackgroundColor,
child: child,
),
),
);
}
return child!;
},
child: story,
);
},
),
];
}