imrpove readmes

This commit is contained in:
2025-09-07 02:21:00 +00:00
parent 244433c9be
commit 89ae56b127
6 changed files with 20 additions and 44 deletions
+3 -19
View File
@@ -10,7 +10,7 @@ class CachingTestApp extends StatefulWidget {
}
class _CachingTestAppState extends State<CachingTestApp> {
final LazyCanvasController controller = LazyCanvasController(debug: false);
final LazyCanvasController controller = LazyCanvasController(debug: false, buildCacheExtent: const Offset(50, 50));
@override
void initState() {
@@ -34,7 +34,7 @@ class _CachingTestAppState extends State<CachingTestApp> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Widget Caching Test'),
title: const Text('Widget Build Counts'),
actions: [
IconButton(
onPressed: () {
@@ -51,23 +51,7 @@ class _CachingTestAppState extends State<CachingTestApp> {
),
],
),
body: Column(
children: [
Container(
padding: const EdgeInsets.all(16),
color: Colors.yellow[100],
child: const Text(
'Instructions:\n'
'• Pan around the canvas - widgets should only build once initially\n'
'• Watch the console for build messages\n'
'• Use the refresh button to force rebuilds\n'
'• Zoom in/out to see caching in action',
style: TextStyle(fontSize: 12),
),
),
Expanded(child: LazyCanvas(controller: controller)),
],
),
body: LazyCanvas(controller: controller),
floatingActionButton: Column(
mainAxisSize: MainAxisSize.min,
children: [