fix alignment for dot grid background + add clipping post canvas paint

This commit is contained in:
2025-07-26 19:12:24 +00:00
parent 7ad54a92cb
commit 5a986eceb9
9 changed files with 94 additions and 39 deletions
+6 -1
View File
@@ -20,7 +20,12 @@ class _CachingTestAppState extends State<CachingTestApp> {
for (int i = 0; i < 20; i++) {
controller.addChild(
Offset((i % 5) * 120.0, (i ~/ 5) * 120.0),
BuildCounterWidget(color: Colors.primaries[i % Colors.primaries.length], label: 'Widget $i'),
BuildCounterWidget(
key: ValueKey<int>(i), // since in the tree it will be just an array at the same height, a count change
// along the egdes of screen build all so you need a key to identify individually
color: Colors.primaries[i % Colors.primaries.length],
label: 'Widget $i',
),
);
}
}