Description
This pull request introduces a major navigation refactoring to a single shell architecture, optimizes performance/caching across the app, fixes several memory leaks (isolates, listeners, and ports), improves profile synchronization, and updates the build environment to support modern Gradle and Java versions.
Key Changes
🔄 Navigation & Architecture Refactoring
- Single Shell Navigation: Migrated the application to a single shell page architecture driven by
NavigationProviderand a reactive tab wrapper. - Improved Navigation Stack: Implemented popping all sub-pages from the navigator stack to return to the main shell when tapping active bottom bar items.
- Removed Connectivity Checks: Deprecated the
connectivitypackage dependencies, refactoringConnectivityWidgettoAppInitWidgetand stripping redundant connectivity checks from movies, series, and profile pages.
⚡ Performance & Optimization
- Isolate & Port Leak Fixes: Resolved memory leaks associated with unclosed
ReceivePorts and inactive isolates in data fetchers. - Listener Leak Fixes: Closed permanent listener memory leaks in
MovieSearchScreenandSerieSearchScreen. - API Call & Rebuild Optimization:
- Parallelized sequential network calls on Movie and Series screens in discover.
- Cached future variables in detail pages to prevent redundant network calls and UI flashing on rebuilds.
- Added query debouncing to
SearchScreenand the actor search filters page to avoid API flooding.
- Hive Database: Optimized Hive box access to open once on startup and access boxes synchronously.
👤 Profile & State Management
- Reactive State Updates: Introduced
profileRefreshNotifierto updateProfilePagelists reactively after detail page actions. - Incremental Pagination: Implemented background pagination loading and incremental state updates on the Profile page.
- Race Condition Prevention: Resolved synchronization race conditions by ensuring API actions are awaited before profile notifications are triggered.
🛠️ Build & Environment Upgrades
- Gradle: Upgraded the Gradle wrapper to
8.14.5. - Java/Kotlin: Targeted Java 17 compatibility and migrated to built-in Kotlin.
- Dependencies: Cleaned up unused imports and bumped the application/java version.
🐛 Bug Fixes & Stability
- Added TV watchlist parser null safety and addressed a potential null safety risk in
SupabaseSyncService. - Fixed crashes in
UpdateCheckerrelated to version parsing and unmounted contexts. - Corrected
isRatedcomparison typos and resolved compile errors inMovieDetailPage.