Add search bar

This commit is contained in:
2024-10-24 07:37:12 +00:00
committed by GitHub
parent a1f8f57447
commit 4334346632
9 changed files with 148 additions and 0 deletions

View File

@@ -119,6 +119,7 @@ class _GalleriesPage extends State<GalleriesPage>
});
_translatedTag = widget.translatedTag;
listener.on("user_logined", _onStateChanged);
listener.on("meilisearch_enabled", _onStateChanged);
super.initState();
}
@@ -202,6 +203,7 @@ class _GalleriesPage extends State<GalleriesPage>
icon: const Icon(Icons.sort),
itemBuilder: (context) =>
[PopupMenuItem(child: sortByGidMenu)]),
buildSearchButton(context),
buildThemeModeIcon(context),
buildMoreVertSettingsButon(context),
]),
@@ -226,6 +228,7 @@ class _GalleriesPage extends State<GalleriesPage>
_pagingController.dispose();
_tagCancel?.cancel();
listener.removeEventListener("user_logined", _onStateChanged);
listener.removeEventListener("meilisearch_enabled", _onStateChanged);
super.dispose();
}
}

View File

@@ -83,6 +83,7 @@ class HomePage extends HookWidget with IsTopWidget {
appBar: AppBar(
title: Text(AppLocalizations.of(context)!.titleBar),
actions: [
buildSearchButton(context),
IconButton(
onPressed: () {
final n = themeModeNext(mode.value);

View File

@@ -192,6 +192,7 @@ class _TaskManagerPage extends State<TaskManagerPage>
),
title: Text(i18n.taskManager),
actions: [
buildSearchButton(context),
buildThemeModeIcon(context),
buildMoreVertSettingsButon(context),
],