feat: Implement custom keyboard for Android TV (#523)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2025-10-09 09:59:30 +02:00 committed by GitHub
parent 721fc28060
commit 75c2f958b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 927 additions and 157 deletions

View file

@ -400,14 +400,15 @@ class _LibrarySearchScreenState extends ConsumerState<LibrarySearchScreen> {
spacing: 2,
children: [
const SizedBox(width: 2),
Center(
child: SizedBox.square(
dimension: 47,
child: Card(
child: context.router.backButton(),
if (AdaptiveLayout.inputDeviceOf(context) != InputDevice.dPad)
Center(
child: SizedBox.square(
dimension: 47,
child: Card(
child: context.router.backButton(),
),
),
),
),
Flexible(
child: Hero(
tag: "PrimarySearch",

View file

@ -100,6 +100,15 @@ class _SearchBarState extends ConsumerState<SuggestionSearchBar> {
isEmpty = value.isEmpty;
});
},
searchQuery: (query) async {
if (query.isEmpty) return [];
if (widget.key != null) {
final items =
await ref.read(librarySearchProvider(widget.key!).notifier).fetchSuggestions(query, limit: 5);
return items.map((e) => e.name).toList();
}
return [];
},
placeHolder: widget.title ?? "${context.localized.search}...",
decoration: InputDecoration(
hintText: widget.title ?? "${context.localized.search}...",