I need to run animation on the background. So that even if the user navigates to other pages the animation will keep on running. I achieved the animation(ken burns effect) with the following code:
ClipRect(
child: Transform.translate(
offset: Offset(translation.value, 1.0),
child: Transform.scale(
alignment: FractionalOffset.topLeft,
scale: scale.value,
child: Image.file(File(widget.image)),
),
),
)
I need to run the animation on the background to capture frames and convert a still image to video. So the plan is to keep the animation running on the background and use screenshot package to capture frames of the invisible widget.
Unfortunately, animation stopped when I navigated to another page, and still frames were captured.