Files
plezy/lib/mixins/tab_visibility_aware.dart
T
edde746 e0d9b4ee93 refactor: unify focus restoration for main screen tabs
Replace per-tab if-chains in _focusContent() and _selectTab() with
generic FocusableTab/TabVisibilityAware dispatch. Fixes search screen
focus on Android TV (sidebar → Search now works).
2026-03-15 21:55:22 +01:00

9 lines
296 B
Dart

/// Mixin for screens that need to react to tab visibility changes.
///
/// Used by MainScreen to pause expensive work (e.g. animation tickers)
/// when the screen's tab is no longer visible, and resume it when shown again.
mixin TabVisibilityAware {
void onTabShown();
void onTabHidden();
}