refact: flutter, ChangeNotifier, reduce rebuild (#9392)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2024-09-19 18:48:01 +08:00
committed by GitHub
parent 88a99211f3
commit c6e3f60a6b
4 changed files with 21 additions and 7 deletions

View File

@@ -250,6 +250,9 @@ class _PeerCardState extends State<_PeerCard>
color: Colors.transparent,
elevation: 0,
margin: EdgeInsets.zero,
// to-do: memory leak here, more investigation needed.
// Continious rebuilds of `Obx()` will cause memory leak here.
// The simple demo does not have this issue.
child: Obx(
() => Container(
foregroundDecoration: deco.value,