💄 Optimize universal search
This commit is contained in:
@@ -37,7 +37,7 @@ class UniversalSearchScreen extends HookConsumerWidget {
|
|||||||
|
|
||||||
return AppScaffold(
|
return AppScaffold(
|
||||||
isNoBackground: false,
|
isNoBackground: false,
|
||||||
appBar: AppBar(title: Text('search'.tr()), elevation: 0),
|
appBar: AppBar(title: Text('universalSearch'.tr()), elevation: 0),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
TabBar(
|
TabBar(
|
||||||
@@ -268,13 +268,45 @@ class _PostsSearchTab extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (showFilters.value)
|
const SliverGap(8),
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
child: Center(
|
child: Column(
|
||||||
child: ConstrainedBox(
|
mainAxisSize: MainAxisSize.min,
|
||||||
constraints: const BoxConstraints(maxWidth: 600),
|
children: [
|
||||||
child: buildFilterPanel(),
|
Card(
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 8),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 12,
|
||||||
|
vertical: 8,
|
||||||
),
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
const Icon(Symbols.tune).padding(horizontal: 8),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
'filters'.tr(),
|
||||||
|
style: Theme.of(
|
||||||
|
context,
|
||||||
|
).textTheme.bodyLarge,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
Symbols.filter_alt,
|
||||||
|
fill: showFilters.value ? 1 : null,
|
||||||
|
),
|
||||||
|
onPressed: toggleFilterDisplay,
|
||||||
|
tooltip: 'toggleFilters'.tr(),
|
||||||
|
),
|
||||||
|
const Gap(4),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Gap(4),
|
||||||
|
if (showFilters.value) buildFilterPanel(),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
PaginationList(
|
PaginationList(
|
||||||
|
|||||||
Reference in New Issue
Block a user