From 82b8dd1703cacfc37eb1c8f9ea64b569d92439d3 Mon Sep 17 00:00:00 2001 From: Carlos Costa Date: Wed, 3 Jan 2024 21:20:23 -0300 Subject: [PATCH] Refactor ImgyState to use RepaintBoundary for better performance --- lib/imgy.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/imgy.dart b/lib/imgy.dart index b92710b..4146573 100644 --- a/lib/imgy.dart +++ b/lib/imgy.dart @@ -127,7 +127,14 @@ class ImgyState extends State { builder: (BuildContext context, StateSetter setState) { return Stack( children: [ - ImgyFullScreen(widget: widget), + Positioned.fill( + child: RepaintBoundary( + key: globalKey, + child: ImgyFullScreen( + widget: widget, + ), + ), + ), ImgyHeader( widget: widget, status: imageStatus,