Files
Eventify-frontend/lib
Sicherhaven 0982e4fdee perf: eliminate 60fps setState rebuilds causing scroll lag
Three root causes of the perceived scroll/animation lag:

1. profile_screen.dart — AnimationController listener called setState() on
   every animation frame (60fps × 2s = 120 full-tree rebuilds). The entire
   ProfileScreen with its nested lists and images was rebuilding 60 times per
   second just to update two small widgets (EXP bar + stat counters).
   Fix: remove setState() from listeners entirely; wrap only the EXP bar
   (LayoutBuilder) and stat row (IntrinsicHeight) in AnimatedBuilder so
   only those two leaf widgets re-render per frame.

2. learn_more_screen.dart — PageView.onPageChanged called setState() on
   every swipe, rebuilding the full event detail screen (blurred bg image,
   map, about section, etc.) just to update the 6px dot indicators.
   Fix: int _currentPage → ValueNotifier<int> _pageNotifier; wrap only the
   dot row and the blurred background image in ValueListenableBuilder.

3. search_screen.dart — BackdropFilter(ImageFilter.blur) without a
   RepaintBoundary forces Flutter to read every pixel behind the blur widget
   and composite it every frame. When the user scrolls the underlying list,
   the blur repaints continuously causing frame drops.
   Fix: wrap BackdropFilter in RepaintBoundary to isolate its repaint layer.
2026-03-18 17:00:25 +05:30
..