perf(ui): scope scan rebuilds, aspect-bound MediaQuery, lazy duplicate list

This commit is contained in:
zarzet
2026-07-26 22:25:07 +07:00
parent cbee637501
commit 2ce793d68f
3 changed files with 97 additions and 71 deletions
+6 -1
View File
@@ -205,8 +205,13 @@ class _DuplicateReviewSheetState extends ConsumerState<DuplicateReviewSheet> {
),
);
}
// shrinkWrap keeps a small sheet compact but builds every
// group eagerly; past a screenful, switch to a lazy
// full-height list so a large duplicate set can't jank the
// opening frame.
final compact = groups.length <= 12;
return ListView.builder(
shrinkWrap: true,
shrinkWrap: compact,
itemCount: groups.length,
itemBuilder: (context, index) =>
_buildGroup(context, colorScheme, groups[index]),