Files
plezy/lib/mixins/library_tab_state.dart
edde746 6eb0805f8d refactor(profiles): delete dead client accessors, the write-only focus aspect, and test-only registry API
getServerBoundPlexClient/getClientForLibrary existed only for their own unit tests; MetadataEditAdapter.backend and Plex's unreachable prefKey fallback and music-kind branches had no production path (edit is double-gated on supportsKind); MainScreenFocusScope's focus aspect, isSidebarFocused, and focusContent were write-only; resolveActivePlexIdentity.preferredAccount was never passed; ProfileRegistry.get was unused outside tests — its removal exposed a stale test contract, now pinned correctly: list() deliberately never serves plex_home rows.
2026-08-17 19:02:24 +02:00

15 lines
599 B
Dart

import 'package:flutter/material.dart';
import '../media/media_library.dart';
import '../media/media_server_client.dart';
import '../utils/provider_extensions.dart';
/// Mixin providing common functionality for library tab screens
/// Provides server-specific client resolution for multi-server support
mixin LibraryTabStateMixin<T extends StatefulWidget> on State<T> {
MediaLibrary get library;
/// Get a backend-neutral [MediaServerClient] for this library's server.
/// Throws if unavailable.
MediaServerClient getMediaClientForLibrary() => context.getMediaClientForLibrary(library);
}