perf: slim per-card build cost

Memoize the per-image SHA-1 disk-cache key (ran on the UI thread on
every image build), fade images in via paint alpha instead of an
AnimatedSwitcher saveLayer per in-flight tile, create SettingsBuilder's
merged listenable once instead of per build, and drop the pointer
chrome (InkWell ink machinery, cursor MouseRegions) from cards on TV
where no pointer exists.
This commit is contained in:
edde746
2026-07-02 11:41:25 +02:00
parent 43ab5d3246
commit 868a1469a3
4 changed files with 245 additions and 45 deletions
+5
View File
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
import '../utils/platform_detector.dart';
class ClickableCursor extends StatelessWidget {
final Widget child;
final bool enabled;
@@ -8,6 +10,9 @@ class ClickableCursor extends StatelessWidget {
@override
Widget build(BuildContext context) {
// No pointer on TV: skip the MouseRegion entirely — one exists per card
// and they add up on low-end devices.
if (PlatformDetector.isTV()) return child;
return MouseRegion(cursor: enabled ? SystemMouseCursors.click : MouseCursor.defer, child: child);
}
}