I use this library https://github.com/Rahiche/riveo_page_curl
Here is video :https://www.youtube.com/watch?v=4rBlKWhYnVY
Here is core code:
ShaderBuilder(
(context, shader, _) {
return AnimatedSampler(
(image, size, canvas) async {
// print("AnimatedSampler");
if (backImage != null) {
ShaderHelper.drawShaderRectBack(backImage!, size, canvas);
}
if (curlImage != null) {
ShaderHelper.configureShader(
shader, size, curlImage!, _animation.value);
ShaderHelper.drawShaderRect(shader, size, canvas);
}
},
enabled: true,
child: Container(
width: double.infinity,
height: double.infinity,
),
);
},
assetKey: shaderAssetKey,
)
backImage is page curl background, curlImage is page curl foreground.