perf(search): reduce list rendering and provider rebuilds

This commit is contained in:
zarzet
2026-09-26 23:41:47 +07:00
parent e0093841bc
commit abfd8df5fb
6 changed files with 223 additions and 50 deletions
+6
View File
@@ -131,6 +131,7 @@ class MornyeGlassPanel extends ConsumerWidget {
this.strongTint = false,
this.tintOpacity,
this.liquidGlass = false,
this.blurEnabled = true,
});
/// Shared glass material for confirmation dialogs and floating sheets.
@@ -142,6 +143,7 @@ class MornyeGlassPanel extends ConsumerWidget {
this.lastInGroup = true,
this.tintOpacity = 0.78,
this.liquidGlass = false,
this.blurEnabled = true,
}) : strongTint = false;
final Widget child;
@@ -152,9 +154,13 @@ class MornyeGlassPanel extends ConsumerWidget {
final double? tintOpacity;
final bool liquidGlass;
/// Disable backdrop sampling for surfaces that scroll over a plain page.
final bool blurEnabled;
@override
Widget build(BuildContext context, WidgetRef ref) {
final blur =
blurEnabled &&
!MediaQuery.highContrastOf(context) &&
(!ref.watch(lowEndDeviceProvider) ||
ref.watch(backdropBlurEnabledProvider));